Help us improve
Share bugs, ideas, or general feedback.
From squad
Use when the user runs squad commands (/squad-init, /squad-status, /squad-add, /squad-sync), uses `@`-mention triggers for a named specialist (`@lead`, `@backend`, `@frontend`, `@tester`, `@scribe`), asks to "activate the team" / "set up agents" / "who is on the squad", or begins brainstorming/planning on a project that already contains a `.squad/` directory. Dispatches Lead/Backend/Frontend/Tester/Scribe specialists as parallel Task subagents — each runs in an isolated context window with its own charter and tier-1 history — and accumulates per-role project knowledge across sessions in `history.md` files. Skip for one-off questions, single-file edits, or projects without an existing squad.
npx claudepluginhub marcelroozekrans/superpowers-extensions --plugin squadHow this skill is triggered — by the user, by Claude, or both
Slash command
/squad:squadThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
No hard requirements. The skill works standalone.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Explores codebases via GitNexus: discover repos, query execution flows, trace processes, inspect symbol callers/callees, and review architecture.
Share bugs, ideas, or general feedback.
No hard requirements. The skill works standalone.
Soft dependencies (enhance but are not required):
LongtermMemory-MCP — enables tier-1 semantic search in the tiered lookup. Without it, squad falls through to grep.decision-tracker skill — syncs decisions.md to long-term memory automatically.project-orchestration skill — auto-triggers squad-sync on pause-work.Squad activates persistent AI agent teams within your Claude Code session. Agents are dispatched as parallel subagents via Claude Code's Task tool — each runs in its own isolated context window with its own charter and a tier-1 slice of its history.md pre-loaded into the prompt. Multiple specialists called for the same question fan out concurrently in a single tool-call message; their outputs return to the main conversation which integrates them.
This is a meaningful shift from the original "in-context persona" model: specialists actually run in parallel, can't see each other's reasoning (preventing the second from anchoring on the first), and have their own tool-use budget. The main conversation acts as the dispatcher and integrator — it does not "switch voices" inline.
Core principle: Agents grow smarter about your project across sessions. After a few sessions, the Backend Engineer knows your auth pattern, the Tester knows the risky areas, the Scribe knows your naming conventions — without you having to re-explain them. Persistence (history.md files) is what squad uniquely provides on top of bare subagent dispatch.
Squad reads from two layers, merging them at runtime:
| Layer | Location | Purpose |
|---|---|---|
| Global team | ~/.claude/squad/ | User-scoped defaults, stable across projects |
| Project override | .squad/ (repo root) | Project-specific routing, decisions, history |
Merge rules:
charter.md always comes from ~/.claude/squad/agents/{name}/ — agent persona is stablehistory.md: project entries first, global entries appended belowrouting.md: project rules take precedence, global rules fill gapsteam.md: project can add/remove agents from the global rosterAt session start, squad loads only routing.md (the smallest possible footprint). No agent files are loaded upfront. This keeps context lean until a question requires a specialist.
If ~/.claude/squad/ does not exist, prompt the user to run squad-init before attempting any routing.
When an agent is invoked, use this lookup chain — stop at the first tier that returns sufficient context:
Tier 1 — Semantic search (LongtermMemory-MCP)
search_memory(query=<question>, tags=[<agent-name>, project:<project-name>])
→ If 2+ results with relevance > 0.7: use these, skip lower tiers
Tier 2 — Grep history
Grep keywords from the question against .squad/agents/{name}/history.md
then ~/.claude/squad/agents/{name}/history.md
→ If matching lines found: load only those lines
Tier 3 — Recent history (last 50 lines)
Read .squad/agents/{name}/history.md with limit=50, from end of file
→ Use when question is general but history exists
Tier 4 — Full history load
Read entire history.md (both project and global)
→ Last resort, only for complex architectural questions
Tier 5 — Charter only
Load charter.md alone
→ No history yet, or history clearly irrelevant to question
Always load charter.md alongside history — the charter defines voice and decision authority regardless of tier.
When a question arises during any superpowers workflow:
.squad/routing.md (project), fall back to ~/.claude/squad/routing.md, fall back to the default rules in routing-rules.md.history.md to extract the relevant context slice.Each specialist invocation is a Task tool call. The subagent type is general-purpose (or Plan / Explore if appropriate to the task). Construct the prompt as four blocks, in this order:
You are the {Role} on this project. Read your charter and recent history,
then answer the question below using the tone, decision authority, and
domain expertise described in the charter.
## Charter
{contents of agents/<role>/charter.md — full charter, ~150 lines}
## Recent project history (most relevant entries)
{tier-1 search results OR top tier-2 grep matches OR last 50 lines of history.md, per the tiered lookup outcome}
## Your task
{the routed question, including any context the calling workflow already
collected — design doc paragraph, plan excerpt, diff hunk, etc.}
## How to respond
- One concise answer (or a short rationale + recommendation).
- Prefix the response with the role's emoji and name on its own line:
e.g. "🔧 Backend Engineer:"
- Stay within decision authority. Tester does not block; Scribe does not decide.
- Cite the history entry that supports your answer when applicable
(format: "[history: <date> — <one-line summary>]"). If you make a new
decision worth persisting, mark it with "[new-decision]" so squad-sync
can pick it up.
When dispatching multiple specialists for one question, include all Task tool calls in the same assistant message — that is what causes them to run in parallel. Do NOT call them sequentially in separate messages.
For questions that span 2+ specialty areas (e.g. an API change that affects backend and frontend), Lead acts as integrator. Two patterns:
Lead synthesis is one extra subagent dispatch — wall-clock cost ~= one additional Task call. Use it only when the workflow needs a single answer, not when the user can read multiple opinions.
Squad integrates into the clarifying-questions phase. When brainstorming raises a question that a specialist can answer from project knowledge, squad intercepts it:
Task tool calls).For multi-part questions that span specialty areas, default to light-touch synthesis (present each subagent's prefixed response). Use Lead synthesis only when brainstorming needs a single recommendation.
Example (single specialist):
> [Brainstorming] How should authentication work?
[squad dispatches Task subagent: Backend Engineer with charter + auth-related
history slice + the question]
🔧 Backend Engineer: We're using JWT with 1h expiry and httpOnly refresh
tokens — see AuthService. [history: 2026-04-12 — adopted httpOnly refresh
after CSRF audit]. I'd extend that rather than introduce a new mechanism.
> [Brainstorming] Confirmed. Moving on...
Example (parallel specialists, no Lead synthesis):
> [Brainstorming] We're adding a "share to Slack" feature. How should it work?
[squad dispatches three subagents in parallel: Backend, Frontend, Tester]
🔧 Backend Engineer: Use the existing webhook abstraction in NotificationService.
New Slack provider implements INotificationProvider. ~80 lines. [history:
2026-02-08 — webhook abstraction added for Teams integration]
🎨 Frontend Engineer: Share button in the post action menu. Reuse the
existing share-modal component, add Slack as a destination option.
🧪 Tester: Slack integration is a flaky-test risk — webhooks time out under
load. Add a 5s retry with exponential backoff in the integration tests.
[history: 2026-02-15 — Teams webhook tests flaked at 30%, fixed with retry]
> [Brainstorming] Good — proceeding with that approach.
After the plan is drafted:
decisions.md.## Squad Review section.This is two parallel subagents, not a sequential review chain — wall-clock cost is one Task dispatch, not two.
This is the original integration: when a task is dispatched to a parallel subagent (e.g. by superpowers:subagent-driven-development), squad enriches the dispatched subagent's prompt with role-specific history before the subagent runs.
## Squad Context.This integration is independent of the parallel-dispatch routing in this skill. Subagent-driven-development handles its own parallelism for implementation tasks; squad just contributes the role-specific knowledge slice into each task subagent's prompt.
Squad contributes specialist knowledge to two phases of the review. Both can fan out as parallel Task subagents alongside the review's own logic:
decisions.md — flag if any change in the diff contradicts a recorded decision.Both can be dispatched in parallel, in a single Task message at the start of pre-push-review's review-gathering phase, so their outputs are available when the verdict is computed.
When pause-work fires, squad auto-triggers squad-sync as a post-hook. No separate invocation needed.
When plan-roadmap fires (project-orchestration's roadmap-level brainstorm at project start), squad dispatches all five specialists in parallel to seed initial perspectives — Lead surfaces strategic priorities, Backend/Frontend identify their respective surface areas, Tester flags risk concentrations, Scribe captures naming and convention defaults. Lead-synthesis follows because plan-roadmap needs a single coherent roadmap, not five separate lists.
Trigger: "initialize my squad", "set up squad", first agent invocation when ~/.claude/squad/ does not exist.
What it does:
Ask the user: "Initialize squad globally (~/.claude/squad/) or for this project only (.squad/)?" — default is global.
Create the chosen directory structure.
Copy the five default charter files from the default-team/ folder located in the same directory as this SKILL.md file. Resolve the path relative to the skill file, not the project root — after claude plugin install, the plugin is installed under ~/.claude/plugins/ and the default-team/ folder is a sibling of SKILL.md.
Create empty history.md files for each agent.
Create team.md listing all five agents as active.
Create routing.md as a copy of the default routing rules (from routing-rules.md in the same directory as this SKILL.md).
If project init: also create .squad/decisions.md (empty) and .squad/routing.md as a copy of the default routing rules — users who want project-specific routing overrides edit this file.
Announce completion:
"Squad initialized with 5 agents: Lead, Backend Engineer, Frontend Engineer, Tester, Scribe. Charters in
~/.claude/squad/agents/. Run@squad statusto verify."
Charter source: The default-team/ folder is in the same directory as this SKILL.md. Always resolve it as a sibling path, never as a repo-relative path.
Trigger: "who's on my team?", "squad status", @squad status
What it does:
Read team.md (project first, then global).
For each active agent, check if history.md exists and count its entries (lines starting with -).
Report:
Squad Status
────────────
🎯 Lead — 12 entries (last: 2026-03-20)
🔧 Backend — 8 entries (last: 2026-03-18)
🎨 Frontend — 3 entries (last: 2026-03-15)
🧪 Tester — 5 entries (last: 2026-03-20)
📝 Scribe — 6 entries (last: 2026-03-18)
Project layer: .squad/ ✓
Global layer: ~/.claude/squad/ ✓
decisions.md: 14 entries
If no squad initialized: prompt to run squad-init.
Trigger: "squad sync", session end, pause-work hook, /squad sync
What it does:
Launches a background agent (run_in_background: true) with the following task:
"Review the conversation history from this session. For each squad agent (Lead, Backend Engineer, Frontend Engineer, Tester, Scribe):
- Grep the conversation transcript for
[new-decision]markers. When a specialist subagent records a new project decision per the dispatch prompt template, it prefixes the line with that marker — these are the highest-priority candidates for write-back. Capture the surrounding sentence, attribute it to the agent who emitted it, and add it to that agent'shistory.mdplus todecisions.mdif it is cross-cutting.- Beyond the explicit markers, distill any new conventions, patterns, architectural decisions, or project-specific knowledge that was established or confirmed in the session — even if no marker was emitted. Markers are a hint, not a hard filter.
- Read existing
history.mdfirst before writing, and skip duplicates. Match by date + first-line summary.- Append only. Use the format in history-format.md. Never rewrite existing entries.
- Update
.squad/decisions.mdwith cross-cutting decisions (architectural, naming convention, library selection, anything that affects multiple modules)."
The background agent:
history.md files (to avoid duplicates).[new-decision] markers — these are explicit signals from the dispatch prompt template that a subagent flagged something worth persisting.history.md.decisions.md with cross-cutting items.The main session does not wait for this agent — it continues immediately. The user is notified when write-back completes.
Why the marker matters: the dispatch prompt template (see "Parallel Subagent Dispatch" earlier) instructs subagents to mark new project decisions with [new-decision]. Without the marker, squad-sync would still find decisions by free-form distillation, but the marker makes it explicit and reduces false negatives. The marker is suggested by every dispatch but is not strictly required — squad-sync handles both marker-tagged and unmarked decisions.
Manual sync: The user can run squad-sync mid-session to checkpoint learnings without ending the session.
Trigger: @lead ..., @backend ..., @frontend ..., @tester ..., @scribe ...
What it does:
Routes a direct question to a named agent, bypassing the automatic routing algorithm.
@name prefix.The user can also @-mention multiple agents in one message (e.g. @backend @frontend should we colocate the auth helper?). When more than one is mentioned, all are dispatched in parallel — same single-assistant-message pattern as the routing algorithm uses.
Example:
User: @tester what areas of this codebase are most likely to regress?
[squad dispatches Tester as a Task subagent with full charter + tier-1
history matching "regression" / "risk" / "flaky"]
🧪 Tester: Based on history — the payment flow and the auth token refresh
logic have had regressions before. I'd prioritize integration tests there
before any refactor touches those paths. [history: 2026-03-04 — payment
flow regressed during DI refactor; 2026-04-12 — auth refresh flaked under
load].
| Missing dependency | Behavior |
|---|---|
~/.claude/squad/ not initialized | Prompt user to run squad-init on first agent invocation |
No .squad/ project folder | Use global team only, no project-specific routing |
| No LongtermMemory-MCP | Skip tier 1; fall through to tier 2 (grep) |
No history.md yet | Answer from charter only (tier 5); history builds from first session |
No decision-tracker | decisions.md not synced to long-term memory; squad still writes to the file |
No project-orchestration | squad-sync not auto-triggered on session end; user invokes manually |
| Background agent unavailable | Run squad-sync inline at session end (slightly blocks wrap-up) |
Task tool, in a single message with multiple calls.Task calls in two separate messages run sequentially. Both calls go in one assistant message to fan out concurrently.writing-plans review, pre-push-review verdict). For brainstorming exploration, present each specialist's prefixed response.| Rationalization | Why It's Wrong | Correct Action |
|---|---|---|
| "I'll ask Backend, then Frontend, then synthesize" | Sequential consultation lets the second specialist anchor on the first; same wall-clock cost as parallel and worse output | Dispatch both as Task subagents in a single message |
| "I'll just answer in the main conversation as Backend" | The main conversation has the full session context — it cannot give an isolated specialist perspective. The whole point of separate-session squad is isolation | Dispatch a Task subagent. Cost: one tool call. Benefit: an answer free of session anchoring |
| "Subagent dispatch is overkill for a simple question" | If the question is trivial, the routing algorithm shouldn't surface a specialist at all. If it surfaces one, dispatch | If you find yourself thinking "skip the dispatch", revisit whether the routing match was correct |
| "Lead always synthesizes" | Lead synthesis is one extra Task dispatch. Use it only when the workflow needs ONE answer | Default to light-touch synthesis (present each prefixed response). Lead-synthesize only on explicit need |
| "Persona-switching inline is faster" | Faster, yes — but eliminates the isolation that gives squad its value. Two specialists' answers are now one specialist's monologue with two voices | Dispatch as parallel subagents even if it feels like overhead |
| "I don't need to load history; the charter is enough" | Charter is voice and authority. History is project-specific knowledge. Tier-5 (charter only) is the LAST resort, not the default | Always run the tiered lookup — tier 1 → 2 → 3 → 4 → 5 |
| Action | Steps | Files touched |
|---|---|---|
| Route a question | Match routing rules → tiered lookup → parallel Task dispatch → integrate | routing.md, charter.md, history.md |
| squad-init | Create dirs → copy charters → create empty histories | ~/.claude/squad/ or .squad/ |
| squad-status | Read team.md → count history entries → report | team.md, history.md |
| squad-sync | Background agent → distill → append to histories → update decisions.md | history.md, decisions.md |
| squad-ask | Identify agent(s) → tiered lookup per agent → parallel Task dispatch | charter.md, history.md |
| Superpowers Skill | Relationship |
|---|---|
superpowers:brainstorming | Squad intercepts clarifying questions and dispatches relevant specialists in parallel as Task subagents. Multi-specialist questions return all responses in one message |
superpowers:writing-plans | Tester + Scribe dispatched in parallel as a single Task message after the plan is drafted. Both findings merge into the ## Squad Review section |
superpowers:subagent-driven-development | Squad enriches each task subagent's prompt with role-specific tier-1 history. Independent of squad's own dispatch — both can run side by side |
superpowers:dispatching-parallel-agents | The dispatch primitive squad uses internally. Squad's routing layer decides WHICH specialists to dispatch; dispatching-parallel-agents is the lower-level skill governing how to construct multi-call messages |
pre-push-review | Tester (Phase 3 risk) + Scribe (Phase 2 decisions) dispatched in parallel during the review's evidence-gathering phase |
project-orchestration | squad-sync auto-triggers on pause-work. plan-roadmap dispatches all five specialists in parallel for roadmap-scope perspectives, then Lead synthesizes |
decision-tracker | Shares decisions.md; decision-tracker syncs it to LongtermMemory-MCP. Squad's Scribe is what writes new decisions to the file |