{
  "schemaVersion": "1.0",
  "item": {
    "slug": "codex-sub-agents-1",
    "name": "Codex Sub Agents 1",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/phucanh08/codex-sub-agents-1",
    "canonicalUrl": "https://clawhub.ai/phucanh08/codex-sub-agents-1",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/codex-sub-agents-1",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=codex-sub-agents-1",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "_meta.json",
      "clawdbot-integration.md",
      "cli-reference.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. 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/codex-sub-agents-1"
    },
    "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/codex-sub-agents-1",
    "agentPageUrl": "https://openagent3.xyz/skills/codex-sub-agents-1/agent",
    "manifestUrl": "https://openagent3.xyz/skills/codex-sub-agents-1/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/codex-sub-agents-1/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": "OpenAI Codex CLI Skill",
        "body": "Use OpenAI Codex CLI (codex) for coding tasks including code review, refactoring, bug fixes, CI repairs, and feature implementation. Codex CLI runs locally on your machine with full filesystem access."
      },
      {
        "title": "When to Use",
        "body": "User asks for code changes, refactoring, or implementation\nCI/build failures need fixing\nCode review before commit/push\nLarge codebase exploration or explanation\nTasks requiring file editing + command execution\nWhen GPT-5-Codex model strengths are needed (code generation, tool use)"
      },
      {
        "title": "Installation & Auth",
        "body": "Codex CLI requires ChatGPT Plus/Pro/Business/Enterprise subscription.\n\n# Install\nnpm i -g @openai/codex\n\n# Authenticate (opens browser for OAuth)\ncodex login\n\n# Or use API key\nprintenv OPENAI_API_KEY | codex login --with-api-key\n\n# Verify auth\ncodex login status"
      },
      {
        "title": "Interactive Mode (TUI)",
        "body": "codex                           # Launch interactive terminal UI\ncodex \"explain this codebase\"   # Start with a prompt\ncodex --cd ~/projects/myapp     # Set working directory"
      },
      {
        "title": "Non-Interactive (Scripting)",
        "body": "codex exec \"fix the CI failure\"                    # Run and exit\ncodex exec --full-auto \"add input validation\"      # Auto-approve workspace writes\ncodex exec --json \"list all API endpoints\"         # JSON output for parsing\ncodex exec -i screenshot.png \"match this design\"   # With image input"
      },
      {
        "title": "Session Management",
        "body": "codex resume               # Pick from recent sessions\ncodex resume --last        # Continue most recent\ncodex resume <SESSION_ID>  # Resume specific session"
      },
      {
        "title": "Slash Commands (In TUI)",
        "body": "CommandPurpose/modelSwitch model (gpt-5-codex, gpt-5)/approvalsSet approval mode (Auto, Read Only, Full Access)/reviewCode review against branch, uncommitted changes, or specific commit/diffShow Git diff including untracked files/compactSummarize conversation to free context/initGenerate AGENTS.md scaffold/statusShow session config and token usage/undoRevert most recent turn/newStart fresh conversation/mcpList configured MCP tools/mention <path>Attach file to conversation"
      },
      {
        "title": "Approval Modes",
        "body": "ModeBehaviorAuto (default)Read/edit/run commands in workspace; asks for outside accessRead OnlyBrowse files only; requires approval for changesFull AccessFull machine access including network (use sparingly)"
      },
      {
        "title": "Key Flags",
        "body": "FlagPurpose--model, -m <model>Override model (gpt-5-codex, gpt-5)--cd, -C <path>Set working directory--add-dir <path>Add additional writable roots--image, -i <path>Attach image(s) to prompt--full-autoWorkspace write + approve on failure--sandbox <mode>read-only, workspace-write, danger-full-access--jsonOutput newline-delimited JSON--searchEnable web search tool"
      },
      {
        "title": "Pattern 1: Direct exec Tool",
        "body": "Call Codex from Clawdbot's exec tool for coding tasks:\n\n# In Clawdbot session\nexec codex exec --full-auto --cd ~/projects/medreport \"fix the TypeScript errors in src/components\""
      },
      {
        "title": "Pattern 2: Subagent Delegation",
        "body": "Spawn a coding subagent that uses Codex:\n\n// In agents.defaults or per-agent config\n{\n  agents: {\n    list: [\n      {\n        id: \"coder\",\n        workspace: \"~/clawd-coder\",\n        model: \"openai-codex/gpt-5.2\",  // Uses Codex auth\n        tools: {\n          allow: [\"exec\", \"read\", \"write\", \"edit\", \"apply_patch\", \"process\"]\n        }\n      }\n    ]\n  }\n}"
      },
      {
        "title": "Pattern 3: CLI Backend Fallback",
        "body": "Configure Codex as a text-only fallback:\n\n{\n  agents: {\n    defaults: {\n      cliBackends: {\n        \"codex-cli\": {\n          command: \"codex\",\n          args: [\"exec\", \"--full-auto\"],\n          output: \"text\",\n          sessionArg: null  // Codex manages its own sessions\n        }\n      }\n    }\n  }\n}"
      },
      {
        "title": "Pattern 4: MCP Server Mode",
        "body": "Run Codex as an MCP server for other agents:\n\ncodex mcp-server  # Exposes Codex tools via stdio MCP"
      },
      {
        "title": "Clawdbot Config: OpenAI Codex Provider",
        "body": "Use your ChatGPT Pro subscription via the openai-codex provider:\n\n{\n  agents: {\n    defaults: {\n      model: { primary: \"openai-codex/gpt-5.2\" },\n      models: {\n        \"openai-codex/gpt-5.2\": { alias: \"Codex\" },\n        \"anthropic/claude-opus-4-5\": { alias: \"Opus\" }\n      }\n    }\n  }\n}\n\nAuth syncs automatically from ~/.codex/auth.json to Clawdbot's auth profiles."
      },
      {
        "title": "Code Review Workflow",
        "body": "# Interactive review\ncodex\n/review  # Choose: branch, uncommitted, or specific commit\n\n# Non-interactive\ncodex exec \"review the changes in this PR against main branch\""
      },
      {
        "title": "Multi-Directory Projects",
        "body": "# Work across monorepo packages\ncodex --cd apps/frontend --add-dir ../backend --add-dir ../shared\n\n# Or in TUI\ncodex --cd ~/projects/myapp --add-dir ~/projects/shared-lib"
      },
      {
        "title": "Custom Slash Commands",
        "body": "Create reusable prompts in ~/.codex/prompts/:\n\n<!-- ~/.codex/prompts/pr.md -->\n---\ndescription: Prepare and open a draft PR\nargument-hint: [BRANCH=<name>] [TITLE=\"<title>\"]\n---\n\nCreate branch `dev/$BRANCH` if specified.\nStage and commit changes with a clear message.\nOpen a draft PR with title $TITLE or auto-generate one.\n\nInvoke: /prompts:pr BRANCH=feature-auth TITLE=\"Add OAuth flow\""
      },
      {
        "title": "MCP Integration",
        "body": "Add MCP servers to extend Codex:\n\n# Add stdio server\ncodex mcp add github -- npx @anthropic/mcp-server-github\n\n# Add HTTP server\ncodex mcp add docs --url https://mcp.deepwiki.com/mcp\n\n# List configured\ncodex mcp list"
      },
      {
        "title": "Web Search",
        "body": "Enable in ~/.codex/config.toml:\n\n[features]\nweb_search_request = true\n\n[sandbox_workspace_write]\nnetwork_access = true\n\nThen Codex can search for current docs, APIs, etc."
      },
      {
        "title": "Best Practices",
        "body": "Start with /init to create AGENTS.md with repo-specific instructions\nUse /review before commits for AI code review\nSet /approvals appropriately — Auto for trusted repos, Read Only for exploration\nUse --add-dir for monorepos instead of danger-full-access\nResume sessions to maintain context across coding sessions\nAttach images for UI work, design specs, error screenshots"
      },
      {
        "title": "Fix CI Failure",
        "body": "codex exec --full-auto \"The CI is failing on the lint step. Fix all ESLint errors.\""
      },
      {
        "title": "Refactor Component",
        "body": "codex exec --cd src/components \"Refactor UserProfile.tsx to use React Query instead of useEffect for data fetching\""
      },
      {
        "title": "Implement Feature from Spec",
        "body": "codex exec -i spec.png --cd ~/projects/app \"Implement this feature based on the design spec\""
      },
      {
        "title": "Code Review PR",
        "body": "codex exec \"Review the diff between main and feature/auth branch. Focus on security issues.\""
      },
      {
        "title": "Troubleshooting",
        "body": "IssueSolutionAuth failsRun codex logout then codex loginCommands blockedCheck /approvals, may need --full-autoOut of contextUse /compact to summarizeWrong directoryUse --cd flag or check /statusModel unavailableVerify subscription tier supports model"
      },
      {
        "title": "References",
        "body": "Codex CLI Overview\nCodex CLI Features\nCodex CLI Reference\nSlash Commands Guide\nAGENTS.md Spec\nCodex GitHub"
      }
    ],
    "body": "OpenAI Codex CLI Skill\n\nUse OpenAI Codex CLI (codex) for coding tasks including code review, refactoring, bug fixes, CI repairs, and feature implementation. Codex CLI runs locally on your machine with full filesystem access.\n\nWhen to Use\nUser asks for code changes, refactoring, or implementation\nCI/build failures need fixing\nCode review before commit/push\nLarge codebase exploration or explanation\nTasks requiring file editing + command execution\nWhen GPT-5-Codex model strengths are needed (code generation, tool use)\nInstallation & Auth\n\nCodex CLI requires ChatGPT Plus/Pro/Business/Enterprise subscription.\n\n# Install\nnpm i -g @openai/codex\n\n# Authenticate (opens browser for OAuth)\ncodex login\n\n# Or use API key\nprintenv OPENAI_API_KEY | codex login --with-api-key\n\n# Verify auth\ncodex login status\n\nCore Commands\nInteractive Mode (TUI)\ncodex                           # Launch interactive terminal UI\ncodex \"explain this codebase\"   # Start with a prompt\ncodex --cd ~/projects/myapp     # Set working directory\n\nNon-Interactive (Scripting)\ncodex exec \"fix the CI failure\"                    # Run and exit\ncodex exec --full-auto \"add input validation\"      # Auto-approve workspace writes\ncodex exec --json \"list all API endpoints\"         # JSON output for parsing\ncodex exec -i screenshot.png \"match this design\"   # With image input\n\nSession Management\ncodex resume               # Pick from recent sessions\ncodex resume --last        # Continue most recent\ncodex resume <SESSION_ID>  # Resume specific session\n\nSlash Commands (In TUI)\nCommand\tPurpose\n/model\tSwitch model (gpt-5-codex, gpt-5)\n/approvals\tSet approval mode (Auto, Read Only, Full Access)\n/review\tCode review against branch, uncommitted changes, or specific commit\n/diff\tShow Git diff including untracked files\n/compact\tSummarize conversation to free context\n/init\tGenerate AGENTS.md scaffold\n/status\tShow session config and token usage\n/undo\tRevert most recent turn\n/new\tStart fresh conversation\n/mcp\tList configured MCP tools\n/mention <path>\tAttach file to conversation\nApproval Modes\nMode\tBehavior\nAuto (default)\tRead/edit/run commands in workspace; asks for outside access\nRead Only\tBrowse files only; requires approval for changes\nFull Access\tFull machine access including network (use sparingly)\nKey Flags\nFlag\tPurpose\n--model, -m <model>\tOverride model (gpt-5-codex, gpt-5)\n--cd, -C <path>\tSet working directory\n--add-dir <path>\tAdd additional writable roots\n--image, -i <path>\tAttach image(s) to prompt\n--full-auto\tWorkspace write + approve on failure\n--sandbox <mode>\tread-only, workspace-write, danger-full-access\n--json\tOutput newline-delimited JSON\n--search\tEnable web search tool\nClawdbot Integration Patterns\nPattern 1: Direct exec Tool\n\nCall Codex from Clawdbot's exec tool for coding tasks:\n\n# In Clawdbot session\nexec codex exec --full-auto --cd ~/projects/medreport \"fix the TypeScript errors in src/components\"\n\nPattern 2: Subagent Delegation\n\nSpawn a coding subagent that uses Codex:\n\n// In agents.defaults or per-agent config\n{\n  agents: {\n    list: [\n      {\n        id: \"coder\",\n        workspace: \"~/clawd-coder\",\n        model: \"openai-codex/gpt-5.2\",  // Uses Codex auth\n        tools: {\n          allow: [\"exec\", \"read\", \"write\", \"edit\", \"apply_patch\", \"process\"]\n        }\n      }\n    ]\n  }\n}\n\nPattern 3: CLI Backend Fallback\n\nConfigure Codex as a text-only fallback:\n\n{\n  agents: {\n    defaults: {\n      cliBackends: {\n        \"codex-cli\": {\n          command: \"codex\",\n          args: [\"exec\", \"--full-auto\"],\n          output: \"text\",\n          sessionArg: null  // Codex manages its own sessions\n        }\n      }\n    }\n  }\n}\n\nPattern 4: MCP Server Mode\n\nRun Codex as an MCP server for other agents:\n\ncodex mcp-server  # Exposes Codex tools via stdio MCP\n\nClawdbot Config: OpenAI Codex Provider\n\nUse your ChatGPT Pro subscription via the openai-codex provider:\n\n{\n  agents: {\n    defaults: {\n      model: { primary: \"openai-codex/gpt-5.2\" },\n      models: {\n        \"openai-codex/gpt-5.2\": { alias: \"Codex\" },\n        \"anthropic/claude-opus-4-5\": { alias: \"Opus\" }\n      }\n    }\n  }\n}\n\n\nAuth syncs automatically from ~/.codex/auth.json to Clawdbot's auth profiles.\n\nCode Review Workflow\n# Interactive review\ncodex\n/review  # Choose: branch, uncommitted, or specific commit\n\n# Non-interactive\ncodex exec \"review the changes in this PR against main branch\"\n\nMulti-Directory Projects\n# Work across monorepo packages\ncodex --cd apps/frontend --add-dir ../backend --add-dir ../shared\n\n# Or in TUI\ncodex --cd ~/projects/myapp --add-dir ~/projects/shared-lib\n\nCustom Slash Commands\n\nCreate reusable prompts in ~/.codex/prompts/:\n\n<!-- ~/.codex/prompts/pr.md -->\n---\ndescription: Prepare and open a draft PR\nargument-hint: [BRANCH=<name>] [TITLE=\"<title>\"]\n---\n\nCreate branch `dev/$BRANCH` if specified.\nStage and commit changes with a clear message.\nOpen a draft PR with title $TITLE or auto-generate one.\n\n\nInvoke: /prompts:pr BRANCH=feature-auth TITLE=\"Add OAuth flow\"\n\nMCP Integration\n\nAdd MCP servers to extend Codex:\n\n# Add stdio server\ncodex mcp add github -- npx @anthropic/mcp-server-github\n\n# Add HTTP server\ncodex mcp add docs --url https://mcp.deepwiki.com/mcp\n\n# List configured\ncodex mcp list\n\nWeb Search\n\nEnable in ~/.codex/config.toml:\n\n[features]\nweb_search_request = true\n\n[sandbox_workspace_write]\nnetwork_access = true\n\n\nThen Codex can search for current docs, APIs, etc.\n\nBest Practices\nStart with /init to create AGENTS.md with repo-specific instructions\nUse /review before commits for AI code review\nSet /approvals appropriately — Auto for trusted repos, Read Only for exploration\nUse --add-dir for monorepos instead of danger-full-access\nResume sessions to maintain context across coding sessions\nAttach images for UI work, design specs, error screenshots\nExample Workflows\nFix CI Failure\ncodex exec --full-auto \"The CI is failing on the lint step. Fix all ESLint errors.\"\n\nRefactor Component\ncodex exec --cd src/components \"Refactor UserProfile.tsx to use React Query instead of useEffect for data fetching\"\n\nImplement Feature from Spec\ncodex exec -i spec.png --cd ~/projects/app \"Implement this feature based on the design spec\"\n\nCode Review PR\ncodex exec \"Review the diff between main and feature/auth branch. Focus on security issues.\"\n\nTroubleshooting\nIssue\tSolution\nAuth fails\tRun codex logout then codex login\nCommands blocked\tCheck /approvals, may need --full-auto\nOut of context\tUse /compact to summarize\nWrong directory\tUse --cd flag or check /status\nModel unavailable\tVerify subscription tier supports model\nReferences\nCodex CLI Overview\nCodex CLI Features\nCodex CLI Reference\nSlash Commands Guide\nAGENTS.md Spec\nCodex GitHub"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/phucanh08/codex-sub-agents-1",
    "publisherUrl": "https://clawhub.ai/phucanh08/codex-sub-agents-1",
    "owner": "phucanh08",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/codex-sub-agents-1",
    "downloadUrl": "https://openagent3.xyz/downloads/codex-sub-agents-1",
    "agentUrl": "https://openagent3.xyz/skills/codex-sub-agents-1/agent",
    "manifestUrl": "https://openagent3.xyz/skills/codex-sub-agents-1/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/codex-sub-agents-1/agent.md"
  }
}