command-guide
Claude Code Command Selection Guide - Automatically recommend and select the right commands, agents, and skills in Claude Code. Use when: (1) user is unsure which command or tool to use, (2) needs to decide which agent/skill best fits the current task, (3) querying usage scenarios for /plan, /tdd, /compact, /loop and other commands, (4) understanding when to invoke planner, code-reviewer, build-error-resolver and other agents, (5) needs command cheat sheet or decision flowchart. Triggers: "which command to use", "which agent", "command selection", "how to use /plan", "when to use /compact", "agent selection guide", "command cheat sheet", "skill recommendation".
What this skill does
# Claude Code Command Selection Guide
This skill helps you choose the most appropriate command, agent, or skill for different scenarios.
## Quick Decision Flowchart
```mermaid
graph TD
A[User Request] --> B{Request Type?}
B -->|New Feature| C[/plan]
B -->|Bug Fix| D[/tdd or build-error-resolver]
B -->|Code Review| E[/code-review or code-reviewer agent]
B -->|Testing| F[/e2e or tdd-guide agent]
B -->|Context Too Long| G[/compact]
B -->|Documentation| H[/docs or docs-lookup agent]
B -->|Looping Task| I[/loop]
B -->|Security Review| J[security-reviewer agent]
C --> K[planner agent]
D --> L{Build Failed?}
L -->|Yes| M[build-error-resolver]
L -->|No| N[tdd-guide]
E --> O[code-reviewer]
F --> P[e2e-runner]
```
## 1. Built-in Slash Commands
### Session Management Commands
| Command | Use Case | Example |
|---------|----------|---------|
| `/compact` | Context too long (>150K tokens), slow response, task phase transition | `/compact` or auto-trigger |
| `/clear` | Start fresh conversation, clear history | `/clear` |
| `/loop` | Periodic task execution, automated looping work | `/loop 5m check build status` |
| `/help` | View help, learn commands | `/help` |
| `/fast` | Need faster response (Opus 4.6 only) | `/fast` |
| `/model` | Switch model | `/model sonnet` |
### Development Workflow Commands
| Command | Use Case | Activation Timing |
|---------|----------|-------------------|
| `/plan` | Start new feature, architecture refactor, complex tasks | **Enter Plan Mode** |
| `/tdd` | Write tests, TDD development workflow | When test guidance needed |
| `/e2e` | E2E testing, critical user flow verification | When browser testing needed |
| `/code-review` | Code quality review | After writing code |
| `/build-fix` | Build failure, type errors | When build fails |
| `/learn` | Extract patterns from session, learning | Before session ends |
| `/skill-create` | Create new skill from git history | When repeating patterns found |
### Documentation & Query Commands
| Command | Use Case | Example |
|---------|----------|---------|
| `/docs` | Update project documentation | `/docs` |
| `/update-codemaps` | Update code maps | `/update-codemaps` |
| `/remember` | Save memory to memory system | `/remember user prefers concise output` |
| `/tasks` | View task list | `/tasks` |
---
## 2. Agents Selection
### Development Workflow Agents
| Agent | Trigger Condition | Purpose |
|-------|-------------------|---------|
| `planner` | Complex feature request, architectural decision | Create implementation plan |
| `architect` | System design, tech stack selection | Architecture analysis and decisions |
| `tdd-guide` | New feature, bug fix | TDD workflow guidance |
| `code-reviewer` | **Invoke immediately after writing code** | Code quality review |
| `security-reviewer` | Handling auth, API, sensitive data | Security vulnerability detection |
### Problem Solving Agents
| Agent | Trigger Condition | Purpose |
|-------|-------------------|---------|
| `build-error-resolver` | **Invoke immediately when build fails** | Fix build/type errors |
| `e2e-runner` | Critical user flows, before PR | E2E test execution |
| `refactor-cleaner` | Code maintenance, dead code cleanup | Dead code detection and cleanup |
| `doc-updater` | Update docs, codemaps | Documentation sync |
### Research & Exploration Agents
| Agent | Trigger Condition | Purpose |
|-------|-------------------|---------|
| `Explore` | Codebase exploration, file finding | Quick codebase exploration |
| `general-purpose` | Complex multi-step tasks | General task handling |
| `docs-lookup` | Query library/framework docs | Get latest API documentation |
---
## 3. Skills Selection
### Workflow Skills
| Skill | Trigger Timing | Purpose |
|-------|----------------|---------|
| `tdd-workflow` | Developing new feature/fixing bug | Complete TDD workflow guidance |
| `verification-loop` | After feature completion, before PR | Comprehensive verification (build/test/lint/security) |
| `strategic-compact` | Long session, context pressure | Guide when to manually `/compact` |
### Architecture & Pattern Skills
| Skill | Trigger Timing | Purpose |
|-------|----------------|---------|
| `frontend-patterns` | Frontend development | React/Next.js/Vue best practices |
| `backend-patterns` | Backend development | API/service architecture patterns |
| `api-design` | API design | RESTful/API design standards |
| `mcp-server-patterns` | MCP server development | MCP configuration and patterns |
### Testing Skills
| Skill | Trigger Timing | Purpose |
|-------|----------------|---------|
| `e2e-testing` | E2E testing needs | Playwright test generation |
| `security-review` | Security review needs | OWASP Top 10 detection |
### Research Skills
| Skill | Trigger Timing | Purpose |
|-------|----------------|---------|
| `deep-research` | Need deep research | Multi-round search and research |
| `exa-search` | Need web search | Web content search |
| `documentation-lookup` | Query library docs | Context7 documentation query |
---
## 4. Scenario Decision Matrix
### By Task Phase
| Phase | Recommended Tool Combination | Reason |
|-------|------------------------------|--------|
| **Requirements Analysis** | `planner` + `Explore` | Plan first, explore later |
| **Architecture Design** | `architect` + `api-design` skill | Professional architecture guidance |
| **Pre-Development** | `tdd-guide` + `tdd-workflow` skill | Test first |
| **During Development** | Direct edit + quick iteration | Stay in flow |
| **Post-Development** | `code-reviewer` + `verification-loop` | Quality gate |
| **Testing Phase** | `e2e-runner` + `e2e-testing` skill | Complete test coverage |
| **Before PR** | `security-reviewer` + `verification-loop` | Final verification |
| **Build Failure** | `build-error-resolver` | Focused fix |
### By Problem Type
| Problem | Invoke Immediately | Note |
|---------|--------------------|------|
| Build failure | `build-error-resolver` | Minimal changes, quick fix |
| Type error | `build-error-resolver` | TypeScript specialist |
| Bug fix | `tdd-guide` | Write test then fix |
| Security vulnerability | `security-reviewer` | OWASP detection |
| Poor code quality | `code-reviewer` | Immediate review |
| Missing documentation | `doc-updater` | Auto update |
| Dead code | `refactor-cleaner` | Safe cleanup |
### By Development Type
| Development Type | Skills Combination |
|------------------|--------------------|
| Frontend feature | `frontend-patterns` + `tdd-workflow` |
| Backend API | `backend-patterns` + `api-design` + `tdd-workflow` |
| MCP server | `mcp-server-patterns` + `tdd-workflow` |
| Database | `database-reviewer` agent |
| Security feature | `security-reviewer` + `security-review` skill |
---
## 5. Parallel Execution Strategy
### Parallelizable Scenarios
Recommended: Launch multiple independent tasks simultaneously
Scenario: Preparing PR after code completion
- Agent 1: code-reviewer (code quality)
- Agent 2: security-reviewer (security review)
- Agent 3: e2e-runner (E2E tests)
Scenario: Large refactor analysis
- Agent 1: architect (architecture analysis)
- Agent 2: Explore (code exploration)
- Agent 3: refactor-cleaner (dead code detection)
### Sequential Execution Required
Cannot parallelize: Dependencies exist
Scenario: Fixing build error
- Sequence: build-error-resolver -> test verification -> code-reviewer
Scenario: New feature development
- Sequence: planner -> tdd-guide (write tests) -> implementation -> code-reviewer
---
## 6. Auto-Trigger Rules
### Invoke Without User Request
| Situation | Auto Action |
|-----------|-------------|
| Code written/modified | **Immediately invoke** `code-reviewer` |
| Build fails | **Immediately invoke** `build-error-resolver` |
| Complex feature request | **Immediately invoke** `planner` |
| Handling auth/sensitive data | **Immediately invoke** `security-reviewer` |
| New feature/bug fix | **ImmRelated 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.