AgentSkillsCN

relay

从Claude Code调用Codex,并返回结构化的结果。可通过“询问Codex”“拥有Codex”“发送至Codex”“让Codex完成”“委托Codex”“寻求第二意见”“转接”等指令触发。调用时使用“/relay”。

SKILL.md
--- frontmatter
name: relay
description: |
  Call Codex from Claude Code and return a structured result. Triggers on
  "ask codex", "have codex", "send to codex", "get codex to", "delegate to
  codex", "second opinion", "relay". Invoke with /relay.
allowed-tools: Read, Write, Bash(~/.claude/skills/relay/scripts/relay:*), Bash(codex exec:*), Bash(find:*), Bash(printf:*)
user-invocable: true

Relay

Call Codex like a function:

code
relay(task, session?) → {status, verify, body}

Use the relay script at scripts/relay (inside this skill directory) to generate request/response files. Do not manually construct frontmatter.

One-Shot Call

Run as a single chained command so shell variables persist:

bash
REQ=$(~/.claude/skills/relay/scripts/relay req --from claude --to codex --name auth-review "Review src/auth.py for security issues. Run pytest to verify.") && codex exec --model gpt-5.3-codex -c 'model_reasoning_effort="xhigh"' --full-auto "Read and execute $REQ"

Read the response:

bash
RES="${REQ%.req.md}.res.md"

Session Call

Sessions keep turn history so the receiver sees full context from both agents.

bash
REQ=$(~/.claude/skills/relay/scripts/relay req --from claude --to codex --session auth-refactor "Fix the issues from my review. Run pytest to verify.") && codex exec --model gpt-5.3-codex -c 'model_reasoning_effort="xhigh"' --full-auto "Read and execute $REQ"

Read the response:

bash
RES="${REQ%.req.md}.res.md"

Output

Read the response file:

  • status: done | error
  • verify: pass | fail | skip
  • body: findings, changes, reasoning — free-form markdown

If the request includes a verify command, run it and set verify: pass or verify: fail; include the command and key result in the body. If no verify command is provided or verification is not feasible, set verify: skip and state why briefly.

If the response file is missing, report failure — do not retry.