teammode
Teammode enables Claude Code to create, manage, and coordinate multiple durable Codex threads as a single team unit with persistent state stored in JSON files. Use this skill when orchestrating complex multi-thread workflows where you need to track team membership, assign roles to individual threads, maintain shared decision history, and cleanly archive or delete entire teams while ensuring coordinated thread cleanup across all members.
git clone --depth 1 https://github.com/code-yeongyu/oh-my-openagent /tmp/teammode && cp -r /tmp/teammode/packages/omo-codex/plugin/components/teammode/skills/teammode ~/.claude/skills/teammodeSKILL.md
# Teammode
Use this skill when the user asks Codex to create, coordinate, inspect, archive,
or delete a team of Codex threads. This is a Codex-only workflow. It is inspired
by the lifecycle concerns in Yeachan-Heo/oh-my-codex team skill, but it does not
copy that runtime model or depend on an external terminal runner.
## Core Model
A team is the parent object. Threads and subagents are members of that team, not
the other way around. Store the team record under:
```text
.omo/teams/{session_id}/team.json
.omo/teams/{session_id}/notepad.md
.omo/teams/{session_id}/events.jsonl
```
`{session_id}` is the leader Codex session id when available. If the current
session id is not exposed, use a stable timestamp slug and record the fallback
in `events.jsonl`.
The `team.json` shape is:
```json
{
"schemaVersion": 1,
"sessionId": "{session_id}",
"teamName": "Team Name",
"activeTeam": true,
"archived": false,
"leader": {
"threadId": "leader-thread-id",
"role": "leader",
"title": "[team name] {session name}"
},
"members": [
{
"id": "A",
"threadId": "member-thread-id",
"role": "release analyst",
"status": "active",
"title": "[team name] {session name}"
}
]
}
```
Keep `notepad.md` for leader memory, peer digests, decisions, and cleanup notes.
Append every create, broadcast, status, archive, and delete action to
`events.jsonl`.
## Team Creation
1. Choose a short team name and a session name before creating members.
2. Every team-created thread title must use this exact shape:
`[team name] {session name}`.
3. Write `team.json` before sending work to members.
4. Create durable member threads with `codex_app.create_thread` when available.
Use `codex_app.set_thread_title` immediately after creation if the title did
not land during creation.
5. For short in-turn helper lanes, `multi_agent_v1.spawn_agent` is acceptable,
but durable teams should prefer Codex thread tools so the team remains visible
as a set of archived or active threads.
Member prompts must be self-contained and English-only. Include:
- team name and leader thread id
- the member's explicit role and owned scope
- the exact deliverable and verification expectation
- the team state directory path
- instructions to send `WORKING: <role> - <phase>` during long work
- instructions to send a concise final report to the leader
- instructions that all member-to-member and member-to-leader communication is
English-only
## Communication
The leader owns coordination. Members own their assigned lane and report risks
that affect other lanes.
Use `codex_app.send_message_to_thread` for leader-to-member messages and
broadcasts. Use `codex_app.read_thread` to inspect recent member status before
reassigning or summarizing. Broadcast peer digests when one member finds context
that changes another member's assumptions.
Cadence:
- Require frequent status updates for long tasks, usually every 30-60 seconds of
active work or at each phase boundary.
- Members acknowledge handoffs with understood scope, affected files or topics,
owner, and next action.
- The leader records status snapshots in `notepad.md` and `events.jsonl`.
- The leader waits for every required member final report before claiming the
team is complete.
For bounded in-turn helper work, use:
```json
{
"tool": "multi_agent_v1.spawn_agent",
"arguments": {
"fork_context": false,
"message": "TASK: act as a focused teammate. DELIVERABLE: ... SCOPE: ... VERIFY: ... Communicate in English only."
}
}
```
Wait with `multi_agent_v1.wait_agent` and close finished helper agents with
`multi_agent_v1.close_agent`. Record helper ids in `team.json` only when they
materially contributed to the team result.
For helper agents that may take longer than one wait cycle, require both
progress markers: `WORKING: <task> - <current phase>` before long work and
`BLOCKED: <reason>` only when the helper cannot progress. A
`multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived.
Treat a running helper as alive. Fallback only when the helper is completed
without the deliverable, ack-only after follow-up, explicitly `BLOCKED:`, or no
longer running.
## Archive
Archiving a team closes or archives every member before the team is marked
archived.
1. Send a final archive notice to every active member thread with
`codex_app.send_message_to_thread`.
2. Inspect each member with `codex_app.read_thread` and copy useful final notes
into `notepad.md`.
3. Archive every member thread with `codex_app.set_thread_archived`.
4. Close any helper subagents with `multi_agent_v1.close_agent`.
5. Set `activeTeam` to `false`, set `archived` to `true`, and append the archive
receipt to `events.jsonl`.
If a thread archive tool is unavailable, record the failed archive attempt and
the member thread ids in `events.jsonl` and surface that limitation to the user.
Do not pretend the member was archived.
## Delete
Delete is stronger than archive.
1. Archive first when `archived` is not already `true`.
2. Confirm there are no active member threads left unhandled.
3. Remove `.omo/teams/{session_id}` only after the archive receipts and useful
notes have been preserved or explicitly deemed disposable by the user.
4. Report which team directory was removed and which threads were archived.
Never delete team state while member threads are still active unless the user
explicitly requested an abort and you recorded the abort in `events.jsonl`.
## Stop Rules
- Stop and ask before deleting a non-archived team if any member is still active.
- Stop if the user asks for private or non-English member communication; team
member communication remains English-only.
- Stop if thread tooling is unavailable and the requested operation depends on
creating, reading, sending to, or archiving actual Codex threads.Compare HEAD with the latest published npm versions and list all unpublished changes by release layer. Triggers: unpublished changes, changelog, what changed, whats new.
Read-only GitHub triage for issues AND PRs. 1 item = 1 background task (category: quick). Analyzes all open items and writes evidence-backed reports to /tmp/{datetime}/. Every claim requires a GitHub permalink as proof. NEVER takes any action on GitHub - no comments, no merges, no closes, no labels. Reports only. Triggers: 'triage', 'triage issues', 'triage PRs', 'github triage'.
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', 'adversarial plan', 'hostile planning', 'cross-critique plan', '하이퍼플랜', '적대적 계획', '교차 비평'.
Easter egg command - about oh-my-opencode. Triggers: omomomo, about, easter egg.
QA opencode itself, per case: verify the CLI/terminal (opencode run, db, serve, export), prove a specific plugin hook/action/event fired via the SSE event stream, smoke-test the TUI under tmux, and investigate sessions in opencode's SQLite DB by id, title/name, or message text. Ships tested helper scripts (each with a --self-test) plus per-domain references. Use whenever someone wants to QA, smoke-test, verify, or debug opencode's CLI, HTTP server, plugin hooks/events, or TUI, or to find/inspect opencode sessions in the database. Triggers: opencode qa, qa opencode, test opencode, verify opencode hook, opencode session db, find opencode session by id/name/text, opencode tui test, opencode server health, opencode event stream.
Nuclear-grade 16-agent pre-publish release gate. Runs /get-unpublished-changes to detect all changes since last npm release, spawns up to 10 ultrabrain agents for deep per-change analysis, invokes /review-work (5 agents) for holistic review, and 1 oracle for overall release synthesis. Use before EVERY npm publish. Triggers: 'pre-publish review', 'review before publish', 'release review', 'pre-release review', 'ready to publish?', 'can I publish?', 'pre-publish', 'safe to publish', 'publishing review', 'pre-publish check'.
Publish oh-my-opencode to npm via GitHub Actions workflow. Argument: <patch|minor|major>. Triggers: publish, release, deploy, npm publish.
Remove unused code from this project with ultrawork mode, LSP-verified safety, atomic commits. Triggers: remove dead code, dead code, cleanup, remove unused.