{
  "schemaVersion": "1.0",
  "item": {
    "slug": "coding-agent-backup",
    "name": "Coding Agent Backup",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/nickchan0412/coding-agent-backup",
    "canonicalUrl": "https://clawhub.ai/nickchan0412/coding-agent-backup",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/coding-agent-backup",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=coding-agent-backup",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "config.json",
      "index.js"
    ],
    "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. 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. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-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/coding-agent-backup"
    },
    "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/coding-agent-backup",
    "agentPageUrl": "https://openagent3.xyz/skills/coding-agent-backup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/coding-agent-backup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/coding-agent-backup/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. 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. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Coding Agent (bash-first)",
        "body": "Use bash (with optional background mode) for all coding agent work. Simple and effective."
      },
      {
        "title": "⚠️ PTY Mode Required!",
        "body": "Coding 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\nAlways use pty:true when running coding agents:\n\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'\""
      },
      {
        "title": "Bash Tool Parameters",
        "body": "ParameterTypeDescriptioncommandstringThe shell command to runptybooleanUse for coding agents! Allocates a pseudo-terminal for interactive CLIsworkdirstringWorking directory (agent sees only this folder's context)backgroundbooleanRun in background, returns sessionId for monitoringtimeoutnumberTimeout in seconds (kills process on expiry)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": "Quick Start: One-Shot Tasks",
        "body": "For quick prompts/chats, create a temp git repo and run:\n\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\nWhy git init? Codex refuses to run outside a trusted git directory. Creating a temp repo solves this for scratch work."
      },
      {
        "title": "The Pattern: workdir + background + pty",
        "body": "For longer tasks, use background mode with PTY:\n\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\nWhy workdir matters: Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md 😅)."
      },
      {
        "title": "Codex CLI",
        "body": "Model: gpt-5.2-codex is the default (set in ~/.codex/config.toml)"
      },
      {
        "title": "Flags",
        "body": "FlagEffectexec \"prompt\"One-shot execution, exits when done--full-autoSandboxed but auto-approves in workspace--yoloNO sandbox, NO approvals (fastest, most dangerous)"
      },
      {
        "title": "Building/Creating",
        "body": "# 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'\""
      },
      {
        "title": "Reviewing PRs",
        "body": "⚠️ CRITICAL: Never review PRs in OpenClaw's own project folder!\nClone to temp folder or use git worktree.\n\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\""
      },
      {
        "title": "Batch PR Reviews (parallel army!)",
        "body": "# 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>\""
      },
      {
        "title": "Claude Code",
        "body": "# 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'\""
      },
      {
        "title": "OpenCode",
        "body": "bash pty:true workdir:~/project command:\"opencode run 'Your task'\""
      },
      {
        "title": "Pi Coding Agent",
        "body": "# 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\nNote: Pi now has Anthropic prompt caching enabled (PR #584, merged Jan 2026)!"
      },
      {
        "title": "Parallel Issue Fixing with git worktrees",
        "body": "For fixing multiple issues in parallel, use git worktrees:\n\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 from the approved ticket summary. Implement only the in-scope edits and commit after review.'\"\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"
      },
      {
        "title": "⚠️ Rules",
        "body": "Always use pty:true - coding agents need a terminal!\nRespect tool choice - if user asks for Codex, use Codex.\n\nOrchestrator mode: do NOT hand-code patches yourself.\nIf an agent fails/hangs, respawn it or ask the user for direction, but don't silently take over.\n\n\nBe patient - don't kill sessions because they're \"slow\"\nMonitor with process:log - check progress without interfering\n--full-auto for building - auto-approves changes\nvanilla for reviewing - no special flags needed\nParallel is OK - run many Codex processes at once for batch work\nNEVER start Codex in ~/.openclaw/ - it'll read your soul docs and get weird ideas about the org chart!\nNEVER checkout branches in ~/Projects/openclaw/ - that's the LIVE OpenClaw instance!"
      },
      {
        "title": "Progress Updates (Critical)",
        "body": "When you spawn coding agents in the background, keep the user in the loop.\n\nSend 1 short message when you start (what's running + where).\nThen only update again when something changes:\n\na milestone completes (build finished, tests passed)\nthe agent asks a question / needs input\nyou hit an error or need user action\nthe agent finishes (include what changed + where)\n\n\nIf 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."
      },
      {
        "title": "Auto-Notify on Completion",
        "body": "For long-running background tasks, append a wake trigger to your prompt so OpenClaw gets notified immediately when the agent finishes (instead of waiting for the next heartbeat):\n\n... your task here.\n\nWhen completely finished, run this command to notify me:\nopenclaw system event --text \"Done: [brief summary of what was built]\" --mode now\n\nExample:\n\nbash pty:true workdir:~/project background:true command:\"codex --yolo exec 'Build a REST API for todos.\n\nWhen completely finished, run: openclaw system event --text \\\"Done: Built todos REST API with CRUD endpoints\\\" --mode now'\"\n\nThis triggers an immediate wake event — Skippy gets pinged in seconds, not 10 minutes."
      },
      {
        "title": "Learnings (Jan 2026)",
        "body": "PTY is essential: Coding agents are interactive terminal apps. Without pty:true, output breaks or agent hangs.\nGit repo required: Codex won't run outside a git directory. Use mktemp -d && git init for scratch work.\nexec is your friend: codex exec \"prompt\" runs and exits cleanly - perfect for one-shots.\nsubmit vs write: Use submit to send input + Enter, write for raw data without newline.\nSass 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\" 🦞"
      }
    ],
    "body": "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\nAlways use pty:true when running coding agents:\n\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\nBash Tool Parameters\nParameter\tType\tDescription\ncommand\tstring\tThe shell command to run\npty\tboolean\tUse for coding agents! Allocates a pseudo-terminal for interactive CLIs\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 (kills process on expiry)\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\nQuick Start: One-Shot Tasks\n\nFor quick prompts/chats, create a temp git repo and run:\n\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\nWhy git init? Codex refuses to run outside a trusted git directory. Creating a temp repo solves this for scratch work.\n\nThe Pattern: workdir + background + pty\n\nFor longer tasks, use background mode with PTY:\n\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\nWhy workdir matters: Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md 😅).\n\nCodex CLI\n\nModel: gpt-5.2-codex is the default (set in ~/.codex/config.toml)\n\nFlags\nFlag\tEffect\nexec \"prompt\"\tOne-shot execution, exits when done\n--full-auto\tSandboxed but auto-approves in workspace\n--yolo\tNO sandbox, NO approvals (fastest, most dangerous)\nBuilding/Creating\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\nReviewing PRs\n\n⚠️ CRITICAL: Never review PRs in OpenClaw's own project folder! Clone to temp folder or use git worktree.\n\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\nBatch PR Reviews (parallel army!)\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\nClaude Code\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\nOpenCode\nbash pty:true workdir:~/project command:\"opencode run 'Your task'\"\n\nPi Coding Agent\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\nNote: Pi now has Anthropic prompt caching enabled (PR #584, merged Jan 2026)!\n\nParallel Issue Fixing with git worktrees\n\nFor fixing multiple issues in parallel, use git worktrees:\n\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 from the approved ticket summary. Implement only the in-scope edits and commit after review.'\"\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⚠️ Rules\nAlways use pty:true - coding agents need a terminal!\nRespect tool choice - if user asks for Codex, use Codex.\nOrchestrator mode: do NOT hand-code patches yourself.\nIf an agent fails/hangs, respawn it or ask the user for direction, but don't silently take over.\nBe patient - don't kill sessions because they're \"slow\"\nMonitor with process:log - check progress without interfering\n--full-auto for building - auto-approves changes\nvanilla for reviewing - no special flags needed\nParallel is OK - run many Codex processes at once for batch work\nNEVER start Codex in ~/.openclaw/ - it'll read your soul docs and get weird ideas about the org chart!\nNEVER checkout branches in ~/Projects/openclaw/ - that's the LIVE OpenClaw instance!\nProgress Updates (Critical)\n\nWhen you spawn coding agents in the background, keep the user in the loop.\n\nSend 1 short message when you start (what's running + where).\nThen only update again when something changes:\na milestone completes (build finished, tests passed)\nthe agent asks a question / needs input\nyou hit an error or need user action\nthe agent finishes (include what changed + where)\nIf 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\nAuto-Notify on Completion\n\nFor long-running background tasks, append a wake trigger to your prompt so OpenClaw gets notified immediately when the agent finishes (instead of waiting for the next heartbeat):\n\n... your task here.\n\nWhen completely finished, run this command to notify me:\nopenclaw system event --text \"Done: [brief summary of what was built]\" --mode now\n\n\nExample:\n\nbash pty:true workdir:~/project background:true command:\"codex --yolo exec 'Build a REST API for todos.\n\nWhen completely finished, run: openclaw system event --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\nLearnings (Jan 2026)\nPTY is essential: Coding agents are interactive terminal apps. Without pty:true, output breaks or agent hangs.\nGit repo required: Codex won't run outside a git directory. Use mktemp -d && git init for scratch work.\nexec is your friend: codex exec \"prompt\" runs and exits cleanly - perfect for one-shots.\nsubmit vs write: Use submit to send input + Enter, write for raw data without newline.\nSass 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\" 🦞"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/nickchan0412/coding-agent-backup",
    "publisherUrl": "https://clawhub.ai/nickchan0412/coding-agent-backup",
    "owner": "nickchan0412",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/coding-agent-backup",
    "downloadUrl": "https://openagent3.xyz/downloads/coding-agent-backup",
    "agentUrl": "https://openagent3.xyz/skills/coding-agent-backup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/coding-agent-backup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/coding-agent-backup/agent.md"
  }
}