repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | { |
| #2 | "skillId": "coding-agent", |
| #3 | "name": "coding-agent", |
| #4 | "description": "Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.", |
| #5 | "category": "pump-protocol", |
| #6 | "path": "coding-agent/SKILL.md", |
| #7 | "url": "https://x402.wtf/api/skills/coding-agent", |
| #8 | "tags": [ |
| #9 | "coding", |
| #10 | "solana", |
| #11 | "agent" |
| #12 | ], |
| #13 | "requiredEnv": [], |
| #14 | "homepage": null, |
| #15 | "attestation": { |
| #16 | "status": "pending", |
| #17 | "isFormallyVerified": false, |
| #18 | "attestationPda": null, |
| #19 | "verificationTimestamp": null |
| #20 | }, |
| #21 | "markdown": "---\nname: coding-agent\ndescription: Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.\nmetadata: {\"clawdbot\":{\"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/recent sessions |\n| `poll` | Check if session is still running |\n| `log` | Get session output (with optional offset/limit) |\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/chats, 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:~/Projects/myproject 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:~/project 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## Codex CLI\n\n**Model:** `gpt-5.2-codex` is the default (set in ~/.codex/config.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/Creating\n```bash\n# Quick one-shot (auto-approves) - remember PTY!\nbash pty:true workdir:~/project command:\"codex exec --full-auto 'Build a dark mode toggle'\"\n\n# Background for longer work\nbash pty:true workdir:~/project background:true command:\"codex --yolo 'Refactor the auth module'\"\n```\n\n### Reviewing PRs\n\n**⚠️ CRITICAL: Never review PRs in Clawdbot'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://github.com/user/repo.git $REVIEW_DIR\ncd $REVIEW_DIR && gh pr checkout 130\nbash pty:true workdir:$REVIEW_DIR command:\"codex review --base origin/main\"\n# Clean up after: trash $REVIEW_DIR\n\n# Or use git worktree (keeps main intact)\ngit worktree add /tmp/pr-130-review pr-130-branch\nbash pty:true workdir:/tmp/pr-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/pull/*/head:refs/remotes/origin/pr/*'\n\n# Deploy the army - one Codex per PR (all with PTY!)\nbash pty:true workdir:~/project background:true command:\"codex exec 'Review PR #86. git diff origin/main...origin/pr/86'\"\nbash pty:true workdir:~/project background:true command:\"codex exec 'Review PR #87. git diff origin/main...origin/pr/87'\"\n\n# Monitor all\nprocess action:list\n\n# Post results to GitHub\ngh pr comment <PR#> --body \"<review content>\"\n```\n\n---\n\n## Claude Code\n\n```bash\n# With PTY for proper terminal output\nbash pty:true workdir:~/project command:\"claude 'Your task'\"\n\n# Background\nbash pty:true workdir:~/project background:true command:\"claude 'Your task'\"\n```\n\n---\n\n## OpenCode\n\n```bash\nbash pty:true workdir:~/project command:\"opencode run 'Your task'\"\n```\n\n---\n\n## Pi Coding Agent\n\n```bash\n# Install: npm install -g @mariozechner/pi-coding-agent\nbash pty:true workdir:~/project command:\"pi 'Your task'\"\n\n# Non-interactive mode (PTY still recommended)\nbash pty:true command:\"pi -p 'Summarize src/'\"\n\n# Different provider/model\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/issue-78 /tmp/issue-78 main\ngit worktree add -b fix/issue-99 /tmp/issue-99 main\n\n# 2. Launch Codex in each (background + PTY!)\nbash pty:true workdir:/tmp/issue-78 background:true command:\"pnpm install && codex --yolo 'Fix issue #78: <description>. Commit and push.'\"\nbash pty:true workdir:/tmp/issue-99 background:true command:\"pnpm install && codex --yolo 'Fix issue #99: <description>. Commit and push.'\"\n\n# 3. Monitor progress\nprocess action:list\nprocess action:log sessionId:XXX\n\n# 4. Create PRs after fixes\ncd /tmp/issue-78 && git push -u origin fix/issue-78\ngh pr create --repo user/repo --head fix/issue-78 --title \"fix: ...\" --body \"...\"\n\n# 5. Cleanup\ngit worktree remove /tmp/issue-78\ngit worktree remove /tmp/issue-99\n```\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/hangs, 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 ~/clawd/** - it'll read your soul docs and get weird ideas about the org chart!\n9. **NEVER checkout branches in ~/Projects/clawdbot/** - that's the LIVE Clawdbot 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 / 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 Clawdbot 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:\nclawdbot gateway wake --text \"Done: [brief summary of what was built]\" --mode now\n```\n\n**Example:**\n```bash\nbash pty:true workdir:~/project background:true command:\"codex --yolo exec 'Build a REST API for todos.\n\nWhen completely finished, run: clawdbot 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 / Space lobster sets the tempo / Keys glow, I follow\"* 🦞\n" |
| #22 | } |
| #23 |