← 返回 Skills 市场
jlacroix82

Codex Delegate

作者 jlacroix82 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
45
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-codex-delegate
功能描述
Use when OpenClaw should delegate coding, repository analysis, file edits, test runs, or code review to the local Codex CLI without asking for or embedding a...
使用说明 (SKILL.md)

Codex Delegate

Use this skill when the user wants OpenClaw to hand a coding or repository task to Codex and receive a result back. It is meant for local, trusted operator setups where codex is already installed and signed in.

Preconditions

  • codex is installed on PATH.
  • Codex CLI has already been authenticated by the operator, preferably with ChatGPT sign-in. Do not ask the user for an API key.
  • Run inside the target repository or pass --cwd.
  • OpenClaw must allow this agent to use exec for the wrapper script.

If Codex is not authenticated, tell the operator to run codex or codex login once and complete the ChatGPT browser login. Do not request, print, copy, or inspect ~/.codex/auth.json.

Wrapper

Prefer the bundled wrapper:

{baseDir}/scripts/codex-delegate.sh --cwd /path/to/repo --prompt "summarize the repository and list the riskiest files"

For file creation or edits:

{baseDir}/scripts/codex-delegate.sh \
  --cwd /path/to/repo \
  --sandbox workspace-write \
  --prompt "Create docs/architecture.md explaining the current service layout."

For machine-readable event logs while still returning the final Codex answer:

{baseDir}/scripts/codex-delegate.sh \
  --cwd /path/to/repo \
  --sandbox workspace-write \
  --json-log .openclaw/codex-runs/last.jsonl \
  --output .openclaw/codex-runs/last.md \
  --prompt "Review the auth changes and fix any failing tests."

To pass CLI-style context:

npm test 2>&1 | {baseDir}/scripts/codex-delegate.sh \
  --cwd /path/to/repo \
  --sandbox workspace-write \
  --prompt "Summarize the failing tests and make the smallest safe fix."

Use --prompt-file path when a generated prompt is already on disk. Use --stdin-file path when another tool wrote context to a file.

Delegation Workflow

  1. Restate the exact Codex task in one compact prompt.
  2. Choose the narrowest sandbox:
    • read-only for analysis, review, summaries, planning.
    • workspace-write for creating or editing files in the repo.
    • danger-full-access only on an isolated machine/container with explicit operator approval.
  3. Run the wrapper from the repository root or with --cwd.
  4. Return Codex's final answer to the user.
  5. If edits were allowed, inspect git diff --stat and relevant diffs before claiming files were changed.

Safety Rules

  • Never pass OPENAI_API_KEY, CODEX_API_KEY, or raw tokens to Codex. The wrapper unsets API-key env vars before invoking codex exec.
  • Never read, reveal, summarize, or copy ~/.codex/auth.json.
  • Do not run this skill from public or untrusted chat channels.
  • Do not give Codex secrets, credentials, private keys, or production data unless the operator explicitly approved that exact data flow.
  • Prefer an isolated checkout or git worktree for write tasks.
  • Treat Codex output as another agent's report; verify important claims locally.

Failure Handling

  • codex: command not found: ask the operator to install Codex CLI.
  • Authentication failure: ask the operator to run codex login with ChatGPT sign-in, then retry.
  • Git repo error: run in a git repository, or use --skip-git-repo-check only for a deliberately isolated scratch workspace.
  • Permission error on edits: retry with --sandbox workspace-write only if file changes are intended.
安全使用建议
Install only if you intentionally want OpenClaw to hand coding work to your local Codex CLI. Use explicit wording when invoking it, approve workspace-write or danger-full-access only for tasks that need those permissions, and avoid sending secrets, private keys, or production data unless you have deliberately approved that exact data flow.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is to delegate repository analysis, edits, tests, and review to Codex CLI; the wrapper and documentation match that purpose.
Instruction Scope
The README uses broad natural-language triggers like "use Codex" and "delegate to Codex," but the skill instructions scope use to coding or repository tasks and recommend read-only by default.
Install Mechanism
Installation is conventional through ClawHub or a manual copy into the OpenClaw skills directory; no hidden install-time execution is shown.
Credentials
The skill requires the local codex binary and existing Codex authentication, which is proportionate to delegating work to Codex; it explicitly avoids requesting API keys or reading auth.json.
Persistence & Privilege
The wrapper can write optional JSON logs and output files, and can invoke workspace-write or danger-full-access modes, but these are documented options with read-only as the default and full access described as requiring explicit approval.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-codex-delegate
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-codex-delegate 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of the codex-delegate skill. - Enables OpenClaw to delegate coding, repository analysis, file edits, test runs, and code review tasks to the local Codex CLI. - Requires Codex to be installed and authenticated locally; does not use or request API keys. - Provides recommended execution via a bundled shell wrapper script with support for different sandboxes and context passing. - Lists clear safety measures, preconditions, and failure handling steps for secure and reliable delegation. - Returns Codex's final output directly to the user, ensuring seamless integration.
元数据
Slug agent-codex-delegate
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Codex Delegate 是什么?

Use when OpenClaw should delegate coding, repository analysis, file edits, test runs, or code review to the local Codex CLI without asking for or embedding a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 45 次。

如何安装 Codex Delegate?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-codex-delegate」即可一键安装,无需额外配置。

Codex Delegate 是免费的吗?

是的,Codex Delegate 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Codex Delegate 支持哪些平台?

Codex Delegate 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Codex Delegate?

由 jlacroix82(@jlacroix82)开发并维护,当前版本 v0.1.0。

💬 留言讨论