多会话并行编码,WhatsApp远程掌控
简介
多会话并行管理Claude Code实例,通过WhatsApp远程监控审批,实现异步代码工作流自动化
原始描述
Your Claude Code wingman - orchestrate multiple Claude Code sessions across projects, monitor them all from WhatsApp
通过你的 Agent 添加
安装目录:claude-code-wingman/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
claude-code-wingman 是一款基于 tmux 的 Claude Code 多会话 orchestrator,允许用户同时运行多个 Claude Code 实例处理不同项目任务,并通过 WhatsApp 远程监控与审批。
主要功能:
- 多会话并行管理:通过 tmux 为每个任务创建独立会话,支持同时处理 VSR bugfix、功能开发、代码重构等不同工作
- WhatsApp 集成:master-monitor 守护进程检测审批需求,通过本地 webhook 发送手机通知,用户回复
approve <session>/always <session>/deny <session>即可远程控制 - 安全交互机制:使用
tmux send-keys模拟键盘输入(C-m、Down、Enter)与 Claude Code 交互,避免直接执行命令 - 双模式审批:默认交互式模式将审批请求写入文件等待响应;
--auto模式自动批准所有工具调用(需显式启用)
典型工作流:
# 启动会话
~/code/claude-code-orchestrator/claude-wingman.sh \
--session vsr-issue-1131 \
--workdir ~/code/semantic-router \
--prompt "Fix the schema validation bug"
# 监控状态
tmux capture-pane -t vsr-issue-1131 -p -S -50
# 远程审批(通过 WhatsApp 触发)
approve vsr-issue-1131 # 执行 handle-approval.sh approve
显著优点
- 架构设计合理:使用 tmux 实现进程隔离,无 eval/exec 危险函数,IPC 通过键盘事件模拟,安全性较好
- 零第三方依赖:仅依赖系统工具(tmux、jq、curl),无包管理器依赖,无 CVE 风险
- 移动端友好:通过 WhatsApp 实现真正的远程异步管理,适合离开电脑时的持续开发
- 配置安全:从
~/.clawdbot/clawdbot.json 读取 webhook token 和手机号,无硬编码密钥
- 输入验证:会话名称限制为
[a-zA-Z0-9_-]+,有效防御命令注入
潜在缺点与局限性
- 自动审批风险:
--auto 模式会自动批准所有工具调用(包括 rm -rf 类操作),需用户显式启用,但多用户环境存在误用风险
- T3 来源可信度:由个人开发者(yossiovadia)维护,虽项目公开透明,但无企业级维护保障
- HTTP 本地通信:向 Clawdbot webhook 使用明文 HTTP(虽为本地 127.0.0.1,理论风险低)
- 配置文件权限依赖:读取
~/.clawdbot/clawdbot.json 获取敏感配置,若文件权限不当(>600)可能泄露 webhook token
- 临时文件路径:日志文件创建于
/tmp,虽权限设为 600,但共享 tmp 目录存在理论篡改风险
- 验证不完整:会话名称验证仅在
claude-wingman.sh 实现,handle-approval.sh 等脚本直接接受参数
适合人群
- 多项目并行开发者:需要同时推进多个代码库的不同功能分支
- 远程/移动办公场景:希望离开电脑后通过手机监控和审批 AI 编码进度
- 可信单机环境用户:个人工作站、私有云服务器等单用户场景
- Claude Code 重度用户:已熟悉 Claude Code 工具调用模式,希望实现自动化流水线
~/.clawdbot/clawdbot.json 读取 webhook token 和手机号,无硬编码密钥[a-zA-Z0-9_-]+,有效防御命令注入- 自动审批风险:
--auto模式会自动批准所有工具调用(包括 rm -rf 类操作),需用户显式启用,但多用户环境存在误用风险 - T3 来源可信度:由个人开发者(yossiovadia)维护,虽项目公开透明,但无企业级维护保障
- HTTP 本地通信:向 Clawdbot webhook 使用明文 HTTP(虽为本地 127.0.0.1,理论风险低)
- 配置文件权限依赖:读取
~/.clawdbot/clawdbot.json获取敏感配置,若文件权限不当(>600)可能泄露 webhook token - 临时文件路径:日志文件创建于
/tmp,虽权限设为 600,但共享 tmp 目录存在理论篡改风险 - 验证不完整:会话名称验证仅在
claude-wingman.sh实现,handle-approval.sh等脚本直接接受参数
适合人群
- 多项目并行开发者:需要同时推进多个代码库的不同功能分支
- 远程/移动办公场景:希望离开电脑后通过手机监控和审批 AI 编码进度
- 可信单机环境用户:个人工作站、私有云服务器等单用户场景
- Claude Code 重度用户:已熟悉 Claude Code 工具调用模式,希望实现自动化流水线
不适合:
- 多用户共享服务器(自动审批模式风险)
- 高敏感代码库(需严格人工审查每个操作)
- 无 tmux 经验用户(故障排查需要一定终端知识)
常规风险
风险项
等级
说明
自动审批模式滥用
中
--auto 自动批准所有操作,包括潜在破坏性命令
配置文件泄露
低
webhook token 存储于用户目录,依赖文件权限保护
会话名称注入
低
部分脚本未统一验证输入,存在理论注入可能
本地服务暴露
低
依赖本地 Clawdbot webhook,若服务配置不当可能被利用
| 风险项 | 等级 | 说明 |
|---|---|---|
| 自动审批模式滥用 | 中 | --auto 自动批准所有操作,包括潜在破坏性命令 |
| 配置文件泄露 | 低 | webhook token 存储于用户目录,依赖文件权限保护 |
| 会话名称注入 | 低 | 部分脚本未统一验证输入,存在理论注入可能 |
| 本地服务暴露 | 低 | 依赖本地 Clawdbot webhook,若服务配置不当可能被利用 |
安全建议:
- 生产环境始终使用默认交互式模式,禁用
--auto - 定期检查
~/.clawdbot/clawdbot.json权限(应为 600) - 为敏感操作会话启用
always而非approve,减少重复授权疲劳 - 考虑将临时日志路径改为
~/.local/share/claude-orchestrator
技能正文
name: claude-code-wingman
description: Your Claude Code wingman - dispatch coding tasks via tmux for free/work-paid coding while keeping Clawdbot API costs minimal
metadata: {"clawdbot":{"emoji":"🎯","requires":{"anyBins":["claude","tmux"]}}}
Claude Code Wingman
Automate Claude Code sessions from Clawdbot - leverage free/work Claude Code API while keeping your Anthropic budget for conversations.
GitHub: https://github.com/yossiovadia/claude-code-wingman
What It Does
Spawns Claude Code in tmux sessions with automatic approval of permission prompts. Perfect for when you have free/work Claude Code access but limited Anthropic API budget.
Cost Comparison:
- Without: Clawdbot does all coding → uses your $20/month API
- With: Clawdbot spawns Claude Code → uses work's free API ✅
Installation
The skill references the standalone repo. Install it once:
cd ~/code
git clone https://github.com/yossiovadia/claude-code-wingman.git
cd claude-code-wingman
chmod +x *.sh
Usage from Clawdbot
When a user asks for coding work, spawn Claude Code:
~/code/claude-code-wingman/claude-wingman.sh \
--session <session-name> \
--workdir <project-directory> \
--prompt "<task description>"
Example Patterns
User: "Fix the bug in api.py"
Clawdbot Response:
Spawning Claude Code for this...
bash:~/code/claude-code-wingman/claude-wingman.sh \
--session vsr-bug-fix \
--workdir ~/code/semantic-router \
--prompt "Fix the bug in src/api.py - add proper error handling for null responses"
Then report:
- Session name (so user can attach)
- Monitor command
- Auto-approver is running
User: "What's the status?"
Clawdbot: Capture tmux output and summarize:
tmux capture-pane -t vsr-bug-fix -p -S -50
Commands
Spawn Session
~/code/claude-code-wingman/claude-wingman.sh \
--session <name> \
--workdir <dir> \
--prompt "<task>"
Monitor Progress
tmux capture-pane -t <session-name> -p -S -100
View Auto-Approver Log
cat /tmp/auto-approver-<session-name>.log
Kill Session
tmux kill-session -t <session-name>
List All Sessions
tmux ls | grep claude-auto
Workflow
- User requests coding work (fix bug, add feature, refactor, etc.)
- Clawdbot spawns Claude Code via wingman script
- Auto-approver handles permissions in background
- Clawdbot monitors and reports progress
- User can attach anytime to see/control directly
- Claude Code does the work on work's API ✅
Trust Prompt (First Time Only)
tmux capture-pane -t <session-name> -p -S -100
cat /tmp/auto-approver-<session-name>.log
Kill Session
tmux kill-session -t <session-name>
List All Sessions
tmux ls | grep claude-auto
Workflow
- User requests coding work (fix bug, add feature, refactor, etc.)
- Clawdbot spawns Claude Code via wingman script
- Auto-approver handles permissions in background
- Clawdbot monitors and reports progress
- User can attach anytime to see/control directly
- Claude Code does the work on work's API ✅
Trust Prompt (First Time Only)
tmux kill-session -t <session-name>
tmux ls | grep claude-auto
Workflow
- User requests coding work (fix bug, add feature, refactor, etc.)
- Clawdbot spawns Claude Code via wingman script
- Auto-approver handles permissions in background
- Clawdbot monitors and reports progress
- User can attach anytime to see/control directly
- Claude Code does the work on work's API ✅
Trust Prompt (First Time Only)
When running in a new directory, Claude Code asks:
"Do you trust the files in this folder?"
First run: User must attach and approve (press Enter). After that, it's automatic.
Handle it:
User, Claude Code needs you to approve the folder trust (one-time). Please run:
tmux attach -t <session-name>
Press Enter to approve, then Ctrl+B followed by D to detach.
Best Practices
When to Use Wingman
✅ Use wingman for:
- Heavy code generation/refactoring
- Multi-file changes
- Long-running tasks
- Repetitive coding work
❌ Don't use wingman for:
- Quick file reads
- Simple edits
- When conversation is needed
- Planning/design discussions
Session Naming
Use descriptive names:
vsr-issue-1131- specific issue workvsr-feature-auth- feature developmentproject-bugfix-X- bug fixes
Troubleshooting
Prompt Not Submitting
The wingman sends Enter twice with delays. If stuck, user can attach and press Enter manually.
Auto-Approver Not Working
Check logs: cat /tmp/auto-approver-<session-name>.log
Should see: "Approval prompt detected! Navigating to option 2..."
Session Already Exists
Kill it: tmux kill-session -t <name>
Advanced: Update Memory
After successful tasks, update TOOLS.md:
### Recent Claude Code Sessions
- 2026-01-26: VSR AWS check - verified vLLM server running ✅
- Session pattern: vsr-* for semantic-router work
Pro Tips
- Parallel sessions: Run multiple tasks simultaneously in different sessions
- Name consistently: Use project prefixes (vsr-, myapp-, etc.)
- Monitor periodically: Check progress every few minutes
- Let it finish: Don't kill sessions early, let Claude Code complete
Remember: This skill saves API costs by using free work Claude Code for heavy lifting, keeping your Anthropic budget for conversations.
原始仓库
作者的项目地址:https://github.com/sundial-org/awesome-openclaw-skills