yossiovadia

Claude Code Wingman

AI 智能体v0.3.0
作者:yossiovadia更新于 2026-05-18共 3 个版本 · 最新版本发布于 2026-01-27claude-code-wingman
#Orchestrate#WhatsApp

据 AlphaMoat 统计,截至 2026-09,Claude Code Wingman 累计下载 4,896 次、获 10 个星标,在全部 5,078 个 AI 技能中排名第 1,906 位,在「AI 智能体」分类(969 个)中排名第 357 位。

累计安装
164
累计下载
4,896
星标
10
全站排名
#1,906
全站前 38% · 「AI 智能体」前 37%
平台累计安装累计下载星标评论
ClawHub ↗1644,89610-

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该技能可让多个 Claude Code 实例并行处理不同项目,并通过 WhatsApp 或聊天查看进度、控制会话及处理审批请求。技能卡警告,相关工具可能自动批准通常需要人工审核的信任与权限提示;“始终批准”还可能允许同一会话后续执行类似操作。应在受控项目环境使用,逐项审查审批请求,并在不需要时停止后台审批进程。 需要 Claude Code、tmux、jq,远程监控还需配置聊天集成。普通仓库应禁用自动审批并保护临时审批文件;先核对会转发到聊天的会话输出并遮蔽凭据。

资料发布于 2026-10-27

可以用来做什么

  • 并行跟踪不同项目中的 Claude Code 会话
  • 查看会话状态并在聊天中处理审批请求
  • 协调各会话的任务进度

什么时候用

  • 需要远程查看或协调多个代码会话时
  • 已了解自动审批可能影响实时会话,并计划逐次审核授权时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

只汇总当前会话状态和待审批操作,不要批准、拒绝或启动任何操作;逐项说明请求涉及的文件和影响。

月度数据趋势

累计下载4,896
4,1164,5354,9542026-05 · 累计下载 4,1742026-06 · 累计下载 4,3362026-07 · 累计下载 4,6542026-08 · 累计下载 4,7962026-09 · 累计下载 4,89626-0526-09
星标10
910112026-05 · 星标 102026-06 · 星标 102026-07 · 星标 102026-08 · 星标 102026-09 · 星标 1026-0526-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-094,896—10
2026-084,796+3.1%10
2026-074,654+7.3%10
2026-064,336+3.9%10
2026-054,174—10

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

13 KB · ClawHub v0.3.0
---
name: claude-code-wingman
description: Your Claude Code wingman - orchestrate multiple Claude Code sessions across projects, monitor them all from WhatsApp
metadata: {"clawdbot":{"emoji":"🦅","requires":{"anyBins":["claude","tmux"]}}}
---

# Claude Code Wingman

Your multi-session orchestrator - manage multiple Claude Code instances working on different projects simultaneously, all from WhatsApp.
展开全部(共 447 行)
**GitHub:** https://github.com/yossiovadia/claude-code-orchestrator

## ⚡ CRITICAL: Handle Approval Commands First

**When a user message matches these patterns, IMMEDIATELY run the corresponding command:**

| User Message Pattern | Command to Run |
|---------------------|----------------|
| `approve <session>` | `~/code/claude-code-orchestrator/lib/handle-approval.sh approve <session>` |
| `always <session>` | `~/code/claude-code-orchestrator/lib/handle-approval.sh always <session>` |
| `deny <session>` | `~/code/claude-code-orchestrator/lib/handle-approval.sh deny <session>` |

**Examples:**
- User: "approve vsr-bugfix" → Run: `~/code/claude-code-orchestrator/lib/handle-approval.sh approve vsr-bugfix`
- User: "always heartbeat-test" → Run: `~/code/claude-code-orchestrator/lib/handle-approval.sh always heartbeat-test`
- User: "deny proxy-refactor" → Run: `~/code/claude-code-orchestrator/lib/handle-approval.sh deny proxy-refactor`

**After running, respond with the command output** (e.g., "✓ Session 'vsr-bugfix' approved (once)")

**Why this is critical:** The master monitor daemon sends WhatsApp notifications when Claude Code sessions need approval. The user responds with these commands from their phone. Fast response = unblocked sessions.

### Quick Status Commands

| User Message | Command to Run |
|--------------|----------------|
| `sessions` or `status` | `~/code/claude-code-orchestrator/lib/session-status.sh --all --json` |
| `status <session>` | `~/code/claude-code-orchestrator/lib/session-status.sh <session> --json` |

Parse the JSON and respond with a human-readable summary.

---

## What It Does

Orchestrates multiple Claude Code sessions in parallel, each working on different tasks in different directories. You monitor and control everything remotely via WhatsApp/chat.

**The Vision:**
- **Multiple tmux sessions** running simultaneously
- **Each session = one Claude Code instance** in its own directory
- **Different tasks** happening in parallel (VSR fixes, Clawdbot features, proxy refactoring)
- **You orchestrate everything** via Clawdbot (this assistant) from WhatsApp
- **Real-time dashboard** showing all active sessions and their status

## 🎯 Real-World Example: Multi-Session Orchestration

**Morning - You (via WhatsApp):** "Start work on VSR issue #1131, Clawdbot authentication feature, and refactor the proxy"

**Clawdbot spawns 3 sessions:**
```
✅ Session: vsr-issue-1131     (~/code/semantic-router)
✅ Session: clawdbot-auth      (~/code/clawdbot)
✅ Session: proxy-refactor     (~/code/claude-code-proxy)
```

**During lunch - You:** "Show me the dashboard"

**Clawdbot:**
```
┌─────────────────────────────────────────────────────────┐
│ Active Claude Code Sessions                             │
├─────────────────┬──────────────────────┬────────────────┤
│ vsr-issue-1131  │ semantic-router      │ ✅ Working     │
│ clawdbot-auth   │ clawdbot             │ ✅ Working     │
│ proxy-refactor  │ claude-code-proxy    │ ⏳ Waiting approval │
└─────────────────┴──────────────────────┴────────────────┘
```

**You:** "How's the VSR issue going?"

**Clawdbot captures session output:**
"Almost done - fixed the schema validation bug, running tests now. 8/10 tests passing."

**You:** "Tell proxy-refactor to run tests next"

**Clawdbot sends command** to that specific session.

**Result:** 3 parallel tasks, full remote control from your phone. 🎯

## Installation

### Via Clawdbot (Recommended)

```bash
clawdbot skill install claude-code-wingman
```

Or visit: https://clawdhub.com/skills/claude-code-wingman

### Manual Installation

```bash
cd ~/code
git clone https://github.com/yossiovadia/claude-code-orchestrator.git
cd claude-code-orchestrator
chmod +x *.sh lib/*.sh
```

### Requirements

- `claude` CLI (Claude Code)
- `tmux` (terminal multiplexer)
- `jq` (JSON processor)

## Core Philosophy: Always Use the Wingman Script

**CRITICAL:** When interacting with Claude Code sessions, ALWAYS use the wingman script (`claude-wingman.sh`). Never run raw tmux commands directly.

**Why:**
- ✅ Ensures proper Enter key handling (C-m)
- ✅ Consistent session management
- ✅ Future-proof for dashboard/tracking features
- ✅ Avoids bugs from manual tmux commands

**Wrong (DON'T DO THIS):**
```bash
tmux send-keys -t my-session "Run tests"
# ^ Might forget C-m, won't be tracked in dashboard
```

**Right (ALWAYS DO THIS):**
```bash
~/code/claude-code-orchestrator/claude-wingman.sh \
  --session my-session \
  --workdir ~/code/myproject \
  --prompt "Run tests"
```

---

## Usage from Clawdbot

### Start a New Session

When a user asks for coding work, spawn Claude Code:

```bash
~/code/claude-code-orchestrator/claude-wingman.sh \
  --session <session-name> \
  --workdir <project-directory> \
  --prompt "<task description>"
```

### Send Command to Existing Session

To send a new task to an already-running session:

```bash
~/code/claude-code-orchestrator/claude-wingman.sh \
  --session <existing-session-name> \
  --workdir <same-directory> \
  --prompt "<new task>"
```

**Note:** The script detects if the session exists and sends the command to it instead of creating a duplicate.

### Check Session Status

```bash
tmux capture-pane -t <session-name> -p -S -50
```

Parse the output to determine if Claude Code is:
- Working (showing tool calls/progress)
- Idle (showing prompt)
- Error state (showing errors)
- Waiting for approval (showing "Allow this tool call?")

---

## Example Patterns

**User:** "Fix the bug in api.py"

**Clawdbot:**
```
Spawning Claude Code session for this...

[Runs wingman script]

✅ Session started: vsr-bug-fix
📂 Directory: ~/code/semantic-router
🎯 Task: Fix bug in api.py
```

**User:** "What's the status?"

**Clawdbot:**
```bash
tmux capture-pane -t vsr-bug-fix -p -S -50
```

Then summarize: "Claude Code is running tests now, 8/10 passing"

**User:** "Tell it to commit the changes"

**Clawdbot:**
```bash
~/code/claude-code-orchestrator/claude-wingman.sh \
  --session vsr-bug-fix \
  --workdir ~/code/semantic-router \
  --prompt "Commit the changes with a descriptive message"
```

## Commands Reference

### Start New Session
```bash
~/code/claude-code-orchestrator/claude-wingman.sh \
  --session <name> \
  --workdir <dir> \
  --prompt "<task>"
```

### Send Command to Existing Session
```bash
~/code/claude-code-orchestrator/claude-wingman.sh \
  --session <existing-session> \
  --workdir <same-dir> \
  --prompt "<new command>"
```

### Monitor Session Progress
```bash
tmux capture-pane -t <session-name> -p -S -100
```

### List All Active Sessions
```bash
tmux ls
```

Filter for Claude Code sessions:
```bash
tmux ls | grep -E "(vsr|clawdbot|proxy|claude)"
```

### View Auto-Approver Log (if needed)
```bash
cat /tmp/auto-approver-<session-name>.log
```

### Kill Session When Done
```bash
tmux kill-session -t <session-name>
```

### Attach Manually (for user)
```bash
tmux attach -t <session-name>
# Detach: Ctrl+B, then D
```

---

## Roadmap: Multi-Session Dashboard (Coming Soon)

**Planned features:**

### `wingman dashboard`
Shows all active Claude Code sessions:
```
┌─────────────────────────────────────────────────────────┐
│ Active Claude Code Sessions                             │
├─────────────────┬──────────────────────┬────────────────┤
│ Session         │ Directory            │ Status         │
├─────────────────┼──────────────────────┼────────────────┤
│ vsr-issue-1131  │ ~/code/semantic-...  │ ✅ Working     │
│ clawdbot-feat   │ ~/code/clawdbot      │ ⏳ Waiting approval │
│ proxy-refactor  │ ~/code/claude-co...  │ ❌ Error       │
└─────────────────┴──────────────────────┴────────────────┘

Total: 3 sessions | Working: 1 | Waiting: 1 | Error: 1
```

### `wingman status <session>`
Detailed status for a specific session:
```
Session: vsr-issue-1131
Directory: ~/code/semantic-router
Started: 2h 15m ago
Last activity: 30s ago
Status: ✅ Working
Current task: Running pytest tests
Progress: 8/10 tests passing
```

### Session Registry
- Persistent tracking (survives Clawdbot restarts)
- JSON file storing session metadata
- Auto-cleanup of dead sessions

**For now:** Use tmux commands directly, but always via the wingman script for sending commands!

## Workflow

1. **User requests coding work** (fix bug, add feature, refactor, etc.)
2. **Clawdbot spawns Claude Code** via orchestrator script
3. **Auto-approver handles permissions** in background
4. **Clawdbot monitors and reports** progress
5. **User can attach anytime** to see/control directly
6. **Claude Code does the work** autonomously ✅

## 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 Orchestrator

✅ **Use orchestrator for:**
- Heavy code generation/refactoring
- Multi-file changes
- Long-running tasks
- Repetitive coding work

❌ **Don't use orchestrator for:**
- Quick file reads
- Simple edits
- When conversation is needed
- Planning/design discussions

### Session Naming

Use descriptive names:
- `vsr-issue-1131` - specific issue work
- `vsr-feature-auth` - feature development
- `project-bugfix-X` - bug fixes

## Troubleshooting

### Prompt Not Submitting
The orchestrator 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`:

```markdown
### 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

---

## 🔔 Approval Handling (WhatsApp Integration)

The master monitor daemon sends WhatsApp notifications when sessions need approval. Handle them with these commands:

### Approve Commands (from WhatsApp)

When you receive an approval notification, respond with:

**Clawdbot parses your message and runs:**
```bash
# Approve once
~/code/claude-code-orchestrator/lib/handle-approval.sh approve <session-name>

# Approve all similar (always)
~/code/claude-code-orchestrator/lib/handle-approval.sh always <session-name>

# Deny
~/code/claude-code-orchestrator/lib/handle-approval.sh deny <session-name>
```

### Example WhatsApp Flow

**Notification received:**
```
🔒 Session 'vsr-bugfix' needs approval

Bash(rm -rf ./build && npm run build)

Reply with:
• approve vsr-bugfix - Allow once
• always vsr-bugfix - Allow all similar
• deny vsr-bugfix - Reject
```

**You reply:** "approve vsr-bugfix"

**Clawdbot:**
```bash
~/code/claude-code-orchestrator/lib/handle-approval.sh approve vsr-bugfix
```

**Response:** "✓ Session 'vsr-bugfix' approved (once)"

### Start the Monitor Daemon

```bash
# Start monitoring all sessions (reads config from ~/.clawdbot/clawdbot.json)
~/code/claude-code-orchestrator/master-monitor.sh &

# With custom intervals
~/code/claude-code-orchestrator/master-monitor.sh --poll-interval 5 --reminder-interval 120 &

# Check if running
cat /tmp/claude-orchestrator/master-monitor.pid

# View logs
tail -f /tmp/claude-orchestrator/master-monitor.log

# Stop the daemon
kill $(cat /tmp/claude-orchestrator/master-monitor.pid)
```

No environment variables needed - phone and webhook token are read from Clawdbot config.

「AI 智能体」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。