{
  "schemaVersion": "1.0",
  "item": {
    "slug": "claude-code-cli",
    "name": "claude-code-cli",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/AtelyPham/claude-code-cli",
    "canonicalUrl": "https://clawhub.ai/AtelyPham/claude-code-cli",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/claude-code-cli",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=claude-code-cli",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/claude-code-cli"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/claude-code-cli",
    "agentPageUrl": "https://openagent3.xyz/skills/claude-code-cli/agent",
    "manifestUrl": "https://openagent3.xyz/skills/claude-code-cli/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/claude-code-cli/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Claude Code Skill",
        "body": "Delegate coding tasks to the Claude Code CLI via background process with PTY or headless pipe mode."
      },
      {
        "title": "PTY Mode Required (Interactive)",
        "body": "Claude Code is an interactive terminal application that needs a pseudo-terminal (PTY). Without PTY, output breaks or the agent hangs.\n\nAlways use pty:true for interactive mode:\n\n# ✅ Correct - with PTY\nexec pty:true command:\"claude 'Your prompt'\"\n\n# ❌ Wrong - no PTY, agent may break\nexec command:\"claude 'Your prompt'\""
      },
      {
        "title": "1. Interactive PTY Mode",
        "body": "For tasks where Claude Code may ask confirmations, need input, or show permission prompts.\n\n# Foreground (waits for completion)\nexec pty:true workdir:~/project command:\"claude 'Add dark mode toggle'\"\n\n# Background (returns sessionId)\nexec pty:true workdir:~/project background:true command:\"claude 'Build REST API for todos'\""
      },
      {
        "title": "2. Headless Pipe Mode",
        "body": "For automation, scripting, CI-like usage. Uses -p flag for non-interactive.\n\n# Simple one-shot\nexec command:\"claude -p 'Explain what src/main.ts does' --output-format json\"\n\n# With structured output validation\nexec command:\"claude -p 'List all exported functions in src/' --output-format json --json-schema '{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"functions\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\"}}}}'\"\n\n# Budget-capped automation\nexec command:\"claude -p 'Refactor auth module' --max-budget-usd 5.00 --output-format json\"\n\n# Real-time streaming output (JSON chunks as they arrive)\nexec command:\"claude -p 'Build a helper function' --output-format stream-json\""
      },
      {
        "title": "Exec Tool Parameters",
        "body": "ParameterTypeDescriptioncommandstringThe shell command to runptybooleanRequired for interactive mode! Allocates a pseudo-terminalworkdirstringWorking directory (agent sees only this folder's context)backgroundbooleanRun in background, returns sessionId for monitoringtimeoutnumberTimeout in seconds (default: 1800+ for real tasks)elevatedbooleanRun on host instead of sandbox (if allowed)"
      },
      {
        "title": "Process Tool Actions (for background sessions)",
        "body": "ActionDescriptionlistList all running/recent sessionspollCheck if session is still runninglogGet session output (with optional offset/limit)writeSend raw data to stdinsubmitSend data + newline (like typing and pressing Enter)send-keysSend key tokens or hex bytespastePaste text (with optional bracketed mode)killTerminate the session"
      },
      {
        "title": "Key CLI Flags",
        "body": "FlagPurpose-pNon-interactive pipe mode (headless)--output-format jsonStructured JSON output (headless only)--output-format stream-jsonReal-time streaming output (headless only)--resume [SESSION_ID]Resume by ID, or open interactive picker with optional search term--continueContinue the latest session--fork-sessionCreate new session ID when resuming (use with --resume or --continue)--from-pr [value]Resume session linked to a PR by number/URL--allowedTools 'Bash,Read,Edit,Write,Glob,Grep'Restrict available tools--permission-mode acceptEditsAuto-accept edits, prevents prompt stalls--permission-mode planRead-only exploration mode (no writes)--dangerously-skip-permissionsFull auto, no guardrails (⚠️ DANGER)--max-budget-usd NSpend cap for automation safety--json-schema '<schema>'Structured output validation (with -p)--append-system-prompt '...'Add to base prompt (doesn't replace)--system-prompt '...'Replace entire system prompt--agents '<json>'Inline dynamic subagent definitions--model <model>Override model (sonnet, haiku, opus)--add-dir <path>Add extra directory to context"
      },
      {
        "title": "Permission Modes",
        "body": "ModeBehaviordefaultAsk per operationacceptEditsAuto-accept file edits (recommended for background tasks)planRead-only exploration, no writesdontAskAuto-deny unless pre-approvedbypassPermissionsSkip all permission prompts (⚠️ same effect as --dangerously-skip-permissions)"
      },
      {
        "title": "System Prompt Modes",
        "body": "FlagBehavior--append-system-prompt '...'Adds to the default system prompt — Claude Code keeps its built-in instructions--system-prompt '...'Replaces the entire system prompt — Claude Code loses all default behavior\n\nUse --append-system-prompt to add context or constraints. Use --system-prompt only when you need full control over the prompt (rare)."
      },
      {
        "title": "Granular Tool Restrictions",
        "body": "Restrict Claude Code's Bash tool to specific subcommands:\n\nexec pty:true command:\"claude --allowedTools 'Bash(git:*,npm:*),Read,Edit,Write,Glob,Grep' 'Your task'\""
      },
      {
        "title": "Session Continuity",
        "body": "Track and resume sessions across conversations.\n\n# Start a task\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode acceptEdits 'Build feature X'\"\n\n# Continue latest session\nexec pty:true workdir:~/project command:\"claude --continue\"\n\n# Resume specific session by ID\nexec pty:true workdir:~/project command:\"claude --resume abc123\"\n\n# Resume with interactive search (finds sessions matching the term)\nexec pty:true workdir:~/project command:\"claude --resume 'auth module'\"\n\n# Fork when resuming (creates new session ID, preserves original)\nexec pty:true workdir:~/project command:\"claude --continue --fork-session\"\n\n# Resume session linked to a PR\nexec pty:true workdir:~/project command:\"claude --from-pr 130\"\n\n# List recent sessions (find session IDs)\nexec command:\"claude sessions list\""
      },
      {
        "title": "HANDOFF.md Pattern (Long Sessions)",
        "body": "For tasks that exceed context limits, write progress to a handoff file:\n\n# In the Claude Code session, ask it to write progress\n# Then start a fresh session picking up from the handoff\nexec pty:true workdir:~/project command:\"claude 'Read HANDOFF.md and continue the work described there'\""
      },
      {
        "title": "Quick Start: One-Shot Task",
        "body": "# Foreground with PTY\nexec pty:true workdir:~/project command:\"claude --permission-mode acceptEdits 'Add error handling to API calls'\"\n\n# Headless one-shot\nexec command:\"claude -p 'Summarize the codebase structure' --output-format json\""
      },
      {
        "title": "Background Task with Monitoring",
        "body": "# 1. Start\nexec pty:true workdir:~/project background:true timeout:3600 command:\"claude --permission-mode acceptEdits 'Build a complete auth module with JWT tokens'\"\n\n# 2. Monitor\nprocess action:log sessionId:XXX\nprocess action:poll sessionId:XXX\n\n# 3. Send input if needed\nprocess action:submit sessionId:XXX data:\"yes\"\n\n# 4. Kill if stuck\nprocess action:kill sessionId:XXX"
      },
      {
        "title": "PR Review (Safe — Never in Live Workspace)",
        "body": "⚠️ CRITICAL: Never review PRs in OpenClaw's own project folder!\n\n# Clone to temp dir and checkout PR\nexec command:\"git clone https://github.com/user/repo.git /tmp/pr-review && cd /tmp/pr-review && gh pr checkout 130\"\n\nexec pty:true workdir:/tmp/pr-review command:\"claude --permission-mode plan 'Review this PR. Focus on bugs, security issues, and performance. Show diff summary.'\"\n\n# Clean up\nexec command:\"rm -rf /tmp/pr-review\""
      },
      {
        "title": "Parallel Issue Fixing with Git Worktrees",
        "body": "# 1. Create worktrees\nexec command:\"git worktree add -b fix/issue-78 /tmp/issue-78 main\"\nexec command:\"git worktree add -b fix/issue-99 /tmp/issue-99 main\"\n\n# 2. Launch Claude Code in each (background + PTY)\nexec pty:true workdir:/tmp/issue-78 background:true command:\"claude --permission-mode acceptEdits 'Fix issue #78: <description>. Commit when done.\n\nWhen finished, run: openclaw system event --text \\\"Done: Fixed issue #78\\\" --mode now'\"\n\nexec pty:true workdir:/tmp/issue-99 background:true command:\"claude --permission-mode acceptEdits 'Fix issue #99: <description>. Commit when done.\n\nWhen finished, run: openclaw system event --text \\\"Done: Fixed issue #99\\\" --mode now'\"\n\n# 3. Monitor\nprocess action:list\n\n# 4. Create PRs\nexec command:\"cd /tmp/issue-78 && git push -u origin fix/issue-78\"\nexec command:\"gh pr create --repo user/repo --head fix/issue-78 --title 'fix: ...' --body '...'\"\n\n# 5. Cleanup\nexec command:\"git worktree remove /tmp/issue-78\"\nexec command:\"git worktree remove /tmp/issue-99\""
      },
      {
        "title": "Fan-Out Pattern (Bulk Operations)",
        "body": "Distribute work across parallel headless invocations:\n\n# Migrate multiple files in parallel (shell script via exec)\nexec command:\"for file in \\$(cat files-to-migrate.txt); do claude -p \\\"Migrate \\$file to new API\\\" --output-format json --max-budget-usd 1.00 & done; wait\""
      },
      {
        "title": "Writer/Reviewer Pattern (Dual Sessions)",
        "body": "Two parallel sessions — one implements, one reviews:\n\n# Session A: implement\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode acceptEdits 'Implement the feature described in SPEC.md'\"\n\n# Session B: review (read-only)\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode plan 'Watch for new changes and review them. Focus on correctness and test coverage.'\""
      },
      {
        "title": "Inline Dynamic Subagents",
        "body": "Define agents without any files on disk:\n\nexec pty:true command:\"claude --agents '{\n  \\\"code-reviewer\\\": {\n    \\\"description\\\": \\\"Expert code reviewer\\\",\n    \\\"prompt\\\": \\\"You are a senior code reviewer. Focus on correctness, security, and performance.\\\",\n    \\\"tools\\\": [\\\"Read\\\", \\\"Grep\\\", \\\"Glob\\\", \\\"Bash\\\"],\n    \\\"model\\\": \\\"sonnet\\\"\n  },\n  \\\"implementer\\\": {\n    \\\"description\\\": \\\"Feature implementer\\\",\n    \\\"prompt\\\": \\\"You implement features following existing patterns.\\\",\n    \\\"tools\\\": [\\\"Read\\\", \\\"Edit\\\", \\\"Write\\\", \\\"Bash\\\", \\\"Glob\\\", \\\"Grep\\\"],\n    \\\"model\\\": \\\"sonnet\\\"\n  }\n}'\""
      },
      {
        "title": "Auto-Notify on Completion",
        "body": "For long-running background tasks, append a wake trigger so OpenClaw gets notified immediately:\n\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode acceptEdits 'Build a REST API for todos.\n\nWhen completely finished, run this command to notify me:\nopenclaw system event --text \\\"Done: Built todos REST API with CRUD endpoints\\\" --mode now'\""
      },
      {
        "title": "Progress Updates",
        "body": "When spawning background agents, keep the user informed:\n\nSend 1 short message on start (what's running + where)\nUpdate only on changes: milestone complete, agent needs input, error, or finish\nIf killing a session, say why immediately\nNever let the user see \"Agent failed\" with zero context"
      },
      {
        "title": "Safety Rules",
        "body": "Always use pty:true for interactive mode\nUse --permission-mode acceptEdits for background tasks to prevent prompt stalls\nNever run in ~/.openclaw/ workspace\nNever checkout branches in live OpenClaw project dir\n--dangerously-skip-permissions gets explicit danger warning — prefer acceptEdits\nRespect user's tool choice — don't silently take over if agent fails\nBe patient — don't kill sessions because they're \"slow\"\nBudget cap automation — use --max-budget-usd for unattended headless runs\nMax 3-4 active sessions — more causes resource contention\nTimeout guidance — use 1800s+ for real tasks, don't let timeouts kill mid-work"
      }
    ],
    "body": "Claude Code Skill\n\nDelegate coding tasks to the Claude Code CLI via background process with PTY or headless pipe mode.\n\nPTY Mode Required (Interactive)\n\nClaude Code is an interactive terminal application that needs a pseudo-terminal (PTY). Without PTY, output breaks or the agent hangs.\n\nAlways use pty:true for interactive mode:\n\n# ✅ Correct - with PTY\nexec pty:true command:\"claude 'Your prompt'\"\n\n# ❌ Wrong - no PTY, agent may break\nexec command:\"claude 'Your prompt'\"\n\nTwo Modes\n1. Interactive PTY Mode\n\nFor tasks where Claude Code may ask confirmations, need input, or show permission prompts.\n\n# Foreground (waits for completion)\nexec pty:true workdir:~/project command:\"claude 'Add dark mode toggle'\"\n\n# Background (returns sessionId)\nexec pty:true workdir:~/project background:true command:\"claude 'Build REST API for todos'\"\n\n2. Headless Pipe Mode\n\nFor automation, scripting, CI-like usage. Uses -p flag for non-interactive.\n\n# Simple one-shot\nexec command:\"claude -p 'Explain what src/main.ts does' --output-format json\"\n\n# With structured output validation\nexec command:\"claude -p 'List all exported functions in src/' --output-format json --json-schema '{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"functions\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\"}}}}'\"\n\n# Budget-capped automation\nexec command:\"claude -p 'Refactor auth module' --max-budget-usd 5.00 --output-format json\"\n\n# Real-time streaming output (JSON chunks as they arrive)\nexec command:\"claude -p 'Build a helper function' --output-format stream-json\"\n\nExec & Process Tool Reference\nExec Tool Parameters\nParameter\tType\tDescription\ncommand\tstring\tThe shell command to run\npty\tboolean\tRequired for interactive mode! Allocates a pseudo-terminal\nworkdir\tstring\tWorking directory (agent sees only this folder's context)\nbackground\tboolean\tRun in background, returns sessionId for monitoring\ntimeout\tnumber\tTimeout in seconds (default: 1800+ for real tasks)\nelevated\tboolean\tRun on host instead of sandbox (if allowed)\nProcess Tool Actions (for background sessions)\nAction\tDescription\nlist\tList all running/recent sessions\npoll\tCheck if session is still running\nlog\tGet session output (with optional offset/limit)\nwrite\tSend raw data to stdin\nsubmit\tSend data + newline (like typing and pressing Enter)\nsend-keys\tSend key tokens or hex bytes\npaste\tPaste text (with optional bracketed mode)\nkill\tTerminate the session\nKey CLI Flags\nFlag\tPurpose\n-p\tNon-interactive pipe mode (headless)\n--output-format json\tStructured JSON output (headless only)\n--output-format stream-json\tReal-time streaming output (headless only)\n--resume [SESSION_ID]\tResume by ID, or open interactive picker with optional search term\n--continue\tContinue the latest session\n--fork-session\tCreate new session ID when resuming (use with --resume or --continue)\n--from-pr [value]\tResume session linked to a PR by number/URL\n--allowedTools 'Bash,Read,Edit,Write,Glob,Grep'\tRestrict available tools\n--permission-mode acceptEdits\tAuto-accept edits, prevents prompt stalls\n--permission-mode plan\tRead-only exploration mode (no writes)\n--dangerously-skip-permissions\tFull auto, no guardrails (⚠️ DANGER)\n--max-budget-usd N\tSpend cap for automation safety\n--json-schema '<schema>'\tStructured output validation (with -p)\n--append-system-prompt '...'\tAdd to base prompt (doesn't replace)\n--system-prompt '...'\tReplace entire system prompt\n--agents '<json>'\tInline dynamic subagent definitions\n--model <model>\tOverride model (sonnet, haiku, opus)\n--add-dir <path>\tAdd extra directory to context\nPermission Modes\nMode\tBehavior\ndefault\tAsk per operation\nacceptEdits\tAuto-accept file edits (recommended for background tasks)\nplan\tRead-only exploration, no writes\ndontAsk\tAuto-deny unless pre-approved\nbypassPermissions\tSkip all permission prompts (⚠️ same effect as --dangerously-skip-permissions)\nSystem Prompt Modes\nFlag\tBehavior\n--append-system-prompt '...'\tAdds to the default system prompt — Claude Code keeps its built-in instructions\n--system-prompt '...'\tReplaces the entire system prompt — Claude Code loses all default behavior\n\nUse --append-system-prompt to add context or constraints. Use --system-prompt only when you need full control over the prompt (rare).\n\nGranular Tool Restrictions\n\nRestrict Claude Code's Bash tool to specific subcommands:\n\nexec pty:true command:\"claude --allowedTools 'Bash(git:*,npm:*),Read,Edit,Write,Glob,Grep' 'Your task'\"\n\nSession Continuity\n\nTrack and resume sessions across conversations.\n\n# Start a task\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode acceptEdits 'Build feature X'\"\n\n# Continue latest session\nexec pty:true workdir:~/project command:\"claude --continue\"\n\n# Resume specific session by ID\nexec pty:true workdir:~/project command:\"claude --resume abc123\"\n\n# Resume with interactive search (finds sessions matching the term)\nexec pty:true workdir:~/project command:\"claude --resume 'auth module'\"\n\n# Fork when resuming (creates new session ID, preserves original)\nexec pty:true workdir:~/project command:\"claude --continue --fork-session\"\n\n# Resume session linked to a PR\nexec pty:true workdir:~/project command:\"claude --from-pr 130\"\n\n# List recent sessions (find session IDs)\nexec command:\"claude sessions list\"\n\nHANDOFF.md Pattern (Long Sessions)\n\nFor tasks that exceed context limits, write progress to a handoff file:\n\n# In the Claude Code session, ask it to write progress\n# Then start a fresh session picking up from the handoff\nexec pty:true workdir:~/project command:\"claude 'Read HANDOFF.md and continue the work described there'\"\n\nPatterns\nQuick Start: One-Shot Task\n# Foreground with PTY\nexec pty:true workdir:~/project command:\"claude --permission-mode acceptEdits 'Add error handling to API calls'\"\n\n# Headless one-shot\nexec command:\"claude -p 'Summarize the codebase structure' --output-format json\"\n\nBackground Task with Monitoring\n# 1. Start\nexec pty:true workdir:~/project background:true timeout:3600 command:\"claude --permission-mode acceptEdits 'Build a complete auth module with JWT tokens'\"\n\n# 2. Monitor\nprocess action:log sessionId:XXX\nprocess action:poll sessionId:XXX\n\n# 3. Send input if needed\nprocess action:submit sessionId:XXX data:\"yes\"\n\n# 4. Kill if stuck\nprocess action:kill sessionId:XXX\n\nPR Review (Safe — Never in Live Workspace)\n\n⚠️ CRITICAL: Never review PRs in OpenClaw's own project folder!\n\n# Clone to temp dir and checkout PR\nexec command:\"git clone https://github.com/user/repo.git /tmp/pr-review && cd /tmp/pr-review && gh pr checkout 130\"\n\nexec pty:true workdir:/tmp/pr-review command:\"claude --permission-mode plan 'Review this PR. Focus on bugs, security issues, and performance. Show diff summary.'\"\n\n# Clean up\nexec command:\"rm -rf /tmp/pr-review\"\n\nParallel Issue Fixing with Git Worktrees\n# 1. Create worktrees\nexec command:\"git worktree add -b fix/issue-78 /tmp/issue-78 main\"\nexec command:\"git worktree add -b fix/issue-99 /tmp/issue-99 main\"\n\n# 2. Launch Claude Code in each (background + PTY)\nexec pty:true workdir:/tmp/issue-78 background:true command:\"claude --permission-mode acceptEdits 'Fix issue #78: <description>. Commit when done.\n\nWhen finished, run: openclaw system event --text \\\"Done: Fixed issue #78\\\" --mode now'\"\n\nexec pty:true workdir:/tmp/issue-99 background:true command:\"claude --permission-mode acceptEdits 'Fix issue #99: <description>. Commit when done.\n\nWhen finished, run: openclaw system event --text \\\"Done: Fixed issue #99\\\" --mode now'\"\n\n# 3. Monitor\nprocess action:list\n\n# 4. Create PRs\nexec command:\"cd /tmp/issue-78 && git push -u origin fix/issue-78\"\nexec command:\"gh pr create --repo user/repo --head fix/issue-78 --title 'fix: ...' --body '...'\"\n\n# 5. Cleanup\nexec command:\"git worktree remove /tmp/issue-78\"\nexec command:\"git worktree remove /tmp/issue-99\"\n\nFan-Out Pattern (Bulk Operations)\n\nDistribute work across parallel headless invocations:\n\n# Migrate multiple files in parallel (shell script via exec)\nexec command:\"for file in \\$(cat files-to-migrate.txt); do claude -p \\\"Migrate \\$file to new API\\\" --output-format json --max-budget-usd 1.00 & done; wait\"\n\nWriter/Reviewer Pattern (Dual Sessions)\n\nTwo parallel sessions — one implements, one reviews:\n\n# Session A: implement\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode acceptEdits 'Implement the feature described in SPEC.md'\"\n\n# Session B: review (read-only)\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode plan 'Watch for new changes and review them. Focus on correctness and test coverage.'\"\n\nInline Dynamic Subagents\n\nDefine agents without any files on disk:\n\nexec pty:true command:\"claude --agents '{\n  \\\"code-reviewer\\\": {\n    \\\"description\\\": \\\"Expert code reviewer\\\",\n    \\\"prompt\\\": \\\"You are a senior code reviewer. Focus on correctness, security, and performance.\\\",\n    \\\"tools\\\": [\\\"Read\\\", \\\"Grep\\\", \\\"Glob\\\", \\\"Bash\\\"],\n    \\\"model\\\": \\\"sonnet\\\"\n  },\n  \\\"implementer\\\": {\n    \\\"description\\\": \\\"Feature implementer\\\",\n    \\\"prompt\\\": \\\"You implement features following existing patterns.\\\",\n    \\\"tools\\\": [\\\"Read\\\", \\\"Edit\\\", \\\"Write\\\", \\\"Bash\\\", \\\"Glob\\\", \\\"Grep\\\"],\n    \\\"model\\\": \\\"sonnet\\\"\n  }\n}'\"\n\nAuto-Notify on Completion\n\nFor long-running background tasks, append a wake trigger so OpenClaw gets notified immediately:\n\nexec pty:true workdir:~/project background:true command:\"claude --permission-mode acceptEdits 'Build a REST API for todos.\n\nWhen completely finished, run this command to notify me:\nopenclaw system event --text \\\"Done: Built todos REST API with CRUD endpoints\\\" --mode now'\"\n\nProgress Updates\n\nWhen spawning background agents, keep the user informed:\n\nSend 1 short message on start (what's running + where)\nUpdate only on changes: milestone complete, agent needs input, error, or finish\nIf killing a session, say why immediately\nNever let the user see \"Agent failed\" with zero context\nSafety Rules\nAlways use pty:true for interactive mode\nUse --permission-mode acceptEdits for background tasks to prevent prompt stalls\nNever run in ~/.openclaw/ workspace\nNever checkout branches in live OpenClaw project dir\n--dangerously-skip-permissions gets explicit danger warning — prefer acceptEdits\nRespect user's tool choice — don't silently take over if agent fails\nBe patient — don't kill sessions because they're \"slow\"\nBudget cap automation — use --max-budget-usd for unattended headless runs\nMax 3-4 active sessions — more causes resource contention\nTimeout guidance — use 1800s+ for real tasks, don't let timeouts kill mid-work"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/AtelyPham/claude-code-cli",
    "publisherUrl": "https://clawhub.ai/AtelyPham/claude-code-cli",
    "owner": "AtelyPham",
    "version": "0.2.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/claude-code-cli",
    "downloadUrl": "https://openagent3.xyz/downloads/claude-code-cli",
    "agentUrl": "https://openagent3.xyz/skills/claude-code-cli/agent",
    "manifestUrl": "https://openagent3.xyz/skills/claude-code-cli/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/claude-code-cli/agent.md"
  }
}