/flow-extras:claude-improverfrom flow-extras
Scan a repo with a parallel subagent swarm to find and generate genuinely useful Claude Code improvements — new skills, slash commands, subagents, hooks, or CLAUDE.md updates. Use WHENEVER the user says /claude-improver, "improve my claude setup", "scan my repo for claude improvements", "find useful skills for me", "build me claude commands", "what claude stuff should I add", "claude party", "subagent party". Triggers on: improve claude, claude improvements, generate skills, scan repo claude, claude-improver, useful commands. Uses a 5-lens parallel swarm grounded in actual file evidence, applies precision filters (max 5 recommendations, no duplication of existing tools), and generates artifacts that pass skill-judge. Do NOT use for: general code review (use /review), fixing bugs (use /fix), auditing CLAUDE.md only (use claude-md-improver), one-off skill authoring (use skill-forge).
Ships in flow-extras. 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.
Read when SKILL.md points to them.
Launch a precision-tuned subagent swarm that scans a repo, identifies genuinely useful Claude Code improvements grounded in actual file evidence, and generates skills/commands/hooks/subagents that pass quality gates.
The hard problem this solves: most workflow analyzers produce long lists of noise. This one optimizes for precision — every recommendation cites a specific file, survives signal filters, and respects what the user already has. Bad suggestions create a trust tax that poisons future recommendations permanently, so the bar is high and the output cap is low.
Five non-negotiable rules that separate this skill from noise-generators:
Grounding rule: Every finding must cite file:line. No file path = finding doesn't count. This is the anti-confabulation mechanism.
The 5-recommendation cap: Surface at most 5 ranked recommendations. Decision fatigue begins at 7-9 items and a longer list gets dismissed entirely.
Duplication check first: Before any recommendation is surfaced, verify no equivalent exists. Check: existing skills, commands, agents, hooks, Makefile targets, shell aliases, fish abbreviations, MCP servers. Recommending /deploy when make deploy exists destroys trust.
Force a deletion finding: LLMs have a systematic addition bias — training data celebrates what was built, hides what was removed. The swarm must produce at least one "remove/simplify X" candidate per run. This is a required category, not optional.
Trust-tax-first: If in doubt, drop the recommendation. One wrong suggestion poisons trust in all future suggestions. Precision > recall, always.
Each phase lists the references it requires. Do NOT load references outside the phase that needs them — context bloat degrades later synthesis.
No references needed.
Before launching any agents, the orchestrator (main conversation) must inventory what already exists. This prevents the #1 analyzer failure mode: recommending something the user already has.
# Discover target repo
TARGET="${1:-$(pwd)}"
WORKSPACE="$TARGET/.claude-improver/$(date +%Y%m%d-%H%M%S)"
mkdir -p "$WORKSPACE/wave-1" "$WORKSPACE/generated"
Then inventory in parallel:
.claude/skills/, .claude/commands/, .claude/agents/ (project + ~/.claude/)settings.json hooks at all scopes.mcp.json serversWrite the inventory to $WORKSPACE/inventory.md. Every later agent will be given this file to avoid duplicate recommendations.
Load references/swarm-prompts.md before launching. Do not load other references yet.
Launch exactly 5 parallel agents, each with model: "sonnet" and mode: "bypassPermissions". Each has a non-overlapping concern-lens and explicit "do NOT cover X" boundaries.
The 5-lens roster (proven by brainstorm, adapted for claude-improver):
| Agent | Lens | Key question |
|---|---|---|
| friction-scanner | Workarounds and pain | Where does the user wrestle with their own tools? |
| claude-artifact-scanner | Existing Claude setup | What's already wired, what's sparse, what's stale? |
| pain-artifact-scanner | Concrete pain evidence | Where does recurring friction have a paper trail? |
| structure-scanner | Architecture and entry points | What workflows does the user actually run? |
| deletion-scanner | What to remove | What's dead, duplicate, or deprecated? |
Agent prompts are in references/swarm-prompts.md — use those templates verbatim (they encode the grounding rule, workspace path, and scope boundaries).
After launching all 5, wait for completion. Then verify every artifact file exists and has >50 lines. If any is missing or stubby, re-run that specific agent (don't re-run successful ones) with a rephrased, narrower prompt.
Load references/signal-patterns.md AND references/artifact-decision-matrix.md. Do not load swarm-prompts.md or generation-quality-bar.md yet.
The orchestrator reads every artifact file from disk — never synthesize from agent return messages (those truncate). This step must not be delegated to a subagent.
For each finding across all 5 artifacts, apply these filters in order:
inventory.md? Before dropping a finding as a duplicate (or keeping it as a gap), open the matching item's SKILL.md, script or target and record the path:line of the overlap in the drop reason; a name match in inventory.md alone decides nothing, because a stale or misleading name can drop a real gap or keep a duplicate.references/signal-patterns.md. Drop anti-signals (one-time setup, pleasurably manual, rarely-triggered, framework-handled).references/artifact-decision-matrix.md. Quick heuristics: deterministic/blocking → hook, LLM-judgment automation → skill, delegation with own context → subagent, always-needed short rule → CLAUDE.md, filetype-scoped rule → skill with paths:.Before surfacing each surviving recommendation, ask yourself:
If any answer is "no" or "not sure", drop the recommendation.
Rank the survivors by: (a) evidence strength, (b) frequency of pain, (c) low implementation cost, (d) zero new dependencies. Tiebreak: when (a) and (b) are equal, prefer the finding with narrower implementation scope — a 15-line hook beats an 80-line skill at equal evidence, since smaller artifacts face less adoption friction and break trust less if wrong.
Single-source findings get a stricter bar: a finding backed by only one signal type (e.g., only a TODO comment, no frequency evidence) must be corroborated by a second signal (emotional language AND a README gotcha documenting the same pain, or a TODO AND co-change coupling). Uncorroborated single-signal findings are dropped.
Take top 5. Ensure at least one is a "remove/simplify" deletion finding.
If 0 survivors remain after filters: the repo is already well-tooled. Go to the "No viable recommendations" fallback.
No references needed.
Show the user a compact ranked list — one line per recommendation:
1. [HOOK] PostToolUse on Edit(fish/**/*.fish) → auto-run `fish --no-config -c 'source {file}; exit'`
Evidence: goto.fish:22-25 has a logic bug the dotfiles-reviewer missed
Cost: ~15 lines in settings.json, zero deps
2. [SKILL] /stow-check — verify all stow packages' symlinks
Evidence: CLAUDE.md documents manual `for dir in */; do stow "$dir"; done`; no health check exists
Cost: ~40 lines, zero deps
3. [CLAUDE.md UPDATE] Remove stale "Active Technologies" section at /Users/you/dotfiles/CLAUDE.md:96-103
Evidence: Go migration completed 2026-01-16, Node.js spec references are stale
Cost: deletion
...
Ask: "Which of these should I generate? (numbers, 'all', 'none', or 'expand N' for more detail on item N)"
Never generate without explicit approval. User selects subset. If user requests "expand N", show the full supporting evidence (file contents, shell history cluster, co-change data) before they decide — then re-prompt for their selection.
Load references/generation-quality-bar.md. Do not load swarm-prompts.md, signal-patterns.md, or artifact-decision-matrix.md during generation.
Generate artifacts one at a time — not batch. For each approved recommendation:
$WORKSPACE/generated/<name>.md first<target-path>? (yes/edit/skip)"Branching on user response:
Key quality requirements (violations = immediate regeneration):
No references needed.
After each user "yes" in Phase 4:
~/.claude/skills/<name>/SKILL.md, ~/.claude/commands/<name>.md, or $TARGET/.claude/...)settings.json loaded it (or, for user-scope, restart Claude Code session)After all approved artifacts are written, show a summary:
These come from production skills (overkill, brainstorm, qa, skill-forge). Violations silently degrade output quality.
bypassPermissions is mandatory on every Agent call. This is the #1 silent failure: agents without write permissions produce nothing and the pipeline silently breaks.model: "sonnet" on all research agents. haiku is too shallow for reasoning; opus is overkill. Never inherit — always set explicitly.See references/swarm-prompts.md for the exact agent prompt templates to use (they bake in all these rules).
inventory.md before every recommendation, and open the matching item (path:line) rather than trusting its name. Duplication destroys trust faster than anything else.docker compose down && docker compose up --build ran 15 times in the last month — a /rebuild command would save ~30s × 15 = 7.5 min/month" is grounded. "You should add a deploy skill because deployment exists" is not.| Situation | Action |
|---|---|
| All 5 agents return <3 findings total | FIRST verify this isn't silent failure: check every $WORKSPACE/wave-1/*.md exists and is >50 lines AND contains a "What I Checked" section AND has file:line citations. If any stub exists → treat as "agent failed" row below. Only after all 5 files have genuine, grounded findings should you conclude the repo is well-tooled. Then: "Your setup is in good shape — here's what I checked." List the 5 lenses with "clean" status. |
| An agent fails / writes stub artifact | Re-run that specific agent ONLY with a narrowed prompt. Add to the prompt: "This is a re-run. Your previous output was too brief. Focus only on [narrowed scope]. The other 4 agents covered [brief fact summary from their findings, not opinions] — do NOT cover those areas." |
| Synthesis finds contradictions between agents | Flag in the Phase 3 presentation with "⚠ Conflicting evidence:" prefix. Show both perspectives with their file:line citations. Let the user decide. |
| 0 survivors after Phase 2 filters | Legitimate case — all findings were anti-signals or duplicates of existing tooling. Tell user: "Agents found N candidates, but all were either [already-handled / one-time-setup / framework-provided / rarely-triggered]. Your setup has no high-signal gaps right now." List the 2-3 strongest dropped findings with their drop reason. |
| Shell history not accessible (CI, fresh machine) | Skip shell-history signal. Rely on Makefile/CI/README/TODO signals. Tell the user which signals were unavailable. |
| User approves 0 recommendations | Fine. Tell user: "No changes made. Run /claude-improver again after you've had time to consider." |
Target repo has no .claude/ directory | Partial inventory is fine. Note in inventory.md: "No .claude/ found — user-scope artifacts only." Proceed normally. |
| User says "expand N" at approval gate | Show the full supporting evidence for item N (file contents, shell cluster counts, co-change stats). Then re-prompt for selection. |
| Workspace from prior run exists | Create new timestamped workspace. Don't reuse — stale artifacts contaminate synthesis. |
Do NOT load references at skill startup. Each reference is large; loading unused ones bloats context and degrades synthesis.
| Phase | MUST load | Do NOT load |
|---|---|---|
| Phase 0 (Inventory) | — | all four |
| Phase 1 (Swarm Scan) | swarm-prompts.md | signal-patterns, artifact-decision-matrix, generation-quality-bar |
| Phase 2 (Synthesis) | signal-patterns.md, artifact-decision-matrix.md | swarm-prompts, generation-quality-bar |
| Phase 3 (Present) | — | all four |
| Phase 4 (Generate) | generation-quality-bar.md | swarm-prompts, signal-patterns, artifact-decision-matrix |
| Phase 5 (Deliver) | — | all four |
Reference contents:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub tomaspalsson/flow --plugin flow-extras20 skills in this plugin
/auditStage-gated parallel code audit for a whole codebase or module: recon → 6 parallel detection agents (correctness, security, performance, design, tests, style) → dedup + triage → user approval gate → fix planning → second approval gate → serialized apply with revert-on-failure → verification. Use for whole-codebase/module debt inventory, health checks, modernization, production-readiness sweeps, or quality audits. Triggers on: /audit, audit this codebase, audit repo, find tech debt, pay down debt, code health check, make production-ready, refactor everything, apply clean code, quality sweep. Do NOT use for: single-PR or branch review ≤10 files (use /pr-reviewer), one-file cleanup (use /simplify), bug fix (use /fix), feature work (use /flow:next), style-only formatting (run the formatter), or uncommitted-change review (use /review). Scope threshold: whole-codebase or whole-module only — not for incremental branch work./babysitDrive one open pull request, or several independent ones, toward merge-ready after flow ships a draft: fix failing CI and resolve merge conflicts. Use when asked to babysit a PR, get it green, fix the CI, resolve the conflicts, or check on one or more PRs. Modes: check (one read-only report) or drive (loop until CI is green and the PR merges clean, or a hard stop). Open review threads are reported and left to the user. Never merges and never marks a draft ready. Not for opening the PR (use /flow:next), not for reviewing someone else's PR (use /pr-reviewer), not for diagnosing a bug from scratch (use /flow:fix).