[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JBV6EFC54J44FPCRMH1FH8":3,"skill-same:01M6JBV6EFC54J44FPCRMH1FH8":90},{"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":27,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":71,"repositoryHtmlUrl":72,"repositoryHomepageUrl":73,"ownerHtmlUrl":74,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":75,"install":76,"resources":89},"01M6JBV6EFC54J44FPCRMH1FH8","coding-agents",null,"Delegate coding tasks to external autonomous AI coding CLI agents — Claude Code, Codex, OpenCode, and Kanban+Codex lane patterns. Covers install, auth, one-shot tasks, interactive sessions, PR reviews, parallel worktrees, and reconciliation.","S3YED\u002Fappie-kit","S3YED","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62743867?v=4","01M6JBKBRRVP6KMS0VWZ27T3R6","01M6JBKBX0KG30284PW1DBYJT1",14,"MIT","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fautonomous-ai-agents\u002Fcoding-agents\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[28,29,30,31,5,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"coding agents","coding","reviews","cli","parallel worktrees","cli agents","worker","reconciliation","patterns","kanban","worktrees","opencode","install","autonomous","delegate","code","tasks","auth","workflow","2026-11-10 10:12:30",false,"---\nname: coding-agents\ndescription: \"Delegate coding tasks to external autonomous AI coding CLI agents — Claude Code, Codex, OpenCode, and Kanban+Codex lane patterns. Covers install, auth, one-shot tasks, interactive sessions, PR reviews, parallel worktrees, and reconciliation.\"\nversion: 1.0.0\nauthor: Hermes Agent\nlicense: MIT\nplatforms: [linux, macos, windows]\nmetadata:\n  hermes:\n    tags: [coding-agents, claude-code, codex, opencode, autonomous-coding, code-generation]\n    related_skills: [kanban-worker, github-pr-workflow]\n---\n\n# Coding Agents — Delegate to AI Coding CLIs\n\nDelegate coding to external autonomous AI coding agent CLIs via Hermes terminal\u002Fprocess tools. This umbrella covers **Claude Code** (Anthropic), **Codex** (OpenAI), and **OpenCode** (provider-agnostic, open-source), plus the **Kanban Codex Lane** pattern for Hermes Kanban workers.\n\n## When to Use Coding Agents\n\nUse any coding agent CLI when:\n- Building features, refactoring, or batch fixing issues\n- The task requires autonomous file exploration and multi-step reasoning\n- You want to run parallel implementation lanes\n\nDo NOT use a coding agent when:\n- A small direct edit is faster and safer\n- The change touches secrets, credentials, or production order-entry systems\n- You need human judgment that can't be captured in a prompt\n\n## Shared Prerequisites\n\nAll coding agents need:\n- A **git repository** — most refuse to run outside one\n- **Auth credentials** (agent-specific, see sections below)\n- **`pty=true`** for interactive TUI sessions; print\u002Fone-shot mode may not need it\n\n## Section 1: Claude Code\n\nAnthropic's autonomous coding agent CLI. v2.x can read files, write code, run shell commands, spawn subagents, and manage git workflows.\n\n### Install & Auth\n\n```bash\nnpm install -g @anthropic-ai\u002Fclaude-code\nclaude auth login                   # Browser OAuth\nclaude auth login --console         # API key billing\nclaude auth login --sso             # Enterprise SSO\nclaude auth status                  # Verify\n```\n\n### Print Mode (PREFERRED for one-shot tasks)\n\n```bash\n# Non-interactive, exits when done. No PTY needed.\nterminal(command=\"claude -p 'Add error handling to all API calls in src\u002F' --allowedTools 'Read,Edit' --max-turns 10\", workdir=\"\u002Fpath\u002Fto\u002Fproject\", timeout=120)\n```\n\nKey flags: `--allowedTools 'Read,Edit'`, `--max-turns N`, `--max-budget-usd N`, `--output-format json`, `--json-schema '{...}'`, `--continue` (resume last session), `--resume \u003Cid>` (specific session), `--bare` (fastest startup, needs ANTHROPIC_API_KEY).\n\n### Interactive Mode (via tmux)\n\n```bash\nterminal(command=\"tmux new-session -d -s claude-work -x 140 -y 40\")\nterminal(command=\"tmux send-keys -t claude-work 'cd \u002Fpath\u002Fto\u002Fproject && claude' Enter\")\n# Handle trust dialog\nterminal(command=\"sleep 4 && tmux send-keys -t claude-work Enter\")\n# Send task\nterminal(command=\"tmux send-keys -t claude-work 'Refactor the auth module' Enter\")\n# Monitor\nterminal(command=\"sleep 15 && tmux capture-pane -t claude-work -p -S -50\")\n```\n\n### PR Review\n\n```bash\n# Quick via print mode\nterminal(command=\"git diff main...feature-branch | claude -p 'Review this diff for bugs, security issues, and style problems.' --max-turns 1\", timeout=60)\n\n# Deep via worktree\nterminal(command=\"claude -p 'Review this PR thoroughly' --from-pr 42 --max-turns 10\", workdir=\"\u002Fpath\u002Fto\u002Frepo\", timeout=120)\n```\n\n### Key Pitfalls\n- Interactive mode **REQUIRES tmux** — print mode (`-p`) skips dialog handling\n- `--dangerously-skip-permissions` defaults to \"No, exit\" — send Down then Enter to accept\n- Session resumption requires same directory\n- `\u002Fcompact` prevents context degradation above 70% usage\n\n---\n\n## Section 2: Codex (OpenAI)\n\nOpenAI's autonomous coding agent CLI. Good for features, refactoring, and batch issue fixing.\n\n### Install & Auth\n\n```bash\nnpm install -g @openai\u002Fcodex\n```\nAuth via `OPENAI_API_KEY` or Codex CLI OAuth (`~\u002F.codex\u002Fauth.json`). For Hermes-managed OAuth: `hermes auth add openai-codex`.\n\n#### Headless Server Auth (OAuth Device Flow)\n\nOn headless servers (Hetzner, EC2, DO droplet), `hermes auth add openai-codex` runs an interactive OAuth device code flow. It does NOT fail; it waits for you:\n\n1. Run the command in a foreground terminal — it prints:\n   - URL: `https:\u002F\u002Fauth.openai.com\u002Fcodex\u002Fdevice`\n   - Code: `W04N-ADDSI` (6-char alphanumeric, hyphenated)\n2. Open that URL in a browser **on your local machine** and enter the code.\n3. The CLI polls for up to 15 minutes. No additional flags needed; `--no-browser` only suppresses the local-browser-open attempt, it does not change the device flow (and is implicit on headless boxes).\n\nDo NOT run this in `background=true` — you will never see the URL+code. Use foreground or PTY mode. If you accidentally background it, kill it (`process(action='kill', ...)`) and retry in foreground. After the credential is stored, verify with `hermes auth list`.\n\nSee `references\u002Fcodex-auth-headless.md` for the exact API endpoints and step-by-step flow.\n\n### One-Shot Tasks\n\n```bash\nterminal(command=\"codex exec 'Add dark mode toggle to settings'\", workdir=\"~\u002Fproject\", pty=true)\n```\n\n### Background Mode (Long Tasks)\n\n```bash\nterminal(command=\"codex exec --full-auto 'Refactor the auth module'\", workdir=\"~\u002Fproject\", background=true, pty=true)\nprocess(action=\"poll\", session_id=\"\u003Cid>\")\n```\n\n### Key Flags\n\n| Flag | Effect |\n|------|--------|\n| `exec \"prompt\"` | One-shot execution, exits when done |\n| `--full-auto` | Auto-approves file changes in sandbox |\n| `--yolo` | No sandbox, no approvals (dangerous, fastest) |\n| `--sandbox danger-full-access` | Bypass sandbox when bubblewrap fails |\n\n### Parallel Issue Fixing with Worktrees\n\n```bash\nterminal(command=\"git worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\", workdir=\"~\u002Fproject\")\nterminal(command=\"codex --yolo exec 'Fix issue #78'\", workdir=\"\u002Ftmp\u002Fissue-78\", background=true, pty=true)\n```\n\n### Pitfalls\n- **Always use `pty=true`** — Codex hangs without a PTY\n- **Git repo required** — use `mktemp -d && git init` for scratch\n- Hermes gateway contexts may need `--sandbox danger-full-access` due to bubblewrap errors\n- **Headless Codex auth is a device flow** — `hermes auth add openai-codex` prints a URL+code and polls for 15min. Run it foreground, not background. Share the URL+code with the user to complete in their browser. See `references\u002Fcodex-auth-headless.md`.\n\n---\n\n## Section 3: OpenCode\n\nProvider-agnostic, open-source AI coding agent. Supports multiple providers (OpenRouter, Anthropic, OpenAI).\n\n### Install & Auth\n\n```bash\nnpm i -g opencode-ai@latest\nopencode auth login                   # Interactive auth\nopencode auth list                    # Verify providers\n```\n\n### One-Shot Tasks\n\n```bash\nterminal(command=\"opencode run 'Add retry logic to API calls and update tests'\", workdir=\"~\u002Fproject\")\n```\n\nAttach context: `-f config.yaml -f .env.example`\nShow thinking: `--thinking`\nForce model: `--model openrouter\u002Fanthropic\u002Fclaude-sonnet-4`\n\n### Interactive Sessions (Background)\n\n```bash\nterminal(command=\"opencode\", workdir=\"~\u002Fproject\", background=true, pty=true)\nprocess(action=\"submit\", session_id=\"\u003Cid>\", data=\"Implement OAuth refresh flow\")\nprocess(action=\"log\", session_id=\"\u003Cid>\")\nprocess(action=\"write\", data=\"\\x03\")  # Ctrl+C to exit (NOT \u002Fexit)\n```\n\n### PR Review\n\n```bash\nterminal(command=\"opencode pr 42\", workdir=\"~\u002Fproject\", pty=true)\n```\n\n### Pitfalls\n- `\u002Fexit` is NOT a valid command — it opens an agent selector. Use Ctrl+C (`\\x03`)\n- Enter may need to be pressed twice to submit in TUI\n- PATH mismatch can select wrong binary — check with `which -a opencode`\n\n---\n\n## Section 4: Kanban Codex Lane\n\nUse when a Hermes Kanban worker wants to run Codex as an isolated implementation lane while Hermes keeps ownership of task lifecycle, reconciliation, testing, and handoff.\n\n### When to Use the Codex Lane\n\nUse when ALL are true:\n- Task has clear acceptance criteria and bounded diff\n- Repo can be isolated in a git worktree\u002Fbranch\n- Hermes can run canonical tests independently\n- Prompt can state all safety constraints\n\nDo NOT use when:\n- Task requires human judgment not in the Kanban body\n- Change touches secrets, credentials, or production order-entry\n- A small direct edit is safer\n\n### Ownership Rules\n\n1. **Hermes owns the Kanban lifecycle** — Codex never calls `kanban_complete`, `kanban_block`, or `kanban_create`\n2. **Hermes owns final acceptance** — treat Codex commits\u002Fdiffs as untrusted patches\n3. **Hermes owns test execution** — repeat tests from Hermes after Codex exits\n4. **Hermes owns safety** — reject the lane if boundaries are violated\n\n### Required Worktree Pattern\n\n```bash\nTASK_ID=\"${HERMES_KANBAN_TASK:-t_manual}\"\nREPO=\"\u002Fpath\u002Fto\u002Frepo\"\nBASE=\"$(git -C \"$REPO\" rev-parse --abbrev-ref HEAD)\"\nSAFE_TASK=\"$(printf '%s' \"$TASK_ID\" | tr -cd '[:alnum:]_-')\"\nBRANCH=\"codex\u002F${SAFE_TASK}\u002F$(date -u +%Y%m%d%H%M%S)\"\nWORKTREE=\"\u002Ftmp\u002F${SAFE_TASK}-codex-lane\"\n\ngit -C \"$REPO\" fetch --all --prune\ngit -C \"$REPO\" worktree add -b \"$BRANCH\" \"$WORKTREE\" \"$BASE\"\n```\n\n### Prompt Construction\n\nEvery Codex lane prompt must include:\n- `task_id`, title, and full Kanban acceptance criteria\n- Repo path, worktree path, branch name, allowed file scope\n- Explicit statement: \"Hermes owns Kanban lifecycle; Codex is an input lane only\"\n- Prohibited actions list\n- Verification commands\n\n### Reconciliation Checklist\n\n- [ ] `git status --short --branch` shows only expected files\n- [ ] `git diff --stat` reviewed by Hermes\n- [ ] No secrets, credentials, or unrelated artifacts\n- [ ] Hermes ran canonical tests independently\n- [ ] Accepted commits applied to Hermes-owned workspace\n- [ ] Stuck\u002Fkilled Codex processes cleaned up\n\n### Codex Lane Metadata Schema\n\n```json\n{\n  \"codex_lane\": {\n    \"used\": true,\n    \"mode\": \"exec | goal | skipped\",\n    \"worktree\": \"\u002Fabsolute\u002Fpath\",\n    \"branch\": \"codex\u002Ft_caa69668\u002F20260508100000\",\n    \"result\": \"accepted | rejected | partial | timed_out\",\n    \"tests_run\": [\n      {\"command\": \"pytest tests\u002F\", \"exit_code\": 0, \"owner\": \"hermes\"}\n    ]\n  }\n}\n```\n\n---\n\n## Section 5: Shared Patterns\n\n### Parallel Task Execution\n\nAll three agents support parallel worktree-based execution:\n\n```bash\n# Create worktrees\ngit worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\ngit worktree add -b fix\u002Fissue-99 \u002Ftmp\u002Fissue-99 main\n\n# Launch agents in each (use whichever CLI is available)\nterminal(command=\"codex --yolo exec 'Fix issue #78'\", workdir=\"\u002Ftmp\u002Fissue-78\", background=true, pty=true)\nterminal(command=\"opencode run 'Fix issue #99'\", workdir=\"\u002Ftmp\u002Fissue-99\", background=true, pty=true)\n```\n\n### PR Review Patterns\n\n| Agent | Quick Review | Deep Review |\n|-------|-------------|-------------|\n| Claude Code | `claude -p 'Review this diff' --max-turns 1` | `claude --from-pr 42` or interactive worktree |\n| Codex | `codex review --base origin\u002Fmain` | Clone to temp dir + `codex exec` |\n| OpenCode | `opencode run 'Review this PR'` | `opencode pr 42` |\n\n### Choice Guide\n\n| Situation | Recommended Agent |\n|-----------|------------------|\n| Need structured JSON output | Claude Code (`--output-format json --json-schema`) |\n| Provider-agnostic \u002F open-source | OpenCode (works with OpenRouter, multiple providers) |\n| Fast parallel batch fixes | Codex (lightweight `--yolo` mode) |\n| Kanban worker needs an implementation lane | Codex via Kanban Codex Lane pattern |\n| Multi-turn interactive session | Claude Code with tmux or OpenCode TUI |\n| CI\u002Fautomation with strict tool permissions | Claude Code (`--allowedTools`, `--bare`) |\n\n---\n\n## Pitfalls (All Agents)\n\n1. **Git repo required** — most agents refuse to run outside a git directory\n2. **Do NOT trust self-report** — always inspect the diff, re-run tests independently\n3. **Isolate untrusted work** — use worktrees\u002Fbranches, never run in shared dirty checkout\n4. **PTY for TUI** — interactive sessions hang without a pseudo-terminal\n5. **Clean up background processes** — kill tmux sessions and remove worktrees when done\n6. **Scoped prompts prevent accidents** — use `--allowedTools` and explicit file scopes\n7. **Large diffs are expensive** — scope down to specific files\u002Fdirectories when reasonable\n8. **Check binary resolution** — `which -a codex` \u002F `which -a opencode` to verify which binary runs\n","# Coding Agents — Delegate to AI Coding CLIs\n\nDelegate coding to external autonomous AI coding agent CLIs via Hermes terminal\u002Fprocess tools. This umbrella covers **Claude Code** (Anthropic), **Codex** (OpenAI), and **OpenCode** (provider-agnostic, open-source), plus the **Kanban Codex Lane** pattern for Hermes Kanban workers.\n\n## When to Use Coding Agents\n\nUse any coding agent CLI when:\n- Building features, refactoring, or batch fixing issues\n- The task requires autonomous file exploration and multi-step reasoning\n- You want to run parallel implementation lanes\n\nDo NOT use a coding agent when:\n- A small direct edit is faster and safer\n- The change touches secrets, credentials, or production order-entry systems\n- You need human judgment that can't be captured in a prompt\n\n## Shared Prerequisites\n\nAll coding agents need:\n- A **git repository** — most refuse to run outside one\n- **Auth credentials** (agent-specific, see sections below)\n- **`pty=true`** for interactive TUI sessions; print\u002Fone-shot mode may not need it\n\n## Section 1: Claude Code\n\nAnthropic's autonomous coding agent CLI. v2.x can read files, write code, run shell commands, spawn subagents, and manage git workflows.\n\n### Install & Auth\n\n```bash\nnpm install -g @anthropic-ai\u002Fclaude-code\nclaude auth login                   # Browser OAuth\nclaude auth login --console         # API key billing\nclaude auth login --sso             # Enterprise SSO\nclaude auth status                  # Verify\n```\n\n### Print Mode (PREFERRED for one-shot tasks)\n\n```bash\n# Non-interactive, exits when done. No PTY needed.\nterminal(command=\"claude -p 'Add error handling to all API calls in src\u002F' --allowedTools 'Read,Edit' --max-turns 10\", workdir=\"\u002Fpath\u002Fto\u002Fproject\", timeout=120)\n```\n\nKey flags: `--allowedTools 'Read,Edit'`, `--max-turns N`, `--max-budget-usd N`, `--output-format json`, `--json-schema '{...}'`, `--continue` (resume last session), `--resume \u003Cid>` (specific session), `--bare` (fastest startup, needs ANTHROPIC_API_KEY).\n\n### Interactive Mode (via tmux)\n\n```bash\nterminal(command=\"tmux new-session -d -s claude-work -x 140 -y 40\")\nterminal(command=\"tmux send-keys -t claude-work 'cd \u002Fpath\u002Fto\u002Fproject && claude' Enter\")\n# Handle trust dialog\nterminal(command=\"sleep 4 && tmux send-keys -t claude-work Enter\")\n# Send task\nterminal(command=\"tmux send-keys -t claude-work 'Refactor the auth module' Enter\")\n# Monitor\nterminal(command=\"sleep 15 && tmux capture-pane -t claude-work -p -S -50\")\n```\n\n### PR Review\n\n```bash\n# Quick via print mode\nterminal(command=\"git diff main...feature-branch | claude -p 'Review this diff for bugs, security issues, and style problems.' --max-turns 1\", timeout=60)\n\n# Deep via worktree\nterminal(command=\"claude -p 'Review this PR thoroughly' --from-pr 42 --max-turns 10\", workdir=\"\u002Fpath\u002Fto\u002Frepo\", timeout=120)\n```\n\n### Key Pitfalls\n- Interactive mode **REQUIRES tmux** — print mode (`-p`) skips dialog handling\n- `--dangerously-skip-permissions` defaults to \"No, exit\" — send Down then Enter to accept\n- Session resumption requires same directory\n- `\u002Fcompact` prevents context degradation above 70% usage\n\n---\n\n## Section 2: Codex (OpenAI)\n\nOpenAI's autonomous coding agent CLI. Good for features, refactoring, and batch issue fixing.\n\n### Install & Auth\n\n```bash\nnpm install -g @openai\u002Fcodex\n```\nAuth via `OPENAI_API_KEY` or Codex CLI OAuth (`~\u002F.codex\u002Fauth.json`). For Hermes-managed OAuth: `hermes auth add openai-codex`.\n\n#### Headless Server Auth (OAuth Device Flow)\n\nOn headless servers (Hetzner, EC2, DO droplet), `hermes auth add openai-codex` runs an interactive OAuth device code flow. It does NOT fail; it waits for you:\n\n1. Run the command in a foreground terminal — it prints:\n   - URL: `https:\u002F\u002Fauth.openai.com\u002Fcodex\u002Fdevice`\n   - Code: `W04N-ADDSI` (6-char alphanumeric, hyphenated)\n2. Open that URL in a browser **on your local machine** and enter the code.\n3. The CLI polls for up to 15 minutes. No additional flags needed; `--no-browser` only suppresses the local-browser-open attempt, it does not change the device flow (and is implicit on headless boxes).\n\nDo NOT run this in `background=true` — you will never see the URL+code. Use foreground or PTY mode. If you accidentally background it, kill it (`process(action='kill', ...)`) and retry in foreground. After the credential is stored, verify with `hermes auth list`.\n\nSee `references\u002Fcodex-auth-headless.md` for the exact API endpoints and step-by-step flow.\n\n### One-Shot Tasks\n\n```bash\nterminal(command=\"codex exec 'Add dark mode toggle to settings'\", workdir=\"~\u002Fproject\", pty=true)\n```\n\n### Background Mode (Long Tasks)\n\n```bash\nterminal(command=\"codex exec --full-auto 'Refactor the auth module'\", workdir=\"~\u002Fproject\", background=true, pty=true)\nprocess(action=\"poll\", session_id=\"\u003Cid>\")\n```\n\n### Key Flags\n\n| Flag | Effect |\n|------|--------|\n| `exec \"prompt\"` | One-shot execution, exits when done |\n| `--full-auto` | Auto-approves file changes in sandbox |\n| `--yolo` | No sandbox, no approvals (dangerous, fastest) |\n| `--sandbox danger-full-access` | Bypass sandbox when bubblewrap fails |\n\n### Parallel Issue Fixing with Worktrees\n\n```bash\nterminal(command=\"git worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\", workdir=\"~\u002Fproject\")\nterminal(command=\"codex --yolo exec 'Fix issue #78'\", workdir=\"\u002Ftmp\u002Fissue-78\", background=true, pty=true)\n```\n\n### Pitfalls\n- **Always use `pty=true`** — Codex hangs without a PTY\n- **Git repo required** — use `mktemp -d && git init` for scratch\n- Hermes gateway contexts may need `--sandbox danger-full-access` due to bubblewrap errors\n- **Headless Codex auth is a device flow** — `hermes auth add openai-codex` prints a URL+code and polls for 15min. Run it foreground, not background. Share the URL+code with the user to complete in their browser. See `references\u002Fcodex-auth-headless.md`.\n\n---\n\n## Section 3: OpenCode\n\nProvider-agnostic, open-source AI coding agent. Supports multiple providers (OpenRouter, Anthropic, OpenAI).\n\n### Install & Auth\n\n```bash\nnpm i -g opencode-ai@latest\nopencode auth login                   # Interactive auth\nopencode auth list                    # Verify providers\n```\n\n### One-Shot Tasks\n\n```bash\nterminal(command=\"opencode run 'Add retry logic to API calls and update tests'\", workdir=\"~\u002Fproject\")\n```\n\nAttach context: `-f config.yaml -f .env.example`\nShow thinking: `--thinking`\nForce model: `--model openrouter\u002Fanthropic\u002Fclaude-sonnet-4`\n\n### Interactive Sessions (Background)\n\n```bash\nterminal(command=\"opencode\", workdir=\"~\u002Fproject\", background=true, pty=true)\nprocess(action=\"submit\", session_id=\"\u003Cid>\", data=\"Implement OAuth refresh flow\")\nprocess(action=\"log\", session_id=\"\u003Cid>\")\nprocess(action=\"write\", data=\"\\x03\")  # Ctrl+C to exit (NOT \u002Fexit)\n```\n\n### PR Review\n\n```bash\nterminal(command=\"opencode pr 42\", workdir=\"~\u002Fproject\", pty=true)\n```\n\n### Pitfalls\n- `\u002Fexit` is NOT a valid command — it opens an agent selector. Use Ctrl+C (`\\x03`)\n- Enter may need to be pressed twice to submit in TUI\n- PATH mismatch can select wrong binary — check with `which -a opencode`\n\n---\n\n## Section 4: Kanban Codex Lane\n\nUse when a Hermes Kanban worker wants to run Codex as an isolated implementation lane while Hermes keeps ownership of task lifecycle, reconciliation, testing, and handoff.\n\n### When to Use the Codex Lane\n\nUse when ALL are true:\n- Task has clear acceptance criteria and bounded diff\n- Repo can be isolated in a git worktree\u002Fbranch\n- Hermes can run canonical tests independently\n- Prompt can state all safety constraints\n\nDo NOT use when:\n- Task requires human judgment not in the Kanban body\n- Change touches secrets, credentials, or production order-entry\n- A small direct edit is safer\n\n### Ownership Rules\n\n1. **Hermes owns the Kanban lifecycle** — Codex never calls `kanban_complete`, `kanban_block`, or `kanban_create`\n2. **Hermes owns final acceptance** — treat Codex commits\u002Fdiffs as untrusted patches\n3. **Hermes owns test execution** — repeat tests from Hermes after Codex exits\n4. **Hermes owns safety** — reject the lane if boundaries are violated\n\n### Required Worktree Pattern\n\n```bash\nTASK_ID=\"${HERMES_KANBAN_TASK:-t_manual}\"\nREPO=\"\u002Fpath\u002Fto\u002Frepo\"\nBASE=\"$(git -C \"$REPO\" rev-parse --abbrev-ref HEAD)\"\nSAFE_TASK=\"$(printf '%s' \"$TASK_ID\" | tr -cd '[:alnum:]_-')\"\nBRANCH=\"codex\u002F${SAFE_TASK}\u002F$(date -u +%Y%m%d%H%M%S)\"\nWORKTREE=\"\u002Ftmp\u002F${SAFE_TASK}-codex-lane\"\n\ngit -C \"$REPO\" fetch --all --prune\ngit -C \"$REPO\" worktree add -b \"$BRANCH\" \"$WORKTREE\" \"$BASE\"\n```\n\n### Prompt Construction\n\nEvery Codex lane prompt must include:\n- `task_id`, title, and full Kanban acceptance criteria\n- Repo path, worktree path, branch name, allowed file scope\n- Explicit statement: \"Hermes owns Kanban lifecycle; Codex is an input lane only\"\n- Prohibited actions list\n- Verification commands\n\n### Reconciliation Checklist\n\n- [ ] `git status --short --branch` shows only expected files\n- [ ] `git diff --stat` reviewed by Hermes\n- [ ] No secrets, credentials, or unrelated artifacts\n- [ ] Hermes ran canonical tests independently\n- [ ] Accepted commits applied to Hermes-owned workspace\n- [ ] Stuck\u002Fkilled Codex processes cleaned up\n\n### Codex Lane Metadata Schema\n\n```json\n{\n  \"codex_lane\": {\n    \"used\": true,\n    \"mode\": \"exec | goal | skipped\",\n    \"worktree\": \"\u002Fabsolute\u002Fpath\",\n    \"branch\": \"codex\u002Ft_caa69668\u002F20260508100000\",\n    \"result\": \"accepted | rejected | partial | timed_out\",\n    \"tests_run\": [\n      {\"command\": \"pytest tests\u002F\", \"exit_code\": 0, \"owner\": \"hermes\"}\n    ]\n  }\n}\n```\n\n---\n\n## Section 5: Shared Patterns\n\n### Parallel Task Execution\n\nAll three agents support parallel worktree-based execution:\n\n```bash\n# Create worktrees\ngit worktree add -b fix\u002Fissue-78 \u002Ftmp\u002Fissue-78 main\ngit worktree add -b fix\u002Fissue-99 \u002Ftmp\u002Fissue-99 main\n\n# Launch agents in each (use whichever CLI is available)\nterminal(command=\"codex --yolo exec 'Fix issue #78'\", workdir=\"\u002Ftmp\u002Fissue-78\", background=true, pty=true)\nterminal(command=\"opencode run 'Fix issue #99'\", workdir=\"\u002Ftmp\u002Fissue-99\", background=true, pty=true)\n```\n\n### PR Review Patterns\n\n| Agent | Quick Review | Deep Review |\n|-------|-------------|-------------|\n| Claude Code | `claude -p 'Review this diff' --max-turns 1` | `claude --from-pr 42` or interactive worktree |\n| Codex | `codex review --base origin\u002Fmain` | Clone to temp dir + `codex exec` |\n| OpenCode | `opencode run 'Review this PR'` | `opencode pr 42` |\n\n### Choice Guide\n\n| Situation | Recommended Agent |\n|-----------|------------------|\n| Need structured JSON output | Claude Code (`--output-format json --json-schema`) |\n| Provider-agnostic \u002F open-source | OpenCode (works with OpenRouter, multiple providers) |\n| Fast parallel batch fixes | Codex (lightweight `--yolo` mode) |\n| Kanban worker needs an implementation lane | Codex via Kanban Codex Lane pattern |\n| Multi-turn interactive session | Claude Code with tmux or OpenCode TUI |\n| CI\u002Fautomation with strict tool permissions | Claude Code (`--allowedTools`, `--bare`) |\n\n---\n\n## Pitfalls (All Agents)\n\n1. **Git repo required** — most agents refuse to run outside a git directory\n2. **Do NOT trust self-report** — always inspect the diff, re-run tests independently\n3. **Isolate untrusted work** — use worktrees\u002Fbranches, never run in shared dirty checkout\n4. **PTY for TUI** — interactive sessions hang without a pseudo-terminal\n5. **Clean up background processes** — kill tmux sessions and remove worktrees when done\n6. **Scoped prompts prevent accidents** — use `--allowedTools` and explicit file scopes\n7. **Large diffs are expensive** — scope down to specific files\u002Fdirectories when reasonable\n8. **Check binary resolution** — `which -a codex` \u002F `which -a opencode` to verify which binary runs\n",{"name":5,"author":52,"license":14,"version":53,"metadata":54,"platforms":64,"description":7},"Hermes Agent","1.0.0",{"hermes":55},{"tags":56,"related_skills":61},[5,57,58,39,59,60],"claude-code","codex","autonomous-coding","code-generation",[62,63],"kanban-worker","github-pr-workflow",[65,66,67],"linux","macos","windows","master","8ec37df6d71fb664ea19d32c079e7d3ff931a8e0","skills\u002Fautonomous-ai-agents\u002Fcoding-agents",3,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit","https:\u002F\u002Fweblyfe.ai","https:\u002F\u002Fgithub.com\u002FS3YED","2026-08-27 01:54:02",{"source":8,"skillName":5,"commands":77,"prompt":87,"zipAvailable":88},[78,81,84],{"tool":79,"command":80},"npx","npx skills add S3YED\u002Fappie-kit --skill coding-agents",{"tool":82,"command":83},"bunx","bunx skills add S3YED\u002Fappie-kit --skill coding-agents",{"tool":85,"command":86},"pnpm","pnpm dlx skills add S3YED\u002Fappie-kit --skill coding-agents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fautonomous-ai-agents\u002Fcoding-agents\u002FSKILL.md",true,[],[91,123,156,181,208,231],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":104,"publishedAt":47},"01M6JFD4M6N4DSGC7TXEJ5R3J2","ai-music","AI music generation and audio tools: HeartMuLa lyrics-to-music generation, songwriting craft (+ Suno prompts), and audio spectrogram\u002Ffeature visualization.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fwethlete\u002Fai-music\u002FSKILL.md",[97,100,103],{"categoryNo":98,"categoryName":99,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000013","分析与可视化",{"categoryNo":101,"categoryName":102,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122],"music","ai music","humanizer","visualization","Tools","Audio","hermes","hermes agent","songwriting","suno","lyrics","prompts","heartmula","craft","generation","feature","ai music generation","music generation",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":135,"publishedAt":47},"01M6JFCZE4XNFQFMNZDHKHT5V5","agentic-webdesign-design-system-ingestion","Use v0 Design Systems 2.0, Bolt Design System Agents, or Lovable to generate production UI from a client's real design system components — not generic Tailwind. Use when building a client website where brand consistency matters.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-design\u002Fagentic-webdesign-design-system-ingestion\u002FSKILL.md",[129,132],{"categoryNo":130,"categoryName":131,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":133,"categoryName":134,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000032","设计师",[136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155],"design","agentic","design system","system","ingestion","webdesign","agentic webdesign design system ingestion","components","generate","design systems","website","ui","Tailwind","bolt","lovable","v0","design-system","wed","design system components","appie",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":164,"publishedAt":47},"01M6JFCVPX3913CFAS6QQJ33ZB","agentic-webdesign-agent-elements","Use 21st.dev Agent Elements — 25 shadcn\u002Fui components purpose-built for AI agent UIs. Tool cards (Bash, Edit, Search, Plan, Subagent, MCP), chat, input, streaming. Open source, shadcn-registry install, no runtime lock-in.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-design\u002Fagentic-webdesign-agent-elements\u002FSKILL.md",[162,163],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":133,"categoryName":134,"taxonomyType":25,"taxonomyTypeDesc":26},[137,165,141,166,167,168,143,169,170,171,172,173,174,175,176,177,40,178,179,180],"elements","agentic webdesign agent elements","MCP","ai agent","registry","search","streaming","open source","open","Bash","plan","subagent","edit","input","lock","source",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":191,"publishedAt":47},"01M6JFCQC7H65M9QJ6TRE71BS1","vercel-deployment","Deploy static sites and frontends to Vercel — handles both CLI and REST API paths, including the CLI token sanitization workaround.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Fvercel-deployment\u002FSKILL.md",[187,190],{"categoryNo":188,"categoryName":189,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[192,193,194,66,31,65,67,195,196,197,198,199,200,201,202,203,204,205,206,207],"deployment","vercel deployment","vercel","deploy","vercel deploy","REST","api","site","deploy to vercel","token","rest api","host","sites","paths","sanitization","static site",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":215,"publishedAt":47},"01M6JFCM4SMTXBM5A01BK2YQG1","software-quality-workflows","Umbrella workflow for TDD, debugging, code simplification, spikes, pre-commit review, and debugger-assisted investigation.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Fsoftware-quality-workflows\u002FSKILL.md",[214],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[216,217,218,219,220,221,46,222,223,43,224,225,226,227,228,229,230],"workflows","quality","software","software quality workflows","review","tdd","commit","debugging","debugger","pre-commit","investigation","code simplification","user","simplification","for",{"skillNo":232,"name":233,"nameZh":6,"description":234,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":235,"categories":236,"keywords":244,"publishedAt":47},"01M6JFCGD0M6CEATY01W7YN6DB","react-component-refactoring","Safely refactor large React components into smaller, maintainable pieces using proven patterns","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Freact-component-refactoring\u002FSKILL.md",[237,240,243],{"categoryNo":238,"categoryName":239,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":241,"categoryName":242,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[245,246,247,248,249,250,251,252,66,253,254,143,255,67,256,43,257,258,36,259],"react","component","refactoring","component refactoring","react component","react component refactoring","frontend","writing","safe","typescript","react components","modular","refactor","simplify","test-driven-development"]