claude-duet

作者 EliranG

Two devs, one Claude. Share a Claude Code session in real-time with E2E encryption.

137
Stars
7
Forks
TypeScript
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/EliranG/claude-duet

快速入门

使用 claude-duet 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

✦ claude-duet

Two devs. One Claude. Pure vibes.

npm version License: MIT npm downloads

Share your Claude Code session with a friend — real-time collaboration for AI pair programming.

claude-duet demo

⚡ Quick Start

Assumes you already have Claude Code installed.

# Start a duet session (run from your terminal, NOT inside Claude Code)
npx claude-duet host --name Alice

# Your partner joins (copy the command from your terminal)
npx claude-duet join <offer-code> --password abc123

Send the join command to your partner via Slack, Discord, whatever works.

P2P mode (default): After your partner runs the join command, they'll get an answer code to share back with you. Paste it into your terminal — that's it, you're connected directly peer-to-peer via WebRTC. No server needed.

Step by Step

  1. Exit Claude Code if you're in an active session (Ctrl+C or /exit)
  2. Start a duet session from your regular terminal:
    • npx claude-duet host — fresh session
    • npx claude-duet host --continue — resume your most recent Claude Code conversation
  3. Share the join command that appears in your terminal with your partner
  4. Your partner runs the join command from their own terminal
  5. Chat freely — plain text goes between you two, @claude <prompt> sends to Claude

Context is preserved. Because claude-duet wraps Claude Code in headless mode, your Claude Code conversation history carries over. Use --continue to pick up where you left off, and after the duet session ends, run claude --continue to keep going solo. Claude remembers everything — before, during, and after the duet.

Heads up: claude-duet gives your partner the ability to run prompts on your machine through Claude Code. Approval mode is on by default so you review every prompt — but only share sessions with people you trust. Think of it like handing someone a terminal.

✦ What Is This

A shared terminal session where two people can chat with each other and invoke Claude together using @claude <prompt>.

Just type normally to talk to your partner. Prefix with @claude to send a prompt to Claude. Both of you see everything in real time.

⟩ hey, do you see the bug in auth.ts?          ← chat (just between you two)
⟩ @claude look at src/auth.ts and fix the bug  ← sent to Claude (both see the response)

That's the whole idea. You decide when to bring Claude in.

When to use it

  • Brainstorm mid-session. Deep in a Claude Code session and want a second brain? Invite your colleague to jump in for 5 minutes, riff on the approach together, then they leave and you keep going.
  • Demo Claude to your boss. Instead of an hour-long screen share explaining what AI coding looks like — just send them a join command and let them see it live.
  • Pair program across offices. You're in Tel Aviv, your partner is in New York. One Claude, both driving.
  • Code review with context. Walk through a PR together with Claude explaining the changes in real time.
  • Onboard a teammate. Let them watch (and participate) as Claude sets up a new service, so they learn the codebase while it's being built.

☯︎ How It Works

┌──────────────────┐  WebRTC P2P (default)  ┌──────────────────┐
│   You (host)     │◄══════════════════════►│   Partner        │
│   Claude Code    │    E2E encrypted       │   Terminal       │
│   (headless)     │    NAT hole-punching   │   Client         │
└──────────────────┘                        └──────────────────┘
  • Host runs Claude Code on their machine in headless mode
  • Partner connects directly via WebRTC data channel (no server in between)
  • Chat goes between you two — Claude doesn't see it
  • @claude <prompt> sends to Claude — both of you see the response streaming
  • Approval mode (on by default) — host reviews partner's Claude prompts before they run

Type @ and ghost text will suggest the completion. Press Tab to accept. Same for commands: /h/help, /s/status, etc. A typing indicator appears inline on the prompt line when your partner is typing.

⌘ Commands

CLI

npx claude-duet                          # Interactive wizard
npx claude-duet host                     # Start a session (P2P default)
npx claude-duet host --continue          # Resume your most recent Claude Code session
npx claude-duet host --resume <id>       # Resume a specific session
npx claude-duet host --no-approval       # Trust mode — skip prompt review
npx claude-duet host --tunnel cloudflare # Remote access via Cloudflare tunnel
npx claude-duet join <offer-code> --password <pw>           # P2P join
npx claude-duet join <session-code> --password <pw> --url <url>  # WebSocket join

In-Session

What you typeWhat happens
hello!Chat with your partner — Claude doesn't see this
@claude fix the bugSent to Claude — both of you see the response
/helpShow commands
/statusWho's connected, session duration
/clearClear the terminal
/leaveLeave the session
/trust(host) Let partner's prompts skip approval
/approval(host) Re-enable approval
/kick(host) Disconnect the partner

⚙︎ Configuration

claude-duet config set name "Eliran"              # your name
claude-duet config set approvalMode false          # skip prompt review
claude-duet config set permissionMode interactive  # approve each tool use
claude-duet config                                 # see current config

Project-level config (.claude-duet.json) overrides user config. CLI flags override everything.

☷ Connection Modes

ModeCommandWhen
P2P (default)npx claude-duet hostAny network — direct WebRTC connection
LANnpx claude-duet host --tunnel localtunnelSame Wi-Fi / VPN (fallback)
SSH Tunnelssh -L 3000:localhost:3000 hostRemote, secure
Cloudflarenpx claude-duet host --tunnel cloudflareRemote, no server needed

⊘ Security

  • E2E Encrypted — NaCl secretbox + scrypt key derivation
  • Approval Mode — host reviews partner's Claude prompts (on by default)
  • P2P Direct — WebRTC data channel by default, no server or relay in the data path
  • Host Controls Everything — Claude runs on your machine, your API key

Responsible Use

claude-duet is built for legitimate pair programming and collaboration between developers. Please use it responsibly and in accordance with Anthropic's Usage Policy and your own API terms.

⌥ Development

git clone https://github.com/elirang/claude-duet.git
cd claude-duet
npm install
npm run build
npm test                # 150 tests across 20 files

Requires Node.js 18+ and Claude Code CLI.

❓ FAQ

See the FAQ for common questions about security, remote access, permissions, and more.

License

MIT


✦ Built by vibing with Claude Code

常见问题

What is claude-duet?

claude-duet is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by EliranG. Two devs, one Claude. Share a Claude Code session in real-time with E2E encryption. It has 137 GitHub stars.

Is claude-duet safe to use?

claude-duet returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install claude-duet?

Clone the repository with "git clone https://github.com/EliranG/claude-duet" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-duet written in?

claude-duet is primarily written in TypeScript. It is open-source under EliranG on GitHub, so you can review or fork the full source.

Are there alternatives to claude-duet?

Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-duet against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ui-ux-pro-max-skill

by nextlevelbuilder

12

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

119,92012,870Python
CLI 工具ai-skillsantigravity
查看详情

happy

by slopus

Mobile and Web client for Codex and Claude Code, with realtime voice, encryption and fully featured

23,4501,980TypeScript
CLI 工具
查看详情

claudecodeui

by siteboon

Use Claude Code, OpenCode, Cursor CLI, and Codex on mobile and web with CloudCLI (aka Claude Code UI). CloudCLI is a free open source webui/GUI that helps you manage your Claude Code session and projects remotely.

13,3941,866TypeScript
CLI 工具
查看详情

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

12,5471,869JavaScript
CLI 工具
查看详情

ccstatusline

by sirmalloc

🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more.

12,508545TypeScript
CLI 工具
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情