AGENT SKILL

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".

License 许可
MIT
所属仓库
msm47/Gitskil
最近更新
2026-06-22
Stars
★ 0
Forks
0

01 前言 Front Matter

name
command-guide
description
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".

03 SKILL.md 正文

Claude Code Command Selection Guide

This skill helps you choose the most appropriate command, agent, or skill for different scenarios.

Quick Decision Flowchart

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 Immediately invoke tdd-guide
Architectural decision Immediately invoke architect

7. Context Management Timing

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:

  • Compact after research, before implementation (preserve plan)
  • Compact after milestone completion (clear intermediate state)
  • Don't compact mid-implementation (lose variables/paths)

8. Command Cheat Sheet

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

9. Usage Examples

Example 1: New Feature Development

User: Add user authentication feature

Workflow:

  1. /plan -> planner agent creates plan
  2. tdd-guide -> write tests
  3. Implementation -> edit code
  4. code-reviewer -> code review
  5. security-reviewer -> security review (auth sensitive)
  6. e2e-runner -> E2E tests
  7. /compact -> compact after milestone completion

Example 2: Build Failure

User: npm run build failed

Workflow:

  1. build-error-resolver -> analyze error, minimal fix
  2. Verify build success
  3. code-reviewer -> check fix quality

Example 3: Code Refactoring

User: Refactor authentication module

Workflow:

  1. architect -> architecture analysis
  2. planner -> implementation plan
  3. refactor-cleaner -> dead code detection
  4. tdd-guide -> ensure test coverage
  5. Implementation -> refactor code
  6. verification-loop -> comprehensive verification

Core Principles:

  1. Plan first, implement later - Use /plan for complex tasks
  2. Test first - Use tdd-guide for new features
  3. Review immediately after coding - Use code-reviewer when code complete
  4. Fix build immediately when failed - Use build-error-resolver
  5. Review sensitive code - Use security-reviewer for auth/API
  6. Verify comprehensively before PR - Use verification-loop

04 同仓库更多 Skills

msm47
msm47/Gitskil

syllabus

Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Triggers whenever a user uploads a syllabus, course outline, or curriculum document and wants supplementary readings. Also triggers on: 'syllabus reading list', 'find papers for my course', 'create a reading list from this syllabus', 'recent research for my class', 'supplementary readings', 'find journal articles for these topics', 'what recent papers cover this material', 'any new research on these course topics', 'update my syllabus with recent papers'. Even casual mentions when a syllabus is attached should trigger this skill.

★ 0
msm47
msm47/Gitskil

research

Default entry point for any research request — a hybrid router that classifies the question deterministically and either delegates to a specialist research skill (pulse for trends/sentiment, grants for NIH funding, litreview for academic literature, syllabus for course reading, patent for prior-art + IP landscape, dossier for entity research) or runs its own plan-decompose-multi-source-search-synthesize-cite fallback workflow when no specialist matches. Always surfaces the routing decision so users can override. Triggers — "research [topic]", "look into [topic]", "what do we know about [topic]", "investigate [topic]", "find me information on [topic]", "do some research on [topic]", "I need to understand [topic]", or any research request that doesn't obviously match a more-specific specialist skill. Output is a markdown briefing (default) or .docx document (on request) with full citations and an audit log.

★ 0
msm47
msm47/Gitskil

pulse

Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X/Twitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend/sentiment/problems/opportunities/comparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Triggers: 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]', or any variation requesting multi-source recency intelligence on a topic. Also use for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.

★ 0
msm47
msm47/Gitskil

patent

Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search / freedom-to-operate / competitive landscape / acquisition diligence / litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Triggers: 'prior art search for [invention]', 'patent search on [topic]', 'freedom to operate analysis', 'FTO for [product]', 'patent landscape for [field]', 'is [invention] novel', 'patents on [topic]', 'competitive patent analysis', 'prior art for litigation', 'patent diligence on [company]'. Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.

★ 0
msm47
msm47/Gitskil

notebooklm

Browser automation skill for controlling Google's NotebookLM. Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio Overview, infographics, slide decks, study guides, briefing docs, mind maps, timelines, FAQs), and creating new notebooks. Triggers on any phrase involving NotebookLM — 'open NotebookLM', 'check my [name] notebook', 'pull info from NotebookLM', 'ask my notebook about X', 'add [source] to NotebookLM', 'create an infographic in NotebookLM', 'use NotebookLM Studio', 'generate a slide deck from my notebook', or any variation where the goal involves NotebookLM. Requires browser automation environment — fails gracefully when unavailable.

★ 0
msm47
msm47/Gitskil

litreview

Academic literature orientation skill that searches papers via Consensus, builds a strategic search plan using PICO (default) or SPIDER / Decomposition / hybrid as fallbacks, and synthesizes findings into a professionally formatted Word document (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5/10/20 queries) controls coverage vs. speed. Output is a 'launching pad' — not a finished review, but an orientation guide that lets a researcher dive in confidently. Triggers: 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'. Do NOT trigger for single one-off paper searches where the user just wants a quick list — that's a plain Consensus search.

★ 0