team-mode

team-mode is a skill for Claude Code, Codex from Jerrylalala/compound-engineering. It costs 55 tokens per session (5,193 once invoked), scanned A, original, MIT.

A collaboration layer for coding-agent planning, implementation, and review. It sets clear work boundaries, assigns roles, and uses independent checks before changes are accepted.

In plain words
What is it for?
It helps teams plan tasks, coordinate parallel implementation, verify changes, and add extra checks for high-risk authentication, payment, or migration work.
Why use it?
It reduces conflicts between agents and catches work that violates the agreed scope or rules.

Skill for Claude CodeCodex

Part of the compound-engineering plugin — 78 skills, 4 commands, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jerrylalala/compound-engineering/team-mode
Any agent
npx skills add Jerrylalala/compound-engineering --skill team-mode
Clone the repo
git clone --depth 1 https://github.com/Jerrylalala/compound-engineering

Made for: Claude Code, Codex.

Or install compound-engineering, the plugin that ships this one along with the rest of its 78 skills, 4 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for team-mode

README.md
[![agentmods](https://agentmods.dev/badge/skills/jerrylalala/compound-engineering/team-mode.svg)](https://agentmods.dev/skills/jerrylalala/compound-engineering/team-mode)
Your own site
<a href="https://agentmods.dev/skills/jerrylalala/compound-engineering/team-mode"><img src="https://agentmods.dev/badge/skills/jerrylalala/compound-engineering/team-mode.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,193 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.05193
Opus 5 $0.00028 $0.02596
Sonnet 5 $0.00011 $0.01039
Haiku 4.5 $0.00006 $0.00519

Measured 5d ago against content hash 28ae2a6b161f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

team-mode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/compound-engineering/skills-custom/team-mode/SKILL.md · 364 lines

How it starts

The opening of the file, as written. The whole thing — 364 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Team Mode Overlay

核心理念:合约边界 + 单写者原则 + 独立验证者 = 问题在发生前被拦截。

各命令的实现层次不同

  • ce:work [T]:真实 Claude Code Agent Teams(TeamCreate + 独立 context window + SendMessage)
  • ce:brainstorm [P]:[P] 结束后自动触发探索者+挑战者收敛(无独立 [T] 参数,避免与 Claude Code Agent Teams 混淆)
  • ce:plan [T]:同一 agent 多任务(有意设计,合约生成和追溯审查是顺序文档处理,不需要验证循环)
  • ce:review [T]:规则引擎(有意设计,Patch Gate 是 deterministic whitelist check,零 token)

本 skill 是叠加在 ce:plan/ce:work/ce:review 之上的 overlay。各命令通过检测 [T][T+] token 激活对应的角色集和机制。ce:brainstorm 不支持 [T] 参数,结构化收敛已内置为 [P] 的自动后续行为。


参数变体

Token ce:work 实现 ce:plan/review 实现 适用场景
[T] TeamCreate + verifier teammate(独立 context window)+ lead 扮演合约主+执行者 同一 agent(plan=合约生成,review=规则引擎) 默认,大多数任务
[T+] [T] 基础上额外 spawn risk-guard teammate [T](plan/review 无额外角色) auth/payment/migration 高风险路径

ce:brainstorm 不使用 [T] 参数:结构化收敛(探索者+挑战者)已内置为 [P] 结束后的自动行为,避免与 Claude Code 原生 Agent Teams 混淆。


角色定义

中文名 适用阶段 职责 生命周期
合约主 plan, work 执行前写边界合约(allowed_files/forbidden_surfaces/invariants),全程持有合约权威。.team-contract.md 作为团队章程(所有 teammate 启动时读取),不是通信介质 全程存活(文件持久化)
执行者 work 唯一可写共享代码的角色(单写者原则)。遇越界暂停上报,不自行决策 按任务运行
验证者 work 独立 context window 的真实 teammate。等待 lead 发 SendMessage 通知,运行不变式检查,只读不写,回复 PASS/FAIL 事件驱动(每 Unit 完成后收到 SendMessage)
风险卫 work([T+]) 独立 context window 的真实 teammate。等待 lead 发 Unit 开始通知,检测高风险关键词,回复拦截或通过,要求用户确认才继续 仅 [T+] 模式,Unit 开始前
追溯审查 plan 搜索 docs/solutions/ 查找历史相关案例,检查计划决策是否与已记录 gotcha 矛盾,将发现追加到计划 Open Questions 节 ce:plan Phase 4.5(只读)
探索者 brainstorm 聚焦「这个想法在技术上可行吗?」,提出具体验证路径和可达条件 ce:brainstorm [P] 结束后自动触发(非独立参数)
挑战者 brainstorm 质疑假设,寻找边界条件和反例,防止过早收敛 ce:brainstorm [P] 结束后自动触发(非独立参数)

各阶段角色集

阶段 默认角色 [T+] 追加
/ce:brainstorm [P] [P] 结束后自动收敛(探索者+挑战者,内置,无需 [T])
/ce:plan [T] 合约主 + 追溯审查
/ce:work [T] 合约主 + 执行者 + 验证者 风险卫
/ce:review [T] 现有多个专业审查 agent + Patch Gate

Read the full file on GitHub · 364 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 364 lines · 55 tokens per session scan A 28ae2a6b161f

Subscribe to this mod's changes

team-mode is a skill published in the GitHub repository Jerrylalala/compound-engineering (5 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 5,193 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens