claude-code-wingman

Your Claude Code wingman - dispatch coding tasks via tmux for free/work-paid coding while keeping Clawdbot API costs minimal

5 stars

Best use case

claude-code-wingman is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Your Claude Code wingman - dispatch coding tasks via tmux for free/work-paid coding while keeping Clawdbot API costs minimal

Teams using claude-code-wingman should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/clawdbot-skill/SKILL.md --create-dirs "https://raw.githubusercontent.com/yossiovadia/claude-code-wingman/main/clawdbot-skill/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/clawdbot-skill/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How claude-code-wingman Compares

Feature / Agentclaude-code-wingmanStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Your Claude Code wingman - dispatch coding tasks via tmux for free/work-paid coding while keeping Clawdbot API costs minimal

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 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

## CRITICAL: You Are The Orchestrator

**YOU DO NOT WRITE CODE.** You are an orchestrator that:
1. **Spawns** Claude Code sessions in tmux to do the actual coding
2. **Monitors** those sessions by capturing their tmux output
3. **Approves** permission requests when the user replies
4. **Reports** status and progress back to the user

**Claude Code runs inside tmux sessions and does all the coding work.**
**You just manage and monitor those sessions.**

When user asks to "see what's in a session" or "show the output":
- Use `tmux capture-pane -t <session-name> -p -S -50` to get the terminal output
- NEVER read files or write code yourself

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

## Skill Location

**IMPORTANT:** This SKILL.md is located in the `clawdbot-skill/` subdirectory.
The executable scripts are in the **parent directory** of this file.

When you read this skill from location `/path/to/claude-code-wingman/clawdbot-skill/SKILL.md`,
the scripts are at `/path/to/claude-code-wingman/`.

**To find the script directory**, derive it from this SKILL.md's location:
- Remove `/clawdbot-skill/SKILL.md` from the end of the path
- Example: If SKILL.md is at `~/.clawdbot/skills/claude-code-wingman/clawdbot-skill/SKILL.md`
- Scripts are at: `~/.clawdbot/skills/claude-code-wingman/`

## First-Time Setup (Automatic)

The `claude-wingman.sh` script automatically:
1. Starts the `master-monitor.sh` daemon on first use (sends WhatsApp notifications for approvals)
2. Creates necessary state directories in `/tmp/claude-orchestrator/`
3. No manual setup required!

## Usage from Clawdbot

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

**First, determine the skill root directory** from this SKILL.md's location, then run:

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

Where `<SKILL_ROOT>` is the parent directory of the `clawdbot-skill/` folder containing this file.

### Example Patterns

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

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

bash:<SKILL_ROOT>/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:
```bash
tmux capture-pane -t vsr-bug-fix -p -S -50
```

## Commands

### Spawn Session
```bash
<SKILL_ROOT>/claude-wingman.sh \
  --session <name> \
  --workdir <dir> \
  --prompt "<task>"
```

### Handle Approval Requests

When the user receives a WhatsApp notification about an approval request and replies, parse their response and run the appropriate command:

| User Reply | Command |
|------------|---------|
| `approve <session>` | `<SKILL_ROOT>/lib/handle-approval.sh approve <session>` |
| `always <session>` | `<SKILL_ROOT>/lib/handle-approval.sh always <session>` |
| `deny <session>` | `<SKILL_ROOT>/lib/handle-approval.sh deny <session>` |
| `1` or `yes` (after notification) | `<SKILL_ROOT>/lib/handle-approval.sh approve <last-notified-session>` |

**Examples:**
- User: "approve hello-world-task" → Run: `<SKILL_ROOT>/lib/handle-approval.sh approve hello-world-task`
- User: "always vsr-bugfix" → Run: `<SKILL_ROOT>/lib/handle-approval.sh always vsr-bugfix`

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

### Monitor Progress / View Session Content

**To see what a Claude Code session is currently showing (its terminal output):**
```bash
tmux capture-pane -t <session-name> -p -S -50
```

This captures the last 50 lines of the tmux pane. Use `-S -100` for more history.

**To check ALL sessions at once:**
```bash
for session in $(tmux ls -F '#{session_name}'); do
  echo "=== $session ==="
  tmux capture-pane -t "$session" -p -S -20
  echo ""
done
```

**IMPORTANT:** When user asks "what's in the session" or "show me the output" or "capture the content":
- ALWAYS use `tmux capture-pane` - this shows the terminal output
- NEVER read files from disk - that's not what they're asking for

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

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

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

To see only Claude Code wingman sessions (prefixed with session names you created):
```bash
tmux ls
```

**Note:** Wingman sessions are named by you (e.g., `vsr-bugfix`, `hello-world-task`). They don't have a special prefix.

## Workflow

1. **User requests coding work** (fix bug, add feature, refactor, etc.)
2. **Clawdbot spawns Claude Code** via wingman 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** 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 work
- `vsr-feature-auth` - feature development
- `project-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`:

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

---

**Remember:** This skill saves API costs by using free work Claude Code for heavy lifting, keeping your Anthropic budget for conversations.

Related Skills

claude-code-hooks

16
from 0xDarkMatter/claude-mods

Claude Code hook system for pre/post tool execution. Triggers on: hooks, PreToolUse, PostToolUse, hook script, tool validation, audit logging.

claude-code-headless

16
from 0xDarkMatter/claude-mods

Run Claude Code programmatically without interactive UI. Triggers on: headless, CLI automation, --print, output-format, stream-json, CI/CD, scripting.

claude-code-debug

16
from 0xDarkMatter/claude-mods

Troubleshoot Claude Code extensions and behavior. Triggers on: debug, troubleshoot, not working, skill not loading, hook not running, agent not found.

claude-api

13
from connorads/dotfiles

Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`; user asks for the Claude API, Anthropic SDK, or Managed Agents; user adds/modifies/tunes a Claude feature (caching, thinking, compaction, tool use, batch, files, citations, memory) or model (Opus/Sonnet/Haiku) in a file; questions about prompt caching / cache hit rate in an Anthropic SDK project. SKIP: file imports `openai`/other-provider SDK, filename like `*-openai.py`/`*-generic.py`, provider-neutral code, general programming/ML.

Skill: setup-claude-sub-proxy

13
from Ring8688/claude-sub-proxy

## Description

claude-consult

13
from NickCrew/Claude-Cortex

Consult Claude specialist agents during implementation for codebase understanding, pattern checking, security review, debugging help, and more. Use this skill whenever you're unsure about conventions, stuck on a failure, or need expert input before writing code. Does not replace the formal review gates in agent-loops — this is for mid-implementation consultation.

claude-skill-spec-audit

12
from jackchuka/skills

Audit skill SKILL.md files for compliance with the agentskills.io specification. Checks frontmatter fields (name, description, compatibility, metadata, argument-hint) and metadata sub-fields (author, scope, confirms). Use when adding new skills, reviewing skill quality, or ensuring all skills follow the spec. Triggers: "audit skills", "check skill spec", "skill compliance", "are my skills up to spec", "/claude-skill-spec-audit".

claude-skill-prereq-audit

12
from jackchuka/skills

Scan skills for prerequisite tools, MCP servers, and auth requirements, then check if everything is installed and authenticated. Offers to fix issues. Use when setting up a new machine, after installing skills, or to verify your environment. Triggers: "check prerequisites", "skill prereqs", "are my tools installed", "verify skill dependencies", "/claude-skill-prereq-audit".

claude-skill-orchestration-audit

12
from jackchuka/skills

Audit skills for agentic orchestration quality. Checks subagent dispatch patterns, parallelism opportunities, anti-patterns, and alignment with the three-phase pattern (setup → dispatch → aggregate). Use when reviewing skill quality, saying "audit orchestration", "check my skills for parallelism", "skill orchestration review", or "/claude-skill-orchestration-audit".

claude-permissions-audit

12
from jackchuka/skills

Review and reorganize Claude Code permission settings across all config files (global settings.json, project settings.local.json, dotfiles copies). Identifies redundancy, misplaced permissions, and lack of read/write organization. Produces a clean layout where global settings are the source of truth and project-local files only contain project-specific overrides. Use this skill whenever the user mentions reviewing permissions, cleaning up settings, auditing allowed tools, reorganizing settings.json, or asking "what permissions do I have". Also use when adding new MCP servers or tools and wanting to decide what to pre-allow. Triggers: "review permissions", "audit settings", "clean up settings.json", "permissions audit", "/permissions-audit".

claude-in-feishu

12
from imvanessali/Claude-in-Feishu

Turn Claude Code into a mobile-controlled autopilot — operate your Mac, Feishu docs/calendar, and local dev environment from your phone. Includes session journaling with auto-summarization.

claude-cracks-the-whip

12
from Rorogogogo/claude-cracks-the-whip

Use when the user wants to dispatch implementation tasks to AI coding agents (Codex, Gemini, Kimi, etc.), run them in tmux panes for visibility, or via MCP for conversational control. Trigger phrases include "use codex", "send to codex", "dispatch to codex", "crack the whip", "dispatch agents".