[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-204ef9c7-4a7e-4644-bb65-78682e644a2a":3,"$ftNaQz3PWYgx1T-daVyktkvF0_313WVnEuiLPu1HH7hM":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"204ef9c7-4a7e-4644-bb65-78682e644a2a","command-guide","> 这句话没有内容，无法进行翻译。","cat_life_career","mod_other","alirezarezvani,other","---\nname: \"command-guide\"\ndescription: >\n  Claude Code Command Selection Guide - Automatically recommend and select the right\n  commands, agents, and skills in Claude Code.\n  Use when: (1) user is unsure which command or tool to use, (2) needs to decide which\n  agent\u002Fskill best fits the current task, (3) querying usage scenarios for \u002Fplan, \u002Ftdd,\n  \u002Fcompact, \u002Floop and other commands, (4) understanding when to invoke planner,\n  code-reviewer, build-error-resolver and other agents, (5) needs command cheat sheet\n  or decision flowchart.\n  Triggers: \"which command to use\", \"which agent\", \"command selection\", \"how to use \u002Fplan\",\n  \"when to use \u002Fcompact\", \"agent selection guide\", \"command cheat sheet\", \"skill recommendation\".\n---\n\n# Claude Code Command Selection Guide\n\nThis skill helps you choose the most appropriate command, agent, or skill for different scenarios.\n\n## Quick Decision Flowchart\n\n```mermaid\ngraph TD\n    A[User Request] --> B{Request Type?}\n    B -->|New Feature| C[\u002Fplan]\n    B -->|Bug Fix| D[\u002Ftdd or build-error-resolver]\n    B -->|Code Review| E[\u002Fcode-review or code-reviewer agent]\n    B -->|Testing| F[\u002Fe2e or tdd-guide agent]\n    B -->|Context Too Long| G[\u002Fcompact]\n    B -->|Documentation| H[\u002Fdocs or docs-lookup agent]\n    B -->|Looping Task| I[\u002Floop]\n    B -->|Security Review| J[security-reviewer agent]\n\n    C --> K[planner agent]\n    D --> L{Build Failed?}\n    L -->|Yes| M[build-error-resolver]\n    L -->|No| N[tdd-guide]\n    E --> O[code-reviewer]\n    F --> P[e2e-runner]\n```\n\n## 1. Built-in Slash Commands\n\n### Session Management Commands\n\n| Command | Use Case | Example |\n|---------|----------|---------|\n| `\u002Fcompact` | Context too long (>150K tokens), slow response, task phase transition | `\u002Fcompact` or auto-trigger |\n| `\u002Fclear` | Start fresh conversation, clear history | `\u002Fclear` |\n| `\u002Floop` | Periodic task execution, automated looping work | `\u002Floop 5m check build status` |\n| `\u002Fhelp` | View help, learn commands | `\u002Fhelp` |\n| `\u002Ffast` | Need faster response (Opus 4.6 only) | `\u002Ffast` |\n| `\u002Fmodel` | Switch model | `\u002Fmodel sonnet` |\n\n### Development Workflow Commands\n\n| Command | Use Case | Activation Timing |\n|---------|----------|-------------------|\n| `\u002Fplan` | Start new feature, architecture refactor, complex tasks | **Enter Plan Mode** |\n| `\u002Ftdd` | Write tests, TDD development workflow | When test guidance needed |\n| `\u002Fe2e` | E2E testing, critical user flow verification | When browser testing needed |\n| `\u002Fcode-review` | Code quality review | After writing code |\n| `\u002Fbuild-fix` | Build failure, type errors | When build fails |\n| `\u002Flearn` | Extract patterns from session, learning | Before session ends |\n| `\u002Fskill-create` | Create new skill from git history | When repeating patterns found |\n\n### Documentation & Query Commands\n\n| Command | Use Case | Example |\n|---------|----------|---------|\n| `\u002Fdocs` | Update project documentation | `\u002Fdocs` |\n| `\u002Fupdate-codemaps` | Update code maps | `\u002Fupdate-codemaps` |\n| `\u002Fremember` | Save memory to memory system | `\u002Fremember user prefers concise output` |\n| `\u002Ftasks` | View task list | `\u002Ftasks` |\n\n---\n\n## 2. Agents Selection\n\n### Development Workflow Agents\n\n| Agent | Trigger Condition | Purpose |\n|-------|-------------------|---------|\n| `planner` | Complex feature request, architectural decision | Create implementation plan |\n| `architect` | System design, tech stack selection | Architecture analysis and decisions |\n| `tdd-guide` | New feature, bug fix | TDD workflow guidance |\n| `code-reviewer` | **Invoke immediately after writing code** | Code quality review |\n| `security-reviewer` | Handling auth, API, sensitive data | Security vulnerability detection |\n\n### Problem Solving Agents\n\n| Agent | Trigger Condition | Purpose |\n|-------|-------------------|---------|\n| `build-error-resolver` | **Invoke immediately when build fails** | Fix build\u002Ftype errors |\n| `e2e-runner` | Critical user flows, before PR | E2E test execution |\n| `refactor-cleaner` | Code maintenance, dead code cleanup | Dead code detection and cleanup |\n| `doc-updater` | Update docs, codemaps | Documentation sync |\n\n### Research & Exploration Agents\n\n| Agent | Trigger Condition | Purpose |\n|-------|-------------------|---------|\n| `Explore` | Codebase exploration, file finding | Quick codebase exploration |\n| `general-purpose` | Complex multi-step tasks | General task handling |\n| `docs-lookup` | Query library\u002Fframework docs | Get latest API documentation |\n\n---\n\n## 3. Skills Selection\n\n### Workflow Skills\n\n| Skill | Trigger Timing | Purpose |\n|-------|----------------|---------|\n| `tdd-workflow` | Developing new feature\u002Ffixing bug | Complete TDD workflow guidance |\n| `verification-loop` | After feature completion, before PR | Comprehensive verification (build\u002Ftest\u002Flint\u002Fsecurity) |\n| `strategic-compact` | Long session, context pressure | Guide when to manually `\u002Fcompact` |\n\n### Architecture & Pattern Skills\n\n| Skill | Trigger Timing | Purpose |\n|-------|----------------|---------|\n| `frontend-patterns` | Frontend development | React\u002FNext.js\u002FVue best practices |\n| `backend-patterns` | Backend development | API\u002Fservice architecture patterns |\n| `api-design` | API design | RESTful\u002FAPI design standards |\n| `mcp-server-patterns` | MCP server development | MCP configuration and patterns |\n\n### Testing Skills\n\n| Skill | Trigger Timing | Purpose |\n|-------|----------------|---------|\n| `e2e-testing` | E2E testing needs | Playwright test generation |\n| `security-review` | Security review needs | OWASP Top 10 detection |\n\n### Research Skills\n\n| Skill | Trigger Timing | Purpose |\n|-------|----------------|---------|\n| `deep-research` | Need deep research | Multi-round search and research |\n| `exa-search` | Need web search | Web content search |\n| `documentation-lookup` | Query library docs | Context7 documentation query |\n\n---\n\n## 4. Scenario Decision Matrix\n\n### By Task Phase\n\n| Phase | Recommended Tool Combination | Reason |\n|-------|------------------------------|--------|\n| **Requirements Analysis** | `planner` + `Explore` | Plan first, explore later |\n| **Architecture Design** | `architect` + `api-design` skill | Professional architecture guidance |\n| **Pre-Development** | `tdd-guide` + `tdd-workflow` skill | Test first |\n| **During Development** | Direct edit + quick iteration | Stay in flow |\n| **Post-Development** | `code-reviewer` + `verification-loop` | Quality gate |\n| **Testing Phase** | `e2e-runner` + `e2e-testing` skill | Complete test coverage |\n| **Before PR** | `security-reviewer` + `verification-loop` | Final verification |\n| **Build Failure** | `build-error-resolver` | Focused fix |\n\n### By Problem Type\n\n| Problem | Invoke Immediately | Note |\n|---------|--------------------|------|\n| Build failure | `build-error-resolver` | Minimal changes, quick fix |\n| Type error | `build-error-resolver` | TypeScript specialist |\n| Bug fix | `tdd-guide` | Write test then fix |\n| Security vulnerability | `security-reviewer` | OWASP detection |\n| Poor code quality | `code-reviewer` | Immediate review |\n| Missing documentation | `doc-updater` | Auto update |\n| Dead code | `refactor-cleaner` | Safe cleanup |\n\n### By Development Type\n\n| Development Type | Skills Combination |\n|------------------|--------------------|\n| Frontend feature | `frontend-patterns` + `tdd-workflow` |\n| Backend API | `backend-patterns` + `api-design` + `tdd-workflow` |\n| MCP server | `mcp-server-patterns` + `tdd-workflow` |\n| Database | `database-reviewer` agent |\n| Security feature | `security-reviewer` + `security-review` skill |\n\n---\n\n## 5. Parallel Execution Strategy\n\n### Parallelizable Scenarios\n\nRecommended: Launch multiple independent tasks simultaneously\n\nScenario: Preparing PR after code completion\n- Agent 1: code-reviewer (code quality)\n- Agent 2: security-reviewer (security review)\n- Agent 3: e2e-runner (E2E tests)\n\nScenario: Large refactor analysis\n- Agent 1: architect (architecture analysis)\n- Agent 2: Explore (code exploration)\n- Agent 3: refactor-cleaner (dead code detection)\n\n### Sequential Execution Required\n\nCannot parallelize: Dependencies exist\n\nScenario: Fixing build error\n- Sequence: build-error-resolver -> test verification -> code-reviewer\n\nScenario: New feature development\n- Sequence: planner -> tdd-guide (write tests) -> implementation -> code-reviewer\n\n---\n\n## 6. Auto-Trigger Rules\n\n### Invoke Without User Request\n\n| Situation | Auto Action |\n|-----------|-------------|\n| Code written\u002Fmodified | **Immediately invoke** `code-reviewer` |\n| Build fails | **Immediately invoke** `build-error-resolver` |\n| Complex feature request | **Immediately invoke** `planner` |\n| Handling auth\u002Fsensitive data | **Immediately invoke** `security-reviewer` |\n| New feature\u002Fbug fix | **Immediately invoke** `tdd-guide` |\n| Architectural decision | **Immediately invoke** `architect` |\n\n---\n\n## 7. Context Management Timing\n\n| Indicator | Trigger `\u002Fcompact` |\n|-----------|-------------------|\n| Token > 150K | Immediately compact |\n| Slow response | Suggest compact |\n| Task phase switch | Compact at boundary |\n| Major milestone completed | Compact then continue |\n| Debugging ends -> new task | Clear debug traces |\n\n**Best Practices**:\n- Compact after research, before implementation (preserve plan)\n- Compact after milestone completion (clear intermediate state)\n- Don't compact mid-implementation (lose variables\u002Fpaths)\n\n---\n\n## 8. Command Cheat Sheet\n\n```\nDevelopment Workflow:\n\u002Fplan        -> Enter planning mode (complex tasks)\n\u002Ftdd         -> TDD workflow\n\u002Fe2e         -> E2E testing\n\u002Fcode-review -> Code review\n\u002Fbuild-fix   -> Fix build\n\nSession Management:\n\u002Fcompact     -> Compact context\n\u002Fclear       -> Clear session\n\u002Floop        -> Looping task\n\u002Ffast        -> Fast mode\n\nDocumentation & Memory:\n\u002Fdocs        -> Update docs\n\u002Fremember    -> Save memory\n\u002Ftasks       -> View tasks\n\nHelp:\n\u002Fhelp        -> View all commands\n```\n\n---\n\n## 9. Usage Examples\n\n### Example 1: New Feature Development\n\nUser: Add user authentication feature\n\nWorkflow:\n1. \u002Fplan -> planner agent creates plan\n2. tdd-guide -> write tests\n3. Implementation -> edit code\n4. code-reviewer -> code review\n5. security-reviewer -> security review (auth sensitive)\n6. e2e-runner -> E2E tests\n7. \u002Fcompact -> compact after milestone completion\n\n### Example 2: Build Failure\n\nUser: npm run build failed\n\nWorkflow:\n1. build-error-resolver -> analyze error, minimal fix\n2. Verify build success\n3. code-reviewer -> check fix quality\n\n### Example 3: Code Refactoring\n\nUser: Refactor authentication module\n\nWorkflow:\n1. architect -> architecture analysis\n2. planner -> implementation plan\n3. refactor-cleaner -> dead code detection\n4. tdd-guide -> ensure test coverage\n5. Implementation -> refactor code\n6. verification-loop -> comprehensive verification\n\n---\n\n**Core Principles**:\n1. **Plan first, implement later** - Use `\u002Fplan` for complex tasks\n2. **Test first** - Use `tdd-guide` for new features\n3. **Review immediately after coding** - Use `code-reviewer` when code complete\n4. **Fix build immediately when failed** - Use `build-error-resolver`\n5. **Review sensitive code** - Use `security-reviewer` for auth\u002FAPI\n6. **Verify comprehensively before PR** - Use `verification-loop`\n","","imported","https:\u002F\u002Fgithub.com\u002Falirezarezvani\u002Fclaude-skills","user_system_seed","SkillOPIC",true,210,593,"2026-05-16 13:53:31",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"579fba89-c7c1-4ad8-b271-742e9a221ded","1.0.0","command-guide.zip",3951,"uploads\u002Fskills\u002F204ef9c7-4a7e-4644-bb65-78682e644a2a\u002Fcommand-guide.zip","02972eba8a298bd66c31b056269fed9d1a12873ba2e97c89a9d411fb9ce25a97","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":11199}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]