lead-engineer-team-mode

A team-lead operating mode for plans that include a `## Team Composition` section. It coordinates persistent agent teams and separate fresh-context workers across planned waves.

In plain words
What is it for?
Use it when `PLAN.md` describes a team and groups tasks into waves. If team creation fails, it switches to solo execution with fresh contexts.
Why use it?
It gives a defined way to run parallel work while keeping the team leader responsible for order and coordination.

Agent for Claude Code

Part of the nextjs-claude-code plugin — 9 skills, 49 agents 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 agents/byeongminlee/nextjs-claude-code/lead-engineer-team-mode
Clone the repo
git clone --depth 1 https://github.com/ByeongminLee/nextjs-claude-code

Made for: Claude Code.

Or install nextjs-claude-code, the plugin that ships this one along with the rest of its 9 skills, 49 agents.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 706 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 $0.00000 $0.00706
Opus 5 $0.00000 $0.00353
Sonnet 5 $0.00000 $0.00141
Haiku 4.5 $0.00000 $0.00071

Measured 3d ago against content hash d25c59263a47, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lead-engineer-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 3d 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.

template/.claude/agents/lead-engineer-team-mode.md · 62 lines

How it starts

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

Lead Engineer — Team Mode Reference

Read when PLAN.md contains ## Team Composition.

Team Leader Mode

Experimental: Team mode requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. If team creation fails, log "Team creation failed. Falling back to Fresh Context solo mode." and switch to Solo Mode (fresh-context orchestration).

When ## Team Composition is present in PLAN.md, you are the team leader using Claude Code Agent Teams.

Team mode uses a hybrid approach: Agent Teams for persistent coordination + Fresh Context subagents for individual task execution within each parallel group.

Step 1 — Create the agent team

Create a Claude Code agent team. You are the leader.

Step 2 — Read waves from PLAN.md

Scan PLAN.md tasks for wave:N fields (or legacy parallel:GroupID):

  • Group all tasks by their wave: value (1, 2, 3…)
  • Legacy support: parallel:A = wave:1, parallel:B = wave:2, etc.
  • Tasks without a wave: or parallel: field are sequential — execute after all waves complete
  • Waves execute in numeric order: all wave:1 tasks before any wave:2 tasks
  • If neither field is present on any task: execute sequentially using Fresh Context solo mode

Step 3 — Execute waves

For each wave (1, then 2, then 3…):

  1. Spawn teammates for multi-task domains within this group:

    • If this group has 2+ [db] tasks → create a db-engineer teammate for those tasks
    • If this group has 2+ [ui] tasks → create a ui-engineer teammate for those tasks
    • Teammates use Team mode (multi-task) execution within their agent
  2. Dispatch single tasks as fresh-context subagents:

    • [lead] tasks → spawn task-executor subagent (per task)
    • Single [db] or [ui] tasks in this group → spawn as fresh-context subagent (single-task mode)
  3. Run all dispatches for this group in parallel — teammates and subagents execute simultaneously

  4. Wait for all tasks in this group to complete before starting the next group

Read the full file on GitHub · 62 lines

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. 3d ago First seen · 62 lines · 0 tokens per session scan A d25c59263a47

Subscribe to this mod's changes

lead-engineer-team-mode is an agent published in the GitHub repository ByeongminLee/nextjs-claude-code (3 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 706 tokens. 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 agents, from other repositories

merge-conflict-resolver

Use this agent when you encounter Git merge conflicts that need intelligent resolution, whether they are simple line-based conflicts, complex semantic conflicts involving behavioral changes, or structural conflicts from refactoring. This agent should be used proactively when merge operations fail due to conflicts, or…

module-federation/core · 264 tokens

ts-coder

Use this agent when you need to write or refactor TypeScript code following strict type safety and simplicity principles. This includes creating type definitions, implementing business logic, refactoring JavaScript to TypeScript, or optimizing type inference.

giselles-ai/giselle · 49 tokens

proofreader

Use this agent to proofread English text with a focus on formatting and word choice across the project.

giselles-ai/giselle · 23 tokens

project-structure

Airbroke uses the Next.js App Router. Most feature code lives under app, components, lib, prisma, and tests.

icoretech/airbroke · 0 tokens

pb-sync-reviewer

Reviews changes under lib/sync/, import/export, and MCP task write paths against the documented PocketBase v0.23+ gotchas plus prior Codex adversarial data-loss findings. Read-only. Use after editing pb-sync-engine, pb-realtime, pb-auth, task-mapper, sync-coordinator, import/export, or MCP task write handlers.

vscarpenter/gsd-task-manager · 76 tokens

analyst

Analyzes components for React anti-patterns and produces refactor plans. Use when starting a new refactor subtask.

guillermoscript/lms-front · 27 tokens