decompose
Squad Decompose Skill
The "plan" step of squad. Produces a task manifest and stops.
You are a planner. Given a user goal, draft a manifest that a subsequent
/squad:spawn run can execute. Never spawn children here, never create
worktrees, never run git mutating commands.
Workflow
- Explore first if needed. If the goal references code you haven't read, read the files before drafting the manifest. Grep / Glob for anything you're unsure about. Don't decompose blind.
- Screen for single-agent work. If the goal is one file, a typo, a small targeted change, or exploratory work — refuse. Tell the user to just do the work directly. Do not produce a manifest.
- Pick a pattern:
pipeline(linear chain, each step reads the previous),breadth-first(independent parallel children),map-reduce(N workers + one reducer). One sentence in the manifest explaining the choice. - Draft each task with these fields. Keep disjoint file ownership — every non-read-only path appears in exactly one task.
- Pick subagent type per task using the decision rules below.
- Generate a
run_id— a short kebab-case slug likeauth-rate-limit-2026-04-24. - Write the manifest to
.claude/squad/runs/<run_id>/manifest.json(create the directory). Print a short summary table and stop.
Manifest shape
Write strict JSON. No version fields, no timestamps — keep it minimal.
{
"run_id": "auth-rate-limit-2026-04-24",
"goal": "<user goal verbatim>",
"base_ref": "<git ref; default current HEAD SHA>",
"pattern": "pipeline | breadth-first | map-reduce",
"pattern_reason": "<one sentence>",
"tasks": [
{
"id": "ratelimit-lib",
"title": "Add token bucket rate limiter module",
"rationale": "<why this child exists, 1–3 sentences>",
"target_files": ["src/ratelimit/token_bucket.ts", "tests/ratelimit/token_bucket.test.ts"],
"allowed_tools": ["Read", "Edit", "Write", "Bash(npm test *)"],
"subagent_type": "named",
"named_subagent_profile": "typescript-module-author",
"validation_command": "npm test -- --run tests/ratelimit",
"dependencies": [],
"merge_order": 1
}
]
}
Every task has its own git worktree in v0.1.0 (/squad:spawn creates
them; you don't need a worktree: true field). For fork tasks, omit
named_subagent_profile. For tasks depending on others, list their ids
in dependencies and set merge_order accordingly.
Decision rules
Fork when: child needs deep parent context; short task where a named profile's setup cost would dominate; you want shared prompt cache across siblings dispatched in the same turn.
Named when: child needs a specialist prompt or different tools;
well-specified self-contained work (docs, tests, code-gen); you want
fresh context to avoid parent drift. The profile must resolve in one
of Claude Code's agent paths — project .claude/agents/<name>.md,
user ~/.claude/agents/<name>.md, or any enabled plugin's bundled
agents/<name>.md. /squad:spawn refuses only if none resolve.
If the ideal profile doesn't exist anywhere, use fork and note the
desired profile in rationale.
Parallel when: tasks share no writable paths, no mutual dependencies, each has its own validation command.
Sequential when: any of those fails, or the work is tightly-coupled fine-grained coding where children would step on each other (per the Anthropic multi-agent research post — see reference).
Additional resources
- reference/fork-vs-named.md — canonical Anthropic terminology for the two subagent shapes, with source links.
Guardrails
- Refuse if the goal produces fewer than 2 independent subtasks. Say "this is a single-agent task, just do it directly" and stop. No manifest is written.
- Refuse if any task lacks a
validation_command. Every child must be independently verifiable. - Refuse on cyclic dependencies. Run a Kahn-style topological sort on
dependenciesand print the cycle if it fails. - Refuse if two parallel tasks share a writable file — sequence them
via
dependencies, or merge them into one task. - Refuse if task ids are not unique.
- Never spawn children, never
git worktree add, never mutate git.
Task
Handle this request: $ARGUMENTS
More from skrrt-sh/skills
commit
Creates focused conventional commits with mandatory gitmojis. Use when the agent needs to review git changes, split work into commits, stage files, or write commit messages. Always use this skill when the user asks to commit, make a commit, write a commit message, split changes into commits, stage and commit files, or anything involving git commit workflows. Trigger for phrases like "commit this", "write a commit", "split into commits", "conventional commit", "gitmoji commit", "stage and commit", "commit the changes", or "help me commit".
13pr
Creates or updates GitHub pull requests and GitLab merge requests with the matching CLI. Use when the agent needs to push a branch, open a review request, or write PR or MR text. Always use this skill when the user asks to open a PR, create a pull request, push and open a PR, create a merge request, update PR text, write a PR description, or anything involving pull requests or merge requests. Trigger for phrases like "open a PR", "create a pull request", "push and open a PR", "merge request", "MR on gitlab", "update the PR", or "write PR description".
12md-writer
Write well-structured markdown documents with YAML frontmatter, Mermaid diagrams, and markdownlint compliance. Use when creating or editing .md files, writing documentation, guides, specs, or any markdown content.
12release
Drafts and publishes GitHub or GitLab releases with curated release notes. Use when the agent needs to prepare release text, compare tags, summarize release changes, or create a release. Always use this skill when the user asks to create a release, draft release notes, publish a release, summarize changes for a version, update a changelog for a release, or anything involving GitHub or GitLab releases. Trigger for phrases like "release notes", "draft a release", "publish release", "create a release", "v1.x.x release", "what changed since last tag", or "prepare release text".
11setup
Adds skrrt skills instructions to the current project's CLAUDE.md or AGENTS.md so that commits, PRs, and releases use the ship plugin skills. Use this skill whenever the user wants to set up, configure, install, or wire skrrt skills into a project, add ship plugin instructions to agent config files, or ensure the team uses /commit /pr /release instead of raw git commands. Trigger even when the user says "set up this repo", "add skills to CLAUDE.md", or "configure the ship plugin".
10spawn
Run N subagents in parallel for one big task. Splits the goal into independent pieces, dispatches one Agent per piece with isolation:worktree, cherry-picks committed work onto an integration branch ready for /ship:commit.
3