scan
Scans the codebase against another skill's criteria using a parallel agent team. Use when the user says /scan <skill-name> to audit code quality, find violations, or assess conformance to best practices.
What this skill does
# Codebase Scan Audit the codebase against another skill's criteria using a parallel agent team. ## Workflow ### 1. Parse args & load skill Extract the skill name from the args passed to this skill. - If no skill name provided, list available skills in `.claude/skills/` and ask the user which to scan against. - If skill doesn't exist, list available skills and tell the user. - Read `.claude/skills/<name>/SKILL.md` plus any files in `references/` and `rules/` subdirectories. - Distill the skill's content into a numbered **criteria checklist**: a flat list of concrete, testable rules labeled C1, C2, C3, etc. Each criterion should be a single sentence describing what to check for. - If the skill has no evaluable code criteria (e.g., workflow-only skills like `why` that don't define code patterns or rules), tell the user it's not scannable and stop. ### 2. Discover relevant files Use the skill's criteria to infer file scope: - React/frontend criteria → `app/**/*.tsx`, `app/**/*.ts` - Backend criteria → `services/**/*.ts` - General/mixed → both of the above - CSS/styling → `app/**/*.css`, `app/**/*.tsx` Always exclude: `node_modules/`, `dist/`, `*.test.*`, `*.spec.*`, `**/migrations/**`, `**/*.d.ts`, generated files. Count candidate files. If zero, tell the user and stop. ### 3. Plan team composition Split files into chunks by directory subtree so no file is assigned to two agents: | Candidate files | Teammates | |----------------|-----------| | < 100 | 2 (or skip team for < 20) | | 100–500 | 3 | | 500+ | 4–5, split by top-level directory | For very small scans (< 20 files), skip the team — scan inline and jump to step 6. ### 4. Spawn scan team 1. `spawnTeam` with name `scan-<skill-name>` 2. Create one `TaskCreate` per chunk with: - Subject: `Scan <directory-area> against <skill-name> criteria` - Description: Include the **full criteria checklist**, the file scope (glob patterns), and the teammate instructions from `references/teammate-instructions.md` 3. Spawn teammates as `general-purpose` subagent_type (they need Read, Glob, Grep + team communication) 4. Name teammates `scanner-1`, `scanner-2`, etc. 5. Assign tasks via `TaskUpdate` with `owner` ### 5. Collect & synthesize Wait for all teammates to complete their tasks. Each teammate reports findings in structured format: ``` FINDING: C<n> | SEVERITY | file/path.ts:LINE | Description ``` Collect all findings from teammate messages. ### 6. Generate report Create `.claude-scan/<skill-name>.md` using the format in `references/report-format.md`. Key sections: - Executive Summary (2-3 sentences) - Criteria Evaluated (table with violation counts) - Findings by Severity (Critical → Warning → Info tables) - Patterns Observed - Statistics - Recommended Fix Order (batched by non-overlapping file groups) ### 7. Cleanup & present - If a team was spawned: send `shutdown_request` to all teammates, then `cleanup` - Display inline summary: total findings by severity, top violated criteria, scan scope - Tell the user the full report is at `.claude-scan/<skill-name>.md` - Ask: "Want me to spawn a fix team to address these findings?" ### 8. Fix team (if user says yes) 1. Read the report's "Recommended Fix Order" section 2. Group fixes into non-overlapping file batches 3. `spawnTeam` with name `fix-<skill-name>` 4. Create tasks per batch — each task description includes: - The specific violations to fix (from the report) - The relevant criteria definitions - Instructions from `references/fix-team-instructions.md` 5. Spawn `general-purpose` teammates named `fixer-1`, `fixer-2`, etc. (need Edit/Write) 6. Assign tasks and wait for completion 7. Shutdown and cleanup fix team 8. Ask user if they want to re-scan to verify fixes
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.