engineering/skills/command-guide/SKILL.md
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".
npx skillsauth add alirezarezvani/claude-skills command-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps you choose the most appropriate command, agent, or skill for different scenarios.
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]
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| Skill | Trigger Timing | Purpose |
|-------|----------------|---------|
| e2e-testing | E2E testing needs | Playwright test generation |
| security-review | Security review needs | OWASP Top 10 detection |
| 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 |
| 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 |
| 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 |
| 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 |
Recommended: Launch multiple independent tasks simultaneously
Scenario: Preparing PR after code completion
Scenario: Large refactor analysis
Cannot parallelize: Dependencies exist
Scenario: Fixing build error
Scenario: New feature development
| 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 | Immediately invoke tdd-guide |
| Architectural decision | Immediately invoke architect |
| Indicator | Trigger /compact |
|-----------|-------------------|
| Token > 150K | Immediately compact |
| Slow response | Suggest compact |
| Task phase switch | Compact at boundary |
| Major milestone completed | Compact then continue |
| Debugging ends -> new task | Clear debug traces |
Best Practices:
Development Workflow:
/plan -> Enter planning mode (complex tasks)
/tdd -> TDD workflow
/e2e -> E2E testing
/code-review -> Code review
/build-fix -> Fix build
Session Management:
/compact -> Compact context
/clear -> Clear session
/loop -> Looping task
/fast -> Fast mode
Documentation & Memory:
/docs -> Update docs
/remember -> Save memory
/tasks -> View tasks
Help:
/help -> View all commands
User: Add user authentication feature
Workflow:
User: npm run build failed
Workflow:
User: Refactor authentication module
Workflow:
Core Principles:
/plan for complex taskstdd-guide for new featurescode-reviewer when code completebuild-error-resolversecurity-reviewer for auth/APIverification-looptools
Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin, C#, .NET, Java, C, C++, Rust, Ruby, PHP, and Dart/Flutter. Analyzes PRs for complexity and risk, checks code quality for SOLID violations and code smells, generates review reports. Use when reviewing pull requests, analyzing code quality, identifying issues, generating review checklists.
tools
Use when planning, funding, scoping, or synthesizing enterprise research across workstreams — clinical study design, R&D program finance, market sizing/surveys, or product/user research. Triggers on "design this clinical study", "what sample size", "R&D budget", "burn rate", "capitalize or expense", "TAM SAM SOM", "market sizing", "survey design", "segment the market", "plan user interviews", "usability test", "synthesize research insights". Forks context to route to one of four Research-Operations sub-skills (clinical-research, research-finance, market-research, product-research) and returns a digest. Distinct from ra-qm-team (regulatory submission), finance (corporate close/valuation), research/grants (funding discovery), product-team (persona/journey/live experiments), and marketing-skill (campaign analytics).
development
Use when managing the money for an internal R&D program or portfolio — building a multi-period program budget with the F&A (indirect) split, tracking burn rate and runway against value-inflection milestones, or routing R&D cost items to a capitalize-vs-expense determination. Every budget output surfaces its assumptions block; capitalize-vs-expense is decision-support only and routes to a named finance owner — it never books an entry or decides accounting treatment. Distinct from finance/financial-analysis (corporate DCF, close, valuation) and research/grants (funding discovery — this manages money already won).
development
Use when planning and synthesizing product/user research as a method-and-repository discipline — selecting the right method for the goal (generative interviews vs usability test vs concept test vs validation), computing method-based saturation/sample size with an explicit confidence level, or synthesizing coded observations into insights while flagging single-source anecdotes. Never fabricates user insight; an insight requires recurrence across independent participants. Distinct from product-team/ux-researcher-designer (persona/journey artifacts), product-discovery (discovery-sprint planning), and experiment-designer (live A/B) — this is the research-ops method + insight-repository layer.