Teammode 标志

Teammode

社区热门
code-yeongyu
teammode

仅适用于 Codex 的团队编排:运行一支有名称、彼此协作且由脚本管理持久状态的 Codex 工作线程团队。当用户要求 Codex 创建、运行、协调、检查、归档或删除智能体/线程/会话团队,或要求团队并行协作完成任务时,必须使用。首先检查当前可用的工具(通过 tool_search 检查延迟加载的工具),并告知用户采用哪种方式:如果可用,则使用原生 MultiAgentV2 智能体(通过带有 task_name 的扁平 spawn_agent 启动);否则使用 Codex App 线程;两者都不可用时,则拆分为普通子智能体。主会话始终是负责人;成员需按具体任务、负责领域或视角定义,不能使用含糊的职位角色;捆绑的跨平台脚本会写入 .omo/teams 状态,并自动生成成员操作手册。当任务并非完全独立,但并行处理有帮助时,使用团队;如果范围完全独立或目标含糊,则使用普通子智能体。触发语:团队模式、teammode、组建团队、以团队形式运行、智能体团队、协调线程、并行 Codex 线程、归档团队。

Add to TypingMind

概览

发布者code-yeongyu
代码仓库oh-my-openagent
技能名称teammode
星标数
69.1K
复刻数
5.7K
附带文件
5
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 5 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 code-yeongyu 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Teammode AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/code-yeongyu/oh-my-openagent/tree/dev/packages/omo-codex/plugin/components/teammode/skills/teammode
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/code-yeongyu/oh-my-openagent.git /tmp/oh-my-openagent
mkdir -p .claude/skills
cp -r /tmp/oh-my-openagent/packages/omo-codex/plugin/components/teammode/skills/teammode .claude/skills/teammode
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Teammode,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Teammode。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Teammode 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Teammode

Run a named team of cooperating Codex workers under one leader, with durable state on disk. This is a Codex-only workflow. It never depends on an external terminal runner - it coordinates through Codex's own collaboration tools plus a bundled state script, on ONE of two transports chosen up front: native MultiAgentV2 agents, or Codex App threads as the fallback.

When to use a team (and when to use plain subagents instead)

Use a TEAM when EITHER holds:

  • the work does NOT split into perfectly isolated pieces, but doing it in parallel is clearly more convenient - members will need to see and react to each other's findings; or
  • one task still needs exploration, yet its GOAL is already clear - parallel investigation under a fixed objective.

Use plain fire-and-forget subagents ($ulw / one-off spawn_agent workers) - NOT a team - when EITHER holds:

  • the work IS perfectly isolated, so there is no coordination cost worth paying; or
  • the GOAL is still ambiguous, where one mind should resolve direction before any fan-out.

A team buys cross-member coordination at a real overhead cost; only spend it when coordination is the thing you actually need.

Pick the transport FIRST - then tell the user

Before creating any team state, decide which transport this session can run. Inspect your active tool list and select:

  1. MultiAgentV2 (preferred) - select when the flat V2 collaboration tools are ALL active: flat spawn_agent whose schema requires task_name, plus send_message, followup_task, wait_agent, list_agents, and interrupt_agent. Members are durable native agents addressed by task name / agent path (/root/<task_name>). The namespaced multi_agent_v1.* surface never qualifies as a team transport.
  2. Codex App threads (fallback) - select when flat V2 is not available but the codex_app.* thread tools are (create_thread, read_thread, send_message_to_thread, set_thread_title, set_thread_archived).
  3. Neither set visible - if a tool_search tool is active, search for the missing sets (e.g. spawn_agent, codex_app) before concluding: some environments defer tools behind tool search. A hit is only a lead: revalidate that the visible result is the COMPLETE, mutually compatible transport set from case 1 or 2 before selecting it. Do not combine partial hits from different transports.
  4. Neither set exists - teammode cannot run here. Do NOT run init or fake a team with partial tooling. If another visible plain-subagent mechanism can independently spawn, communicate with, and observe plain workers, announce that exact mechanism and use it for non-overlapping scopes. Otherwise continue serially and report the capability limitation; never promise or imply plain subagents that this session cannot create.

Then, BEFORE running init (or instead of it in case 4), tell the user in one line what this environment provides and which route you picked:

  • Teammode transport: MultiAgentV2 (flat spawn_agent with task_name).
  • Teammode transport: Codex App threads (flat V2 tools not present in this session).
  • Teammode unavailable: neither MultiAgentV2 nor codex_app tools exist in this session - using <visible plain-subagent mechanism> for independent scopes.
  • Teammode unavailable: neither MultiAgentV2 nor codex_app tools exist in this session, and no compatible plain-subagent mechanism is available - continuing serially.

Pass the choice to init as --transport multi_agent_v2 or --transport codex_app. The transport is recorded in team.json and is IMMUTABLE for the team's lifetime: a V2 spawn failure is a V2 blocker to report, never permission to mix Codex App threads into the same team. Never probe by trial-calling tools; read your tool list, and search it with tool_search only when a needed set is not visible.

You are the leader - orchestrate, do not implement

The main session is ALWAYS the team leader; you orchestrate directly and never spin up a separate leader worker. Your job is orchestration, NOT writing product code: split the work and assign each slice, hold live situational awareness of every member, verify and QA what they deliver, relay findings between members, instruct and unblock, and synthesize the result. DELEGATE every code edit to a member - if you catch yourself editing product files while the team runs, that work was a member's slice you should have handed off. You own direction, verification, and integration (the merge), not the keystrokes.

Compose by part, ownership, or perspective - not by job title

A team is ALWAYS two or more members - never a single-member team. One worker on an isolated job is a plain subagent, not a team; if you end up with a single member, either split off a second distinct slice or drop the team and use a subagent.

Compose the team from what you actually KNOW about the work. Ground the split in real knowledge of the problem, then divide it into clear, non-overlapping responsibilities - one per aspect of the work - and give each member exactly one. No two members may own the same thing. Define each member by a concrete slice: a specific part of the codebase, an ownership area, or a distinct perspective/lens. Assigning a vague role ("backend dev", "release analyst", "the tester") is an anti-pattern - it gives the member no real boundary and invites overlap. Each member's focus names what they own concretely; the lens is one of area, ownership, or perspective. Give each member a short, distinct --name too - its role or what it watches (e.g. app-server-lifecycle, mailbox-delivery) - it labels the member everywhere; never reuse one name for two members. On MultiAgentV2 teams also give each member a unique --task-name in lowercase_digits_underscores form - it becomes the member's permanent agent path /root/<task_name>.

Run the script - never hand-write team state

A bundled, dependency-free Node script owns all team state so you never author team.json or the member manual by hand. Run it with node (or bun); it works on macOS, Linux, and Windows. Replace <skill-root> with this skill's own directory.

node "<skill-root>/scripts/team.mjs" init        --name "<team>" --session-name "<session>" --transport multi_agent_v2|codex_app [--session <leader_thread_id>] [--worktree] [--base-branch dev]
node "<skill-root>/scripts/team.mjs" add-member  --team <session_id> --id A --name "<short role>" [--task-name <v2_task_name>] --focus "<part/ownership/perspective>" --lens area|ownership|perspective --deliverable "<...>" [--branch <branch>]
node "<skill-root>/scripts/team.mjs" bind-agent   --team <session_id> --id A --agent-path /root/<task_name> [--cwd <path>]   # multi_agent_v2 teams
node "<skill-root>/scripts/team.mjs" bind-thread  --team <session_id> --id A --thread <thread_id> [--cwd <path>]             # codex_app teams
node "<skill-root>/scripts/team.mjs" member-prompt --team <session_id> --id A
node "<skill-root>/scripts/team.mjs" set-status   --team <session_id> --id A --status reported|blocked|active|archived [--note "<...>"]
node "<skill-root>/scripts/team.mjs" worktree-add    --team <session_id> --id A [--base-branch <branch>]
node "<skill-root>/scripts/team.mjs" worktree-remove --team <session_id> --id A [--force]
node "<skill-root>/scripts/team.mjs" integrate       --team <session_id> [--id A]
node "<skill-root>/scripts/team.mjs" archive      --team <session_id> [--id A] [--note "<...>"]
node "<skill-root>/scripts/team.mjs" delete       --team <session_id> [--force]
node "<skill-root>/scripts/team.mjs" status       --team <session_id>

init creates .omo/teams/{session_id}/ containing team.json (the single durable state file: team id, transport, the main-session leader, the member roster, status, worktree config, and a lifecycle log), guide.md (the auto-generated member field manual), and artifacts/ (a shared exchange space). On codex_app teams {session_id} is the leader's Codex session id when you can pass it via --session; otherwise the script generates a stable handle. Re-running init is a safe no-op. Every mutating subcommand rewrites guide.md, so the manual always matches the current team.

Mutating subcommands take a per-team state lock before reading and rewriting team.json. It is safe to run independent add-member, bind-agent, bind-thread, set-status, archive, delete, guide, and worktree mutation commands concurrently against the same team: they serialize and each command reads the latest committed state before writing. If a command reports that team state is locked, do not treat the intended mutation as complete; retry after the named command finishes, or inspect .omo/teams/{session_id}/.team.lock/owner.json if the previous command crashed. bind-agent refuses codex_app teams and bind-thread refuses multi_agent_v2 teams, and a refused command never changes team.json.

Create the team and its members

init the team, then add-member once per member. What happens next depends on the transport.

MultiAgentV2 teams:

  1. If a member needs an isolated worktree, run worktree-add BEFORE spawning it - flat spawn_agent has no cwd argument, so the path must ride in the bootstrap message.
  2. Spawn each member with flat spawn_agent using only the V2 schema fields: task_name is that member's --task-name, message is the bootstrap printed by add-member / member-prompt, and fork_turns is "none" (members read guide.md for context; full parent history is not their context model). Put any role, priority, or task-specific routing instruction in message; V2 does not accept agent_type, model, reasoning_effort, or service_tier, so members inherit the session model.
  3. bind-agent --agent-path with the canonical task name the spawn returned (normally /root/<task_name>); binding confirms the runtime identity matches the roster and records the member's cwd. Members are durable: they persist as subagent threads, survive idling, and are re-tasked with followup_task - never respawned under a second name.
  4. Members appear in list_agents with their task paths; inspect status there instead of deep links (V2 exposes no thread title or codex:// link surface to you).

Codex App teams:

  1. Create a durable thread per member with codex_app.create_thread - ALWAYS this tool for every member - titled [team name] <member name>, using THAT member's own name, so no two threads share a title. add-member prints the exact title to use. If the tool accepts a working directory / cwd argument, set it to that member's worktree; otherwise the member's manual tells it to cd there first. Use codex_app.set_thread_title if the title did not land at creation. If Codex returns only pendingWorktreeId, the worktree-backed thread is not ready yet: do not bind-thread and do not send the member bootstrap. Wait until Codex surfaces a real threadId, then set the title, bind that real id with the cwd, and only then send the bootstrap.
  2. bind-thread to record each thread id (and --cwd), then send that member's bootstrap trigger as the thread's first message. The trigger is short on purpose: it tells the new thread to READ its guide.md and team.json rather than carrying the whole protocol inline.
  3. Whenever you report, audit, reopen, or hand off a member thread, include the app deep link codex://threads/<thread_id> next to the raw id - worktree-backed threads are easy to lose in the sidebar without it. On a codex_app team, a spawned in-process agent is never a member substitute: it cannot carry the team title or be inspected, titled, archived, or re-opened with the codex_app.* tools this team runs on.

On either transport, a member only counts once it is bound (bind-agent / bind-thread). If the selected transport's tools stop working mid-run, STOP and say so (see Stop rules); do not quietly switch transports.

Communication

Members push to you and to one another; you never poll them as a routine. The address book is team.json, and the generated manual binds members to the hard rules, so you mainly keep the channel open: expect frequent small inbound updates from each member - findings, WORKING:/BLOCKED: markers, peer digests - rather than one final dump, and act on them as they arrive.

  • MultiAgentV2: members reach you with send_message to /root and reach peers by their members[].agentPath. You reach members the same way; use followup_task when you hand an idle member NEW work (it wakes the member), send_message for context that should not interrupt, and wait_agent only when you are genuinely blocked on their next update - a wait_agent timeout only means no new mailbox update arrived, never that a member failed. Your own session IS /root - members can always reach you; leave --session unset.
  • Codex App: members push with codex_app.send_message_to_thread; you inspect state with codex_app.read_thread. So members can actually reach you, run init with --session <your own thread id> - that makes leader.sessionId in team.json a real, messageable thread; without it members cannot report to you and you are stuck polling.

All member-to-member and member-to-leader traffic is in English; when the END user addresses a member, that member replies in the user's own language. Members hand off files and memos through the team artifacts/ directory and reference them by path.

Let members work - do not rush them

Members heartbeat every few tool calls and message you on every finding, blocker, and finished slice (their manual binds them to this). So a member that is quiet between heartbeats is working, not stalled - a stretch of silence is the normal sound of focused work, not a problem to chase. Re-reading a calm member's state, or sending "any update?" / "are you done?" / "hurry up" pings, interrupts that member and slows the whole team. Trust the heartbeat and let them cook.

Message a member only when one of these is true:

  • you have new information, context, or a correction it needs to do its slice right;
  • you are reassigning, narrowing, or unblocking its scope;
  • a peer's result changes what it should do; or
  • it has gone fully silent well past its heartbeat cadence AND that stall is blocking the team - then send one specific question, not a barrage.

Otherwise stay calm and keep the channel open: read inbound updates as they arrive and act on them. A long-running member is alive; a heartbeat you have not received yet is not a failure. Fallback only when a member is completed without its deliverable, explicitly BLOCKED:, or no longer running - then unblock, reassign, or re-task that slice instead of waiting on it. Wait for every required member's final report before you declare the team done - rushing toward "done" while members are still mid-slice just produces half-built work you will have to redo.

Worktrees - isolate members who would touch the same files

The moment two members' slices would edit the same files, give each its own git worktree so they cannot clobber each other. Decide this whenever you see the collision - at team creation OR mid-run, not only up front. For each colliding member run worktree-add --team <id> --id <member>: it creates the worktree off the base branch on a derived branch, flips the team into worktree mode, records it in team.json, and prints the cd path to hand that member. The member works and commits only inside its own worktree. To land the work, integrate --team <id> merges every member branch into your current branch with a merge commit (never a squash or rebase); resolve any conflict it reports, then worktree-remove each worktree at cleanup.

Delivering the path differs by transport: on MultiAgentV2, create the worktree BEFORE spawning so the bootstrap carries it, or send it to an already-running member as a followup_task; on Codex App, send a follow-up message that includes both the worktree path and the member's codex://threads/<thread_id> link. Either way, run bind-agent/bind-thread with --cwd <worktree> (or --worktree-path) so team.json, guide.md, status, and member-prompt all point at the same worktree-backed member.

When the member starts inside a worktree, it must verify the assigned cwd exists and contains the repository checkout before editing. If the directory is missing, empty, or does not look like a git worktree/repository yet, the member reports BLOCKED: worktree not ready to the leader and waits instead of editing a parent checkout or an empty directory.

Run a ulw-plan in parallel

When a decision-complete plan already exists at .omo/plans/<slug>.md (from ulw-plan), execute its parallel waves as a team instead of one todo at a time. Map it directly:

  • one wave's independent todos -> one member each; the todo's scope/files become that member's focus, and its acceptance criteria + QA become the member's deliverable.
  • the plan's dependency matrix sets the shape: todos with no unmet dependency inside a wave run as concurrent members; a todo that depends on another waits, so launch the next wave only after the blocking members report.
  • todos in the same wave that touch overlapping files -> give those members worktrees (see above).

Keep the plan file as the shared spec: point each member at its todo by path, and verify the member's result against that todo's acceptance criteria before you integrate.

Archive, delete, and cleanup

DISBAND the team the moment it is no longer needed. A team exists only to do its work; once that work is done, or the user no longer wants it, do not leave it lying around - archive every member, then delete the team state only after archival evidence is clean or preserved. A finished team that is never disbanded is a leak.

  • archive closes the team: notify each active member, copy anything useful into artifacts/, then close each member on its transport. On MultiAgentV2, interrupt_agent any member still mid-turn and record in the note that V2 exposes no runtime archive operation - the durable team.json state IS the archive; never claim a V2 agent itself was archived. On Codex App, try codex_app.set_thread_archived per member thread; treat failures such as "Ambiguous Codex thread id" or an id that is ambiguous across hosts as an app-thread archival blocker, not as a team-state blocker: record the failure in the team log, tell the user which member thread was not proven archived, and continue the team-state archive with archive --note "<blocker>". Never pretend a member thread was archived. Do not delete the team state after an app-thread archival blocker unless the evidence has been copied elsewhere or the user explicitly accepts that evidence loss.
  • delete removes .omo/teams/{session_id} and refuses while the team is unarchived or any member is still active unless --force.
  • When the work wraps up, land it the way the user asked: integrate --team <id> for a direct merge commit, or push each member branch and open a PR. Then worktree-remove each worktree, archive, and delete. Cleanup is real work; respect the user's instruction on how to land it.

Stop rules

  • Stop and ask before deleting an unarchived team while any member is still active.
  • Member communication stays English unless the user explicitly requests otherwise; user-facing replies follow the user's language.
  • Stop if the selected transport's tools (V2 spawn/message/wait/list/interrupt, or Codex App create/read/send/title/archive) stop working mid-run; say so instead of faking it or silently switching transports. Pre-init absence is not a stop - it routes to the plain-subagent split.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Teammode AI 技能有什么作用?

仅适用于 Codex 的团队编排:运行一支有名称、彼此协作且由脚本管理持久状态的 Codex 工作线程团队。当用户要求 Codex 创建、运行、协调、检查、归档或删除智能体/线程/会话团队,或要求团队并行协作完成任务时,必须使用。首先检查当前可用的工具(通过 tool_search 检查延迟加载的工具),并告知用户采用哪种方式:如果可用,则使用原生 MultiAgentV2 智能体(通过带有 task_name 的扁平 spawn_agent 启动);否则使用 Codex App 线程;两者都不可用时,则拆分为普通子智能体。主会话始终是负责人;成员需按具体任务、负责领域或视角定义,不能使用含糊的职位角色;捆绑的跨平台脚本会写入 .omo/teams 状态,并自动生成成员操作手册。当任务并非完全独立,但并行处理有帮助时,使用团队;如果范围完全独立或目标含糊,则使用普通子智能体。触发语:团队模式、teammode、组建团队、以团队形式运行、智能体团队、协调线程、并行 Codex 线程、归档团队。

为什么在 TypingMind 中使用 Teammode?

因为您只需安装一次,就能搭配任何模型使用。Teammode 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Teammode?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/code-yeongyu/oh-my-openagent/tree/dev/packages/omo-codex/plugin/components/teammode/skills/teammode。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Teammode?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Teammode 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Teammode 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Teammode AI 技能免费吗?

code-yeongyu 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇