/subagent-system:plan-tasksfrom subagent-system
Generates parallel execution plans from task lists by analyzing dependencies and partitioning file ownership. Outputs dependency-ordered batches with agent type selection.
Ships in subagent-system. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use the task-partitioner skill to analyze the task list and codebase.
Steps:
$ARGUMENTS if provided, or prompt the user to specify a file or paste the task list.Agent type selection — include in the execution plan for each task:
| Task type | Agent type to spawn | Why |
|---|---|---|
| Audit / read-only analysis | claude (NOT code-explorer) | code-explorer lacks Bash/Write — cannot write progress files |
| Implementation / fix | claude | Needs Edit, Write, Bash tools |
| Fresh-context code review | pipeline-reviewer | Isolated context prevents self-review bias |
| Severity gate | inline (severity-gate skill) | Pause pipeline if CRITICAL found — no agent needed |
| Test writing | test-writer | Specialized test generation |
| Finding verification (>5) | finding-validator | Isolated context prevents confirmation bias |
| Final pipeline integrity | chain-verifier | Fresh context, no chain history |
Critical: Never use code-explorer for tasks that require writing progress files — it has no Bash/Write tools and will silently skip the progress file instruction.
Cross-plugin agents: test-writer ships with the test-toolkit plugin and code-explorer with the feature-dev plugin — neither lives in subagent-system, and its plugin.json declares no dependency on them. If those plugins are not enabled, fall back to the generic claude agent type for test writing (and never rely on code-explorer).
Model selection: All agents default to sonnet. Override with model: haiku only for pure read/exploration tasks with no Bash/Write (e.g., "summarize this module", "list all API endpoints") to reduce token cost. Never use haiku for implementation, security review, or verification — it produces lower-quality findings.
Mandatory pipeline shape — always end with this sequence:
Batch N-2: [fix agents in parallel]
↓
[iteration-cleanup] ← AUTO-SCHEDULE if fix batch has N≥3 agents (see rule below)
↓
Batch N-1: pipeline-reviewer
↓
severity-gate ← MUST run inline before chain-verifier
If any CRITICAL finding → STOP, spawn targeted fix agents, re-run from pipeline-reviewer
↓
Batch N: chain-verifier
↓
/audit-output [TEST_COMMAND]
↓
pipeline-retrospective ← ALWAYS run as final step; reads artifacts, writes improvement proposals
Never skip severity-gate or pipeline-retrospective. pipeline-retrospective runs even when the pipeline was clean — a clean run still produces useful "what worked well" evidence for future improvement.
Iteration-cleanup — auto-schedule rule: If the fix batch contains N≥3 agents modifying code (not audit/review/analysis agents):
iteration-cleanup agent BETWEEN the fix batch and pipeline-reviewergit diff --name-only HEAD to determine)Edit to simplify — it must NOT change behavior, only structureNon-git projects: chain-verifier requires git and will output CHAIN_VERIFICATION_BLOCKED on non-git repos. For non-git projects, replace the final chain-verifier batch with a manual verification step: have pipeline-reviewer do a second pass over all affected files, then escalate to the user for sign-off instead of automated APPROVED verdict.
Present the plan to the user for approval before spawning any agents. Do not begin execution until the user confirms.
Monitoring prerequisite: Before finalizing the plan, confirm how agent health will be monitored:
pipeline-monitor:
PROJECT_ROOT: /absolute/path explicitly — the agent cannot auto-detect it from session cwdAfter processing each file, append one line to .claude/progress/[AGENT_ID]-progress.md:
| [timestamp] | [filename] | [lines read] | [findings count] | DONE |
pipeline-monitor: note that OTel (CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1) or foreground mode is the fallback for anomaly detection.If the task list contains ambiguous dependencies (tasks that might or might not need to be sequential), surface them explicitly and ask the user to decide before finalizing the plan.
Fix agent prompt — mandatory checklist suffix:
Every implementation/fix agent prompt MUST include this suffix:
Verification checklist before finishing:
- If you added or referenced any i18n/translation key (e.g. t('some.key', ...)):
grep the locale files to confirm the key exists. If missing, add it.
- If you added any import, verify the imported module/function exists.
- Run tests: read PROJECT_ROOT/.claude/PIPELINE_CONFIG.md for TEST_COMMAND, run it,
confirm pass. If PIPELINE_CONFIG.md not found or TEST_COMMAND is NONE, skip.
- Run a final read of the edited file to confirm no syntax errors.
- [SECURITY FIX ONLY] Grep for the OLD vulnerable pattern in the edited file to confirm
it no longer exists. Example: fixing SQL injection → grep for string interpolation `${`
inside SQL strings. If the old pattern is still found → fix is INCOMPLETE, do NOT report COMPLETED.
- [SECURITY FIX ONLY] Grep for the NEW secure pattern to confirm it was applied at the
correct location. Example: SQL fix → confirm `db.prepare(` appears in the patched route.
If new pattern is absent → the fix may have been applied to the wrong section.
Why this matters: Partial fixes (e.g., validating resolvedPath but serving filePath) pass
naive read-back verification. Only pattern-level grep catches this class of regression.
Re-fix loop — when chain-verifier returns NEEDS_FIX:
Do not stop. Follow this loop:
After 3 iterations without APPROVED: stop and escalate to the user with a summary of unresolved findings. Do not loop indefinitely.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub minhthang1009/dotclaude --plugin subagent-system21 skills in this plugin
/apply-improvementsThis skill should be used when the user asks to apply improvement proposals ('apply improvements', 'ap dung improvement proposals') from .claude/improvement-proposals.md (written by pipeline-retrospective) to the plugin files./audit-outputThis skill should be used after a pipeline run completes, when the user asks to audit the pipeline output ('audit output', 'audit the run', '4-level audit'). Requires the project's test command as argument - without it Level 4 regression tests are skipped and the report is marked incomplete./chain-verifierThis skill should be used at the final step of any multi-phase pipeline to verify the complete working-tree state satisfies the original requirements. Trigger after all fix agents and pipeline-reviewer have completed. Also invoke when user asks to "run chain-verifier", "verify the pipeline output", or "confirm requirements are met"./checkpoint-writerThis skill should be used when saving current pipeline phase state to disk and creating a recovery commit. Trigger at the end of every implementation phase, when the user asks to "save a checkpoint", "commit this phase", or before any /compact or session end. Enables resume-from-checkpoint to reconstruct pipeline state after interruption./completion-checkerThis skill should be used after receiving output from a subagent that was assigned an explicit numbered task list and is expected to have produced a COMPLETION_CHECKLIST block. Do not invoke if the subagent was not given a task list — there will be no checklist to parse. Uses grep counts, not LLM estimation, to detect premature termination. Also trigger when user asks to "verify completion checklist", "check if agent finished all tasks", or "detect premature termination"./consolidate-findingsThis skill should be used when the user asks to "merge findings", "consolidate audit results", "combine security findings", or after all parallel audit agents complete and before running finding-validator or severity-gate. Produces FINDINGS_REPORT.md sorted CRITICAL→HIGH→MEDIUM→LOW with duplicates removed.Other plugins' skills for the same job