worker
npx skills add https://github.com/yeachan-heo/oh-my-codex --skill worker
Agent 安装分布
Skill 文档
Worker Skill
This skill is for a Codex session that was started as an OMX Team worker (a tmux pane spawned by $team).
Identity
You MUST be running with OMX_TEAM_WORKER set. It looks like:
<team-name>/worker-<n>
Example: alpha/worker-2
Startup Protocol (ACK)
- Parse
OMX_TEAM_WORKERinto:teamName(before the/)workerName(after the/, usuallyworker-<n>)
- Send an ACK to the lead mailbox:
- Recipient worker id:
leader-fixed - Body: one short line including your workerName and what youâre ready to do.
- Recipient worker id:
- After ACK, proceed to your inbox instructions.
The lead will see your message in:
<team_state_root>/team/<teamName>/mailbox/leader-fixed.json
Use the MCP tool:
team_send_messagewith{team_name, from_worker, to_worker:"leader-fixed", body}
Inbox + Tasks
- Resolve canonical team state root in this order:
OMX_TEAM_STATE_ROOTenv- worker identity
team_state_root - team config/manifest
team_state_root - local cwd fallback (
.omx/state)
- Read your inbox:
<team_state_root>/team/<teamName>/workers/<workerName>/inbox.md - Pick the first unblocked task assigned to you.
- Read the task file:
<team_state_root>/team/<teamName>/tasks/task-<id>.json(example:task-1.json) - Task id format:
- The MCP/state API uses the numeric id (
"1"), not"task-1". - Never use legacy
tasks/{id}.jsonwording.
- The MCP/state API uses the numeric id (
- Claim the task (do NOT start work without a claim). Use the team state APIs described in your inbox/overlay.
- Do the work.
- Write completion to the task file:
{"status":"completed","result":"..."}or{"status":"failed","error":"..."}
- Update your worker status:
<team_state_root>/team/<teamName>/workers/<workerName>/status.jsonwith{"state":"idle", ...}
Mailbox
Check your mailbox for messages:
<team_state_root>/team/<teamName>/mailbox/<workerName>.json
When notified, read messages and follow any instructions. Use short ACK replies when appropriate.
Note: leader dispatch is state-first. The durable queue lives at:
<team_state_root>/team/<teamName>/dispatch/requests.json
Hooks/watchers may nudge you after mailbox/inbox state is already written.
Use MCP tools:
team_mailbox_listto readteam_mailbox_mark_deliveredto acknowledge delivery
Shutdown
If the lead sends a shutdown request, follow the shutdown inbox instructions exactly, write your shutdown ack file, then exit the Codex session.