一键导入
agent-relay
// Use when you need Codex to coordinate multiple agents through Relaycast for peer-to-peer messaging, lead/worker handoffs, or shared status tracking across sub-agents and terminals.
// Use when you need Codex to coordinate multiple agents through Relaycast for peer-to-peer messaging, lead/worker handoffs, or shared status tracking across sub-agents and terminals.
| name | agent-relay |
| description | Use when you need Codex to coordinate multiple agents through Relaycast for peer-to-peer messaging, lead/worker handoffs, or shared status tracking across sub-agents and terminals. |
Use this skill when Codex needs real-time coordination across multiple agents. It gives Codex a repeatable workflow for:
Relay fills the peer-to-peer gap in Codex sub-agent workflows. Codex can spawn and collect worker results, but Relaycast gives those workers a shared message bus so they can talk to the lead and to each other.
On first activation, this skill auto-configures Codex by running scripts/setup.sh. This adds the Agent Relay MCP server to .codex/config.toml, enables hooks, installs hooks.json, and copies the relay-worker.toml agent definition. No manual setup is required after installing the skill.
Every relay-connected Codex agent must complete these steps IN ORDER before substantive work:
Set up a workspace.
RELAY_API_KEY is set in the environment, call set_workspace_key with that key.create_workspace to auto-create one. This returns a workspace key — save it for workers.Register as an agent. Call register_agent with your agent name and type: "agent". Use RELAY_AGENT_NAME from the environment if set, otherwise derive a name from the task context (e.g., lead, auth-worker).
Tell the user they can follow the conversation live at https://agentrelay.com/observer?key=<workspace_key> (use the workspace key from step 1). This lets them watch all agent messages in real time.
Check the relay inbox. Call check_inbox to see if there are any pending messages or task assignments.
Send an ACK. If you received a task assignment, send ACK: <one-sentence understanding> to your lead via send_dm. If the assignment is unclear, send BLOCKED: <question> instead of guessing.
When the task is complete, send DONE: <summary with evidence> before stopping.
If workspace creation or registration fails, retry once, then report the failure to the user — do not proceed without a relay connection.
Do not assume the current MCP session already has an active Relaycast workspace. Always call set_workspace_key or create_workspace before registering.
as: "<agent-name>" on relay calls that support explicit attribution.ACK: I understand the assignment and I am starting work on <scope>.STATUS: Finished <milestone>; next I am doing <next-step>.BLOCKED: I cannot continue because <blocker>.DONE: Completed <scope>. Evidence: <files changed, commands run, tests, or decisions>.There are two ways to create workers. Use the right one for the job:
Use add_agent to create a Relaycast-native agent. Best for tasks that are primarily about messaging, inbox checks, coordination, or lightweight work that doesn't need a full Codex sub-agent runtime.
Lead steps:
set_workspace_key or create_workspace).register_agent).add_agent(name: "worker-name", type: "agent").send_dm(to: "worker-name", text: "...").check_inbox).Worker steps:
check_inbox).send_dm.send_dm.Use spawn_agent with the relay-worker agent definition for tasks that need full code editing, file access, and tool use. The worker gets its own Codex runtime with Relaycast MCP tools available.
Lead steps:
Worker steps:
set_workspace_key with the workspace key from the task prompt.register_agent.If a worker does not ACK within 30 seconds:
list_agents.add_agent.send_dm.Worker: api-worker
Type: relay workspace agent (use add_agent, not spawn_agent)
Lead: lead
Scope: check the Relaycast inbox and confirm connectivity
Protocol:
1. Check inbox
2. DM lead with ACK
3. Perform scope
4. DM lead with DONE
For code-heavy tasks, change the type line to:
Type: Codex sub-agent (use spawn_agent with relay-worker)
Use when creating Agent Skills packages (SKILL.md format) for Codex CLI, GitHub Copilot, or Amp - provides the agentskills.io specification with frontmatter constraints, directory structure, and validation rules
Use when testing web applications with visual verification - automates Chrome browser interactions, element selection, and screenshot capture for confirming UI functionality
Use when creating or improving Claude Code agents. Expert guidance on agent file structure, frontmatter, persona definition, tool access, model selection, and validation against schema.
Use when creating or publishing Claude Code hooks - covers executable format, event types, JSON I/O, exit codes, security requirements, and PRPM package structure
Use when creating or fixing .claude/rules/ files - provides correct paths frontmatter (not globs), glob patterns, and avoids Cursor-specific fields like alwaysApply
Use when creating new Claude Code skills or improving existing ones - ensures skills are discoverable, scannable, and effective through proper structure, CSO optimization, and real examples