[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FTV7W5PW0ZDDRW56VZ64KX":3,"skill-same:01M6FTV7W5PW0ZDDRW56VZ64KX":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6FTV7W5PW0ZDDRW56VZ64KX","coding-agent",null,"Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fkesslerio\u002Fmulti-coding-agent\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],"coding agent","coding","cli","codex","codex cli","run","code","pi","process","opencode","control","pi coding agent","via","programmatic","2026-11-10 10:12:30",false,"---\nname: coding-agent\ndescription: Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.\nmetadata: {\"moltbot\":{\"emoji\":\"?\",\"requires\":{\"anyBins\":[\"claude\",\"codex\",\"opencode\",\"pi\"]}}}\n---\n\n# Coding Agent (bash-first)\n\nUse **bash** (with optional background mode) for all coding agent work. Simple and effective.\n\n## ⚠️ PTY Mode Required!\n\nCoding agents (Codex, Claude Code, Pi) are **interactive terminal applications** that need a pseudo-terminal (PTY) to work correctly. Without PTY, you'll get broken output, missing colors, or the agent may hang.\n\n**Always use `pty:true`** when running coding agents:\n\n```bash\n# ✅ Correct - with PTY\nbash pty:true command:\"codex exec 'Your prompt'\"\n\n# ❌ Wrong - no PTY, agent may break\nbash command:\"codex exec 'Your prompt'\"\n```\n\n### Bash Tool Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `command` | string | The shell command to run |\n| `pty` | boolean | **Use for coding agents!** Allocates a pseudo-terminal for interactive CLIs |\n| `workdir` | string | Working directory (agent sees only this folder's context) |\n| `background` | boolean | Run in background, returns sessionId for monitoring |\n| `timeout` | number | Timeout in seconds (kills process on expiry) |\n| `elevated` | boolean | Run on host instead of sandbox (if allowed) |\n\n### Process Tool Actions (for background sessions)\n\n| Action | Description |\n|--------|-------------|\n| `list` | List all running\u002Frecent sessions |\n| `poll` | Check if session is still running |\n| `log` | Get session output (with optional offset\u002Flimit) |\n| `write` | Send raw data to stdin |\n| `submit` | Send data + newline (like typing and pressing Enter) |\n| `send-keys` | Send key tokens or hex bytes |\n| `paste` | Paste text (with optional bracketed mode) |\n| `kill` | Terminate the session |\n\n---\n\n## Quick Start: One-Shot Tasks\n\nFor quick prompts\u002Fchats, create a temp git repo and run:\n\n```bash\n# Quick chat (Codex needs a git repo!)\nSCRATCH=$(mktemp -d) && cd $SCRATCH && git init && codex exec \"Your prompt here\"\n\n# Or in a real project - with PTY!\nbash pty:true workdir:~\u002FProjects\u002Fmyproject command:\"codex exec 'Add error handling to the API calls'\"\n```\n\n**Why git init?** Codex refuses to run outside a trusted git directory. Creating a temp repo solves this for scratch work.\n\n---\n\n## The Pattern: workdir + background + pty\n\nFor longer tasks, use background mode with PTY:\n\n```bash\n# Start agent in target directory (with PTY!)\nbash pty:true workdir:~\u002Fproject background:true command:\"codex exec --full-auto 'Build a snake game'\"\n# Returns sessionId for tracking\n\n# Monitor progress\nprocess action:log sessionId:XXX\n\n# Check if done\nprocess action:poll sessionId:XXX\n\n# Send input (if agent asks a question)\nprocess action:write sessionId:XXX data:\"y\"\n\n# Submit with Enter (like typing \"yes\" and pressing Enter)\nprocess action:submit sessionId:XXX data:\"yes\"\n\n# Kill if needed\nprocess action:kill sessionId:XXX\n```\n\n**Why workdir matters:** Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md ?).\n\n---\n\n## Fallback Strategy\n\nWhen primary agent hits limits, fall back in order:\n\n| Priority | Agent | When to Use |\n|----------|-------|-------------|\n| 1 | **Codex** | Default for coding tasks |\n| 2 | **Claude Code** | Codex usage limits or errors |\n| 3 | **Gemini** | Claude unavailable or for Gemini-specific tasks |\n| 4 | **Pi\u002FOpenCode** | All above unavailable |\n\n**Signs you need to fall back:**\n- \"You've hit your usage limit\"\n- Rate limit \u002F 429 errors\n- Model overloaded messages\n\n---\n\n## Codex CLI\n\n**Model:** `gpt-5.2-codex` is the default (set in ~\u002F.codex\u002Fconfig.toml)\n\n### Flags\n\n| Flag | Effect |\n|------|--------|\n| `exec \"prompt\"` | One-shot execution, exits when done |\n| `--full-auto` | Sandboxed but auto-approves in workspace |\n| `--yolo` | NO sandbox, NO approvals (fastest, most dangerous) |\n\n### Building\u002FCreating\n```bash\n# Quick one-shot (auto-approves) - remember PTY!\nbash pty:true workdir:~\u002Fproject command:\"codex exec --full-auto 'Build a dark mode toggle'\"\n\n# Background for longer work\nbash pty:true workdir:~\u002Fproject background:true command:\"codex --yolo 'Refactor the auth module'\"\n```\n\n### Reviewing PRs\n\n**⚠️ CRITICAL: Never review PRs in Moltbot's own project folder!**\nClone to temp folder or use git worktree.\n\n```bash\n# Clone to temp for safe review\nREVIEW_DIR=$(mktemp -d)\ngit clone https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git $REVIEW_DIR\ncd $REVIEW_DIR && gh pr checkout 130\nbash pty:true workdir:$REVIEW_DIR command:\"codex review --base origin\u002Fmain\"\n# Clean up after: trash $REVIEW_DIR\n\n# Or use git worktree (keeps main intact)\ngit worktree add \u002Ftmp\u002Fpr-130-review pr-130-branch\nbash pty:true workdir:\u002Ftmp\u002Fpr-130-review command:\"codex review --base main\"\n```\n\n### Batch PR Reviews (parallel army!)\n```bash\n# Fetch all PR refs first\ngit fetch origin '+refs\u002Fpull\u002F*\u002Fhead:refs\u002Fremotes\u002Forigin\u002Fpr\u002F*'\n\n# Deploy the army - one Codex per PR (all with PTY!)\nbash pty:true workdir:~\u002Fproject background:true command:\"codex exec 'Review PR #86. git diff origin\u002Fmain...origin\u002Fpr\u002F86'\"\nbash pty:true workdir:~\u002Fproject background:true command:\"codex exec 'Review PR #87. git diff origin\u002Fmain...origin\u002Fpr\u002F87'\"\n\n# Monitor all\nprocess action:list\n\n# Post results to GitHub\ngh pr comment \u003CPR#> --body \"\u003Creview content>\"\n```\n\n---\n\n## Claude Code\n\n**Fallback when Codex unavailable.**\n\n| Codex | Claude Equivalent |\n|-------|-------------------|\n| `codex exec \"prompt\"` | `claude -p \"prompt\"` |\n| `codex --full-auto` | `claude -p --permission-mode acceptEdits` |\n| `codex --yolo` | `claude -p --dangerously-skip-permissions` |\n\n```bash\n# Non-interactive\nclaude -p \"Add error handling to src\u002Fapi.ts\"\nclaude -p --permission-mode acceptEdits \"Fix the bug\"\n\n# Interactive (with PTY)\nbash pty:true workdir:~\u002Fproject command:\"claude 'Your task'\"\n```\n\n**Detailed docs:** See `references\u002Fclaude-code.md`\n\n---\n\n## Gemini CLI\n\n**Alternative fallback with different model family.**\n\n| Codex | Gemini Equivalent |\n|-------|-------------------|\n| `codex exec \"prompt\"` | `gemini \"prompt\"` |\n| `codex --full-auto` | `gemini --approval-mode auto_edit \"prompt\"` |\n| `codex --yolo` | `gemini -y \"prompt\"` |\n\n```bash\n# Non-interactive (one-shot)\ngemini \"Add error handling to src\u002Fapi.ts\"\ngemini -y \"Build a REST API\"  # yolo mode\n\n# Interactive (with PTY)\nbash pty:true workdir:~\u002Fproject command:\"gemini -i 'Your task'\"\n```\n\n**Detailed docs:** See `references\u002Fgemini-cli.md`\n\n---\n\n## OpenCode\n\n```bash\nbash pty:true workdir:~\u002Fproject command:\"opencode run 'Your task'\"\n```\n\n---\n\n## Pi Coding Agent\n\n```bash\n# Install: npm install -g @mariozechner\u002Fpi-coding-agent\nbash pty:true workdir:~\u002Fproject command:\"pi 'Your task'\"\n\n# Non-interactive mode (PTY still recommended)\nbash pty:true command:\"pi -p 'Summarize src\u002F'\"\n\n# Different provider\u002Fmodel\nbash pty:true command:\"pi --provider openai --model gpt-4o-mini -p 'Your task'\"\n```\n\n**Note:** Pi now has Anthropic prompt caching enabled (PR #584, merged Jan 2026)!\n\n---\n\n## Parallel Issue Fixing with git worktrees\n\nFor fixing multiple issues in parallel, use git worktrees:\n\n```bash\n# 1. Create worktrees for each issue\ngit worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\ngit worktree add -b fix\u002Fissue-99 \u002Ftmp\u002Fissue-99 main\n\n# 2. Launch Codex in each (background + PTY!)\nbash pty:true workdir:\u002Ftmp\u002Fissue-78 background:true command:\"pnpm install && codex --yolo 'Fix issue #78: \u003Cdescription>. Commit and push.'\"\nbash pty:true workdir:\u002Ftmp\u002Fissue-99 background:true command:\"pnpm install && codex --yolo 'Fix issue #99: \u003Cdescription>. Commit and push.'\"\n\n# 3. Monitor progress\nprocess action:list\nprocess action:log sessionId:XXX\n\n# 4. Create PRs after fixes\ncd \u002Ftmp\u002Fissue-78 && git push -u origin fix\u002Fissue-78\ngh pr create --repo user\u002Frepo --head fix\u002Fissue-78 --title \"fix: ...\" --body \"...\"\n\n# 5. Cleanup\ngit worktree remove \u002Ftmp\u002Fissue-78\ngit worktree remove \u002Ftmp\u002Fissue-99\n```\n\n---\n\n## tmux Orchestration (Alternative)\n\nFor advanced multi-agent control, use the **tmux skill** instead of bash background mode.\n\n### When to Use tmux vs bash background\n\n| Use Case | Recommended |\n|----------|-------------|\n| Quick one-shot tasks | `bash pty:true` |\n| Long-running with monitoring | `bash background:true` |\n| Multiple parallel agents | **tmux** |\n| Agent forking (context transfer) | **tmux** |\n| Session persistence (survives disconnects) | **tmux** |\n| Interactive debugging (pdb, REPL) | **tmux** |\n\n### Quick Example\n\n```bash\nSOCKET=\"${TMPDIR:-\u002Ftmp}\u002Fcoding-agents.sock\"\n\n# Create sessions for parallel work\ntmux -S \"$SOCKET\" new-session -d -s agent-1 -c \u002Ftmp\u002Fworktree-1\ntmux -S \"$SOCKET\" new-session -d -s agent-2 -c \u002Ftmp\u002Fworktree-2\n\n# Launch agents\ntmux -S \"$SOCKET\" send-keys -t agent-1 \"codex --yolo 'Fix issue #1'\" Enter\ntmux -S \"$SOCKET\" send-keys -t agent-2 \"claude 'Fix issue #2'\" Enter\n\n# Monitor (check for shell prompt to detect completion)\ntmux -S \"$SOCKET\" capture-pane -p -t agent-1 -S -100\n\n# Attach to watch live\ntmux -S \"$SOCKET\" attach -t agent-1\n```\n\n### Agent Forking\n\nTransfer context between agents (e.g., plan with Codex, execute with Claude):\n\n```bash\n# Capture context from current agent\nCONTEXT=$(tmux -S \"$SOCKET\" capture-pane -p -t planner -S -500)\n\n# Fork to new agent with context\ntmux -S \"$SOCKET\" new-session -d -s executor\ntmux -S \"$SOCKET\" send-keys -t executor \"claude -p 'Based on this plan: $CONTEXT\n\nExecute step 1.'\" Enter\n```\n\n**Full docs:** See the `tmux` skill for socket conventions, wait-for-text helpers, and cleanup.\n\n---\n\n## ⚠️ Rules\n\n1. **Always use pty:true** - coding agents need a terminal!\n2. **Respect tool choice** - if user asks for Codex, use Codex.\n   - Orchestrator mode: do NOT hand-code patches yourself.\n   - If an agent fails\u002Fhangs, respawn it or ask the user for direction, but don't silently take over.\n3. **Be patient** - don't kill sessions because they're \"slow\"\n4. **Monitor with process:log** - check progress without interfering\n5. **--full-auto for building** - auto-approves changes\n6. **vanilla for reviewing** - no special flags needed\n7. **Parallel is OK** - run many Codex processes at once for batch work\n8. **NEVER start Codex in ~\u002Fclawd\u002F** - it'll read your soul docs and get weird ideas about the org chart!\n9. **NEVER checkout branches in ~\u002FProjects\u002Fmoltbot\u002F** - that's the LIVE Moltbot instance!\n\n---\n\n## Progress Updates (Critical)\n\nWhen you spawn coding agents in the background, keep the user in the loop.\n\n- Send 1 short message when you start (what's running + where).\n- Then only update again when something changes:\n  - a milestone completes (build finished, tests passed)\n  - the agent asks a question \u002F needs input\n  - you hit an error or need user action\n  - the agent finishes (include what changed + where)\n- If you kill a session, immediately say you killed it and why.\n\nThis prevents the user from seeing only \"Agent failed before reply\" and having no idea what happened.\n\n---\n\n## Auto-Notify on Completion\n\nFor long-running background tasks, append a wake trigger to your prompt so Moltbot gets notified immediately when the agent finishes (instead of waiting for the next heartbeat):\n\n```\n... your task here.\n\nWhen completely finished, run this command to notify me:\nmoltbot gateway wake --text \"Done: [brief summary of what was built]\" --mode now\n```\n\n**Example:**\n```bash\nbash pty:true workdir:~\u002Fproject background:true command:\"codex --yolo exec 'Build a REST API for todos.\n\nWhen completely finished, run: moltbot gateway wake --text \\\"Done: Built todos REST API with CRUD endpoints\\\" --mode now'\"\n```\n\nThis triggers an immediate wake event — Skippy gets pinged in seconds, not 10 minutes.\n\n---\n\n## Learnings (Jan 2026)\n\n- **PTY is essential:** Coding agents are interactive terminal apps. Without `pty:true`, output breaks or agent hangs.\n- **Git repo required:** Codex won't run outside a git directory. Use `mktemp -d && git init` for scratch work.\n- **exec is your friend:** `codex exec \"prompt\"` runs and exits cleanly - perfect for one-shots.\n- **submit vs write:** Use `submit` to send input + Enter, `write` for raw data without newline.\n- **Sass works:** Codex responds well to playful prompts. Asked it to write a haiku about being second fiddle to a space lobster, got: *\"Second chair, I code \u002F Space lobster sets the tempo \u002F Keys glow, I follow\"* ?\n","# Coding Agent (bash-first)\n\nUse **bash** (with optional background mode) for all coding agent work. Simple and effective.\n\n## ⚠️ PTY Mode Required!\n\nCoding agents (Codex, Claude Code, Pi) are **interactive terminal applications** that need a pseudo-terminal (PTY) to work correctly. Without PTY, you'll get broken output, missing colors, or the agent may hang.\n\n**Always use `pty:true`** when running coding agents:\n\n```bash\n# ✅ Correct - with PTY\nbash pty:true command:\"codex exec 'Your prompt'\"\n\n# ❌ Wrong - no PTY, agent may break\nbash command:\"codex exec 'Your prompt'\"\n```\n\n### Bash Tool Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `command` | string | The shell command to run |\n| `pty` | boolean | **Use for coding agents!** Allocates a pseudo-terminal for interactive CLIs |\n| `workdir` | string | Working directory (agent sees only this folder's context) |\n| `background` | boolean | Run in background, returns sessionId for monitoring |\n| `timeout` | number | Timeout in seconds (kills process on expiry) |\n| `elevated` | boolean | Run on host instead of sandbox (if allowed) |\n\n### Process Tool Actions (for background sessions)\n\n| Action | Description |\n|--------|-------------|\n| `list` | List all running\u002Frecent sessions |\n| `poll` | Check if session is still running |\n| `log` | Get session output (with optional offset\u002Flimit) |\n| `write` | Send raw data to stdin |\n| `submit` | Send data + newline (like typing and pressing Enter) |\n| `send-keys` | Send key tokens or hex bytes |\n| `paste` | Paste text (with optional bracketed mode) |\n| `kill` | Terminate the session |\n\n---\n\n## Quick Start: One-Shot Tasks\n\nFor quick prompts\u002Fchats, create a temp git repo and run:\n\n```bash\n# Quick chat (Codex needs a git repo!)\nSCRATCH=$(mktemp -d) && cd $SCRATCH && git init && codex exec \"Your prompt here\"\n\n# Or in a real project - with PTY!\nbash pty:true workdir:~\u002FProjects\u002Fmyproject command:\"codex exec 'Add error handling to the API calls'\"\n```\n\n**Why git init?** Codex refuses to run outside a trusted git directory. Creating a temp repo solves this for scratch work.\n\n---\n\n## The Pattern: workdir + background + pty\n\nFor longer tasks, use background mode with PTY:\n\n```bash\n# Start agent in target directory (with PTY!)\nbash pty:true workdir:~\u002Fproject background:true command:\"codex exec --full-auto 'Build a snake game'\"\n# Returns sessionId for tracking\n\n# Monitor progress\nprocess action:log sessionId:XXX\n\n# Check if done\nprocess action:poll sessionId:XXX\n\n# Send input (if agent asks a question)\nprocess action:write sessionId:XXX data:\"y\"\n\n# Submit with Enter (like typing \"yes\" and pressing Enter)\nprocess action:submit sessionId:XXX data:\"yes\"\n\n# Kill if needed\nprocess action:kill sessionId:XXX\n```\n\n**Why workdir matters:** Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md ?).\n\n---\n\n## Fallback Strategy\n\nWhen primary agent hits limits, fall back in order:\n\n| Priority | Agent | When to Use |\n|----------|-------|-------------|\n| 1 | **Codex** | Default for coding tasks |\n| 2 | **Claude Code** | Codex usage limits or errors |\n| 3 | **Gemini** | Claude unavailable or for Gemini-specific tasks |\n| 4 | **Pi\u002FOpenCode** | All above unavailable |\n\n**Signs you need to fall back:**\n- \"You've hit your usage limit\"\n- Rate limit \u002F 429 errors\n- Model overloaded messages\n\n---\n\n## Codex CLI\n\n**Model:** `gpt-5.2-codex` is the default (set in ~\u002F.codex\u002Fconfig.toml)\n\n### Flags\n\n| Flag | Effect |\n|------|--------|\n| `exec \"prompt\"` | One-shot execution, exits when done |\n| `--full-auto` | Sandboxed but auto-approves in workspace |\n| `--yolo` | NO sandbox, NO approvals (fastest, most dangerous) |\n\n### Building\u002FCreating\n```bash\n# Quick one-shot (auto-approves) - remember PTY!\nbash pty:true workdir:~\u002Fproject command:\"codex exec --full-auto 'Build a dark mode toggle'\"\n\n# Background for longer work\nbash pty:true workdir:~\u002Fproject background:true command:\"codex --yolo 'Refactor the auth module'\"\n```\n\n### Reviewing PRs\n\n**⚠️ CRITICAL: Never review PRs in Moltbot's own project folder!**\nClone to temp folder or use git worktree.\n\n```bash\n# Clone to temp for safe review\nREVIEW_DIR=$(mktemp -d)\ngit clone https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git $REVIEW_DIR\ncd $REVIEW_DIR && gh pr checkout 130\nbash pty:true workdir:$REVIEW_DIR command:\"codex review --base origin\u002Fmain\"\n# Clean up after: trash $REVIEW_DIR\n\n# Or use git worktree (keeps main intact)\ngit worktree add \u002Ftmp\u002Fpr-130-review pr-130-branch\nbash pty:true workdir:\u002Ftmp\u002Fpr-130-review command:\"codex review --base main\"\n```\n\n### Batch PR Reviews (parallel army!)\n```bash\n# Fetch all PR refs first\ngit fetch origin '+refs\u002Fpull\u002F*\u002Fhead:refs\u002Fremotes\u002Forigin\u002Fpr\u002F*'\n\n# Deploy the army - one Codex per PR (all with PTY!)\nbash pty:true workdir:~\u002Fproject background:true command:\"codex exec 'Review PR #86. git diff origin\u002Fmain...origin\u002Fpr\u002F86'\"\nbash pty:true workdir:~\u002Fproject background:true command:\"codex exec 'Review PR #87. git diff origin\u002Fmain...origin\u002Fpr\u002F87'\"\n\n# Monitor all\nprocess action:list\n\n# Post results to GitHub\ngh pr comment \u003CPR#> --body \"\u003Creview content>\"\n```\n\n---\n\n## Claude Code\n\n**Fallback when Codex unavailable.**\n\n| Codex | Claude Equivalent |\n|-------|-------------------|\n| `codex exec \"prompt\"` | `claude -p \"prompt\"` |\n| `codex --full-auto` | `claude -p --permission-mode acceptEdits` |\n| `codex --yolo` | `claude -p --dangerously-skip-permissions` |\n\n```bash\n# Non-interactive\nclaude -p \"Add error handling to src\u002Fapi.ts\"\nclaude -p --permission-mode acceptEdits \"Fix the bug\"\n\n# Interactive (with PTY)\nbash pty:true workdir:~\u002Fproject command:\"claude 'Your task'\"\n```\n\n**Detailed docs:** See `references\u002Fclaude-code.md`\n\n---\n\n## Gemini CLI\n\n**Alternative fallback with different model family.**\n\n| Codex | Gemini Equivalent |\n|-------|-------------------|\n| `codex exec \"prompt\"` | `gemini \"prompt\"` |\n| `codex --full-auto` | `gemini --approval-mode auto_edit \"prompt\"` |\n| `codex --yolo` | `gemini -y \"prompt\"` |\n\n```bash\n# Non-interactive (one-shot)\ngemini \"Add error handling to src\u002Fapi.ts\"\ngemini -y \"Build a REST API\"  # yolo mode\n\n# Interactive (with PTY)\nbash pty:true workdir:~\u002Fproject command:\"gemini -i 'Your task'\"\n```\n\n**Detailed docs:** See `references\u002Fgemini-cli.md`\n\n---\n\n## OpenCode\n\n```bash\nbash pty:true workdir:~\u002Fproject command:\"opencode run 'Your task'\"\n```\n\n---\n\n## Pi Coding Agent\n\n```bash\n# Install: npm install -g @mariozechner\u002Fpi-coding-agent\nbash pty:true workdir:~\u002Fproject command:\"pi 'Your task'\"\n\n# Non-interactive mode (PTY still recommended)\nbash pty:true command:\"pi -p 'Summarize src\u002F'\"\n\n# Different provider\u002Fmodel\nbash pty:true command:\"pi --provider openai --model gpt-4o-mini -p 'Your task'\"\n```\n\n**Note:** Pi now has Anthropic prompt caching enabled (PR #584, merged Jan 2026)!\n\n---\n\n## Parallel Issue Fixing with git worktrees\n\nFor fixing multiple issues in parallel, use git worktrees:\n\n```bash\n# 1. Create worktrees for each issue\ngit worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\ngit worktree add -b fix\u002Fissue-99 \u002Ftmp\u002Fissue-99 main\n\n# 2. Launch Codex in each (background + PTY!)\nbash pty:true workdir:\u002Ftmp\u002Fissue-78 background:true command:\"pnpm install && codex --yolo 'Fix issue #78: \u003Cdescription>. Commit and push.'\"\nbash pty:true workdir:\u002Ftmp\u002Fissue-99 background:true command:\"pnpm install && codex --yolo 'Fix issue #99: \u003Cdescription>. Commit and push.'\"\n\n# 3. Monitor progress\nprocess action:list\nprocess action:log sessionId:XXX\n\n# 4. Create PRs after fixes\ncd \u002Ftmp\u002Fissue-78 && git push -u origin fix\u002Fissue-78\ngh pr create --repo user\u002Frepo --head fix\u002Fissue-78 --title \"fix: ...\" --body \"...\"\n\n# 5. Cleanup\ngit worktree remove \u002Ftmp\u002Fissue-78\ngit worktree remove \u002Ftmp\u002Fissue-99\n```\n\n---\n\n## tmux Orchestration (Alternative)\n\nFor advanced multi-agent control, use the **tmux skill** instead of bash background mode.\n\n### When to Use tmux vs bash background\n\n| Use Case | Recommended |\n|----------|-------------|\n| Quick one-shot tasks | `bash pty:true` |\n| Long-running with monitoring | `bash background:true` |\n| Multiple parallel agents | **tmux** |\n| Agent forking (context transfer) | **tmux** |\n| Session persistence (survives disconnects) | **tmux** |\n| Interactive debugging (pdb, REPL) | **tmux** |\n\n### Quick Example\n\n```bash\nSOCKET=\"${TMPDIR:-\u002Ftmp}\u002Fcoding-agents.sock\"\n\n# Create sessions for parallel work\ntmux -S \"$SOCKET\" new-session -d -s agent-1 -c \u002Ftmp\u002Fworktree-1\ntmux -S \"$SOCKET\" new-session -d -s agent-2 -c \u002Ftmp\u002Fworktree-2\n\n# Launch agents\ntmux -S \"$SOCKET\" send-keys -t agent-1 \"codex --yolo 'Fix issue #1'\" Enter\ntmux -S \"$SOCKET\" send-keys -t agent-2 \"claude 'Fix issue #2'\" Enter\n\n# Monitor (check for shell prompt to detect completion)\ntmux -S \"$SOCKET\" capture-pane -p -t agent-1 -S -100\n\n# Attach to watch live\ntmux -S \"$SOCKET\" attach -t agent-1\n```\n\n### Agent Forking\n\nTransfer context between agents (e.g., plan with Codex, execute with Claude):\n\n```bash\n# Capture context from current agent\nCONTEXT=$(tmux -S \"$SOCKET\" capture-pane -p -t planner -S -500)\n\n# Fork to new agent with context\ntmux -S \"$SOCKET\" new-session -d -s executor\ntmux -S \"$SOCKET\" send-keys -t executor \"claude -p 'Based on this plan: $CONTEXT\n\nExecute step 1.'\" Enter\n```\n\n**Full docs:** See the `tmux` skill for socket conventions, wait-for-text helpers, and cleanup.\n\n---\n\n## ⚠️ Rules\n\n1. **Always use pty:true** - coding agents need a terminal!\n2. **Respect tool choice** - if user asks for Codex, use Codex.\n   - Orchestrator mode: do NOT hand-code patches yourself.\n   - If an agent fails\u002Fhangs, respawn it or ask the user for direction, but don't silently take over.\n3. **Be patient** - don't kill sessions because they're \"slow\"\n4. **Monitor with process:log** - check progress without interfering\n5. **--full-auto for building** - auto-approves changes\n6. **vanilla for reviewing** - no special flags needed\n7. **Parallel is OK** - run many Codex processes at once for batch work\n8. **NEVER start Codex in ~\u002Fclawd\u002F** - it'll read your soul docs and get weird ideas about the org chart!\n9. **NEVER checkout branches in ~\u002FProjects\u002Fmoltbot\u002F** - that's the LIVE Moltbot instance!\n\n---\n\n## Progress Updates (Critical)\n\nWhen you spawn coding agents in the background, keep the user in the loop.\n\n- Send 1 short message when you start (what's running + where).\n- Then only update again when something changes:\n  - a milestone completes (build finished, tests passed)\n  - the agent asks a question \u002F needs input\n  - you hit an error or need user action\n  - the agent finishes (include what changed + where)\n- If you kill a session, immediately say you killed it and why.\n\nThis prevents the user from seeing only \"Agent failed before reply\" and having no idea what happened.\n\n---\n\n## Auto-Notify on Completion\n\nFor long-running background tasks, append a wake trigger to your prompt so Moltbot gets notified immediately when the agent finishes (instead of waiting for the next heartbeat):\n\n```\n... your task here.\n\nWhen completely finished, run this command to notify me:\nmoltbot gateway wake --text \"Done: [brief summary of what was built]\" --mode now\n```\n\n**Example:**\n```bash\nbash pty:true workdir:~\u002Fproject background:true command:\"codex --yolo exec 'Build a REST API for todos.\n\nWhen completely finished, run: moltbot gateway wake --text \\\"Done: Built todos REST API with CRUD endpoints\\\" --mode now'\"\n```\n\nThis triggers an immediate wake event — Skippy gets pinged in seconds, not 10 minutes.\n\n---\n\n## Learnings (Jan 2026)\n\n- **PTY is essential:** Coding agents are interactive terminal apps. Without `pty:true`, output breaks or agent hangs.\n- **Git repo required:** Codex won't run outside a git directory. Use `mktemp -d && git init` for scratch work.\n- **exec is your friend:** `codex exec \"prompt\"` runs and exits cleanly - perfect for one-shots.\n- **submit vs write:** Use `submit` to send input + Enter, `write` for raw data without newline.\n- **Sass works:** Codex responds well to playful prompts. Asked it to write a haiku about being second fiddle to a space lobster, got: *\"Second chair, I code \u002F Space lobster sets the tempo \u002F Keys glow, I follow\"* ?\n",{"name":5,"metadata":37,"description":7},{"moltbot":38},{"emoji":39,"requires":40},"?",{"anyBins":41},[42,21,27,25],"claude","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fkesslerio\u002Fmulti-coding-agent",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add kbarbel640-del\u002Fskills --skill coding-agent",{"tool":56,"command":57},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill coding-agent",{"tool":59,"command":60},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill coding-agent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fkesslerio\u002Fmulti-coding-agent\u002FSKILL.md",true,[64,70,74,78],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"_meta.json","REFERENCE","参考文档",291,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fkesslerio\u002Fmulti-coding-agent\u002F_meta.json",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"README.md",1987,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fkesslerio\u002Fmulti-coding-agent\u002FREADME.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fclaude-code.md",3989,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fkesslerio\u002Fmulti-coding-agent\u002Freferences\u002Fclaude-code.md",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fgemini-cli.md",3468,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fkesslerio\u002Fmulti-coding-agent\u002Freferences\u002Fgemini-cli.md",[83,109,133,150,155,175],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":32},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":32},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[116,92,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,97,132],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":32},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[140,141,142,143,144,145,146,93,147,130,132,148,92,149,30],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http",{"skillNo":151,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":32},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[143,142,141,140,30,145,146,93,144,130,132,147,148,92,149],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":32},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[162,163,164,165,166,167,168,169,170,171,172,173,174],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":32},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[182,183,184,185,93,186,187,43,188,148,189,190,191,192,193,106,194,195,196],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]