Command | Description | Usage Examples |
---|---|---|
claude |
Start interactive REPL session |
claude claude "explain this project"
|
claude -p "query" |
Query via SDK then exit (headless mode) |
claude -p "fix the bug in auth.js" claude -p "analyze performance issues"
|
cat file | claude -p |
Process piped content |
cat error.log | claude -p "explain these errors" tail -f app.log | claude -p "monitor for issues"
|
claude -c |
Continue most recent conversation |
claude -c claude -c -p "add more tests"
|
claude -r "id" "query" |
Resume specific session by ID |
claude -r "abc123" "finish the PR" claude -r "session-42" "continue refactoring"
|
claude update |
Update to latest version | claude update |
claude mcp |
Configure Model Context Protocol servers |
claude mcp add github npx @modelcontextprotocol/server-github claude mcp list claude mcp remove github
|
Flag | Description | Usage Examples |
---|---|---|
--add-dir |
Add additional working directories |
claude --add-dir ../lib ../shared claude --add-dir /path/to/other/project
|
--allowedTools |
Whitelist tools without prompting |
claude --allowedTools "Read" "Write" "Bash(git *)" claude --allowedTools "Edit(*.py)"
|
--disallowedTools |
Blacklist specific tools |
claude --disallowedTools "Bash(rm *)" "Write(.env)" claude --disallowedTools "Delete"
|
--print, -p |
Print response and exit |
claude -p "explain this function" claude -p "generate unit tests"
|
--output-format |
Set output format (text/json/stream-json) |
claude -p "analyze code" --output-format json claude -p "get metrics" --output-format stream-json
|
--verbose |
Enable verbose logging |
claude --verbose claude -p "debug issue" --verbose
|
--max-turns |
Limit conversation turns |
claude -p "refactor" --max-turns 3 claude --max-turns 5
|
--model |
Specify AI model |
claude --model sonnet claude --model claude-3-5-opus-20241022
|
--dangerously-skip-permissions |
Skip all permission prompts (use cautiously) | claude --dangerously-skip-permissions (only in containers) |
Command | Description | Usage Examples |
---|---|---|
/bug |
Report bugs to Anthropic | /bug |
/clear |
Clear conversation history | /clear |
/compact [instructions] |
Compress conversation with optional focus |
/compact /compact focus on auth changes /compact keep recent edits
|
/config |
View/modify configuration |
/config /config model /config permissions
|
/cost |
Show token usage statistics | /cost |
/doctor |
Check Claude Code installation health | /doctor |
/help |
Get usage help and list commands |
/help /help permissions
|
/init |
Initialize project with CLAUDE.md | /init |
/login |
Switch Anthropic accounts | /login |
/logout |
Sign out from Anthropic account | /logout |
/memory |
Edit CLAUDE.md memory files | /memory |
/model |
Select or change AI model |
/model /model sonnet /model opus
|
/permissions |
View or update tool permissions |
/permissions /permissions allow Write /permissions deny Bash(rm *)
|
/review |
Review code or pull requests |
/review /review PR #123
|
/status |
Show current session status | /status |
/vim |
Enable vim-style editing | /vim |
/add-dir |
Add directories mid-session |
/add-dir ../backend /add-dir /shared/libs
|
/ui / /21 |
Generate UI components using 21st.dev patterns |
/ui login form /21 responsive navbar /ui data table --accessible
|
/logo |
Search and insert company logos |
/logo GitHub /logo Discord --format TSX
|
MCP Server | Purpose | Usage Examples |
---|---|---|
Context7 |
Official library documentation and framework patterns |
claude --c7 "React useEffect patterns" claude --context7 "Next.js API routes"
|
Magic |
Modern UI component generation from 21st.dev |
claude --magic "create responsive dashboard" claude --magic "accessible form components"
|
Sequential |
Complex multi-step reasoning and analysis |
claude --seq "debug authentication flow" claude --sequential "analyze system architecture"
|
Morphllm |
Pattern-based code editing and transformations |
claude --morph "update all React classes to hooks" claude --morphllm "enforce ESLint rules"
|
Playwright |
Browser automation and E2E testing |
claude --play "test login flow" claude --playwright "accessibility validation"
|
Serena |
Semantic code understanding and project memory |
claude --serena "rename function across project" /sc:load --deep
|
Flag | Description | Usage Examples |
---|---|---|
--think |
Enable structured analysis (~4K tokens) |
claude --think "analyze architecture" "debug this issue" --think
|
--think-hard |
Deep analysis with Sequential MCP (~10K tokens) |
claude --think-hard "system redesign" "performance optimization" --think-hard
|
--ultrathink |
Maximum depth analysis (~32K tokens) |
claude --ultrathink "legacy modernization" "critical system debugging" --ultrathink
|
--uc / --ultracompressed |
Symbol-enhanced communication (30-50% token reduction) |
claude --uc "large codebase analysis" claude --ultracompressed --scope project
|
--delegate |
Enable sub-agent parallel processing |
claude --delegate auto "refactor entire project" claude --delegate files "analyze 50+ files"
|
--concurrency [n] |
Control max concurrent operations (1-15) |
claude --concurrency 5 "parallel analysis" claude --concurrency 10 --delegate
|
--all-mcp |
Enable all MCP servers for maximum capability |
claude --all-mcp "complex multi-domain problem" claude --all-mcp --ultrathink
|
--no-mcp |
Disable all MCP servers, native tools only |
claude --no-mcp "simple task" claude --no-mcp --performance-priority
|
Command | Description | Usage Examples |
---|---|---|
/sc:implement |
Feature implementation with AI guidance |
/sc:implement user authentication /sc:implement --type component LoginForm /sc:implement payment --with-tests --iterative
|
/sc:build |
Build and compilation |
/sc:build /sc:build --type prod --optimize /sc:build src/ --clean
|
/sc:design |
Design and planning |
/sc:design microservices-migration /sc:design dashboard --persona-architect
|
/sc:analyze |
Multi-dimensional code analysis |
/sc:analyze --focus security /sc:analyze src/ --focus performance /sc:analyze --scope module auth/
|
/sc:troubleshoot |
Problem investigation |
/sc:troubleshoot "login not working" /sc:troubleshoot --logs error.log /sc:troubleshoot performance --focus database
|
/sc:explain |
Educational explanations |
/sc:explain React hooks /sc:explain --persona-mentor async patterns /sc:explain --answer-only JWT tokens
|
/sc:improve |
Code improvement and refactoring |
/sc:improve messy-file.js /sc:improve --safe-mode legacy/ /sc:improve --focus accessibility components/
|
/sc:test |
Testing operations |
/sc:test /sc:test --coverage /sc:test --type unit --magic --play
|
/sc:cleanup |
Code cleanup and maintenance |
/sc:cleanup /sc:cleanup --type imports /sc:cleanup legacy/ --preview --validate
|
/sc:document |
Documentation generation |
/sc:document README --type guide /sc:document api/ --format markdown /sc:document --persona-scribe
|
/sc:git |
Git operations |
/sc:git commit --smart-commit /sc:git status /sc:git --interactive
|
/sc:estimate |
Project estimation |
/sc:estimate "redesign auth system" /sc:estimate migration --persona-architect /sc:estimate --type complexity
|
/sc:task |
Task management |
/sc:task create "implement feature" /sc:task list /sc:task complete task-123
|
/sc:index |
Project indexing |
/sc:index /sc:index --deep /sc:index src/
|
/sc:load |
Context loading |
/sc:load --deep --summary /sc:load project-overview /sc:load --focus architecture
|
/sc:spawn |
Sub-agent creation |
/sc:spawn security-expert /sc:spawn --type analyzer code-review
|
/sc:business-panel |
Multi-expert business analysis with 9 business thought leaders |
/sc:business-panel @strategy_doc.pdf /sc:business-panel "market analysis" --experts porter,christensen /sc:business-panel --mode debate --focus innovation
|
/sc:save |
Save session context and project memory |
/sc:save session_name /sc:save --checkpoint --summary
|
/sc:brainstorm |
Interactive requirements discovery and ideation |
/sc:brainstorm "AI project management tool" /sc:brainstorm --strategy systematic --depth deep /sc:brainstorm --strategy agile --parallel
|
/sc:reflect |
Task reflection and validation analysis |
/sc:reflect --type task --analyze /sc:reflect --type session --validate /sc:reflect --type completion
|
/sc:workflow |
Implementation workflow generation |
/sc:workflow "authentication system" --strategy agile /sc:workflow @prd.md --strategy systematic --depth deep /sc:workflow enterprise-project --validate
|
/sc:spec-panel |
Expert specification review with multiple specialists |
/sc:spec-panel @api.spec.yml --mode critique /sc:spec-panel "user story" --mode discussion /sc:spec-panel @system.spec --focus architecture
|
/sc:select-tool |
Intelligent MCP tool selection and optimization |
/sc:select-tool "rename across 10 files" --analyze /sc:select-tool "bulk code updates" --explain /sc:select-tool "save project context"
|
Expert | Expertise | Key Frameworks | Usage Context |
---|---|---|---|
π¨ Christensen | Innovation & Disruption | Jobs-to-be-Done, Disruption Theory | Product innovation, market entry strategy |
π Porter | Competitive Strategy | Five Forces, Value Chain Analysis | Industry analysis, competitive positioning |
π§ Drucker | Management Principles | Management by Objectives, Innovation | Organizational effectiveness, strategic planning |
πͺ Godin | Marketing & Tribes | Purple Cow, Permission Marketing | Brand differentiation, customer engagement |
π Kim & Mauborgne | Blue Ocean Strategy | Value Innovation, Four Actions Framework | Market creation, differentiation strategy |
π Collins | Organizational Excellence | Good to Great, Built to Last | Performance transformation, culture building |
π‘οΈ Taleb | Risk & Uncertainty | Antifragility, Black Swan Theory | Risk management, resilience planning |
πΈοΈ Meadows | Systems Thinking | Leverage Points, System Dynamics | Complex problem solving, organizational change |
π¬ Doumont | Communication Excellence | Cognitive Load Theory, Message Clarity | Presentation optimization, documentation clarity |
Persona | Trigger Flag | Auto-Activation Context | Specialization |
---|---|---|---|
ποΈ architect | --persona-architect |
System design, architecture tasks | Long-term architecture, scalability, system patterns |
π¨ frontend | --persona-frontend |
UI/component work | React/Vue/Angular, accessibility, UI/UX |
βοΈ backend | --persona-backend |
API/server tasks | APIs, databases, server logic, microservices |
π‘οΈ security | --persona-security |
Security analysis | OWASP, vulnerabilities, threat modeling |
π analyzer | --persona-analyzer |
Debugging, investigation | Root cause analysis, pattern detection |
π¨βπ« mentor | --persona-mentor |
Educational tasks | Teaching, explanations, best practices |
π refactorer | --persona-refactorer |
Code improvement | Refactoring patterns, code smells |
β‘ performance | --persona-performance |
Optimization tasks | Profiling, caching, query optimization |
βοΈ scribe | --persona-scribe |
Documentation | Technical writing, documentation patterns |
Pattern | Description | Usage Examples |
---|---|---|
/sc:load --deep |
Load comprehensive project context |
/sc:load --deep --summary /sc:load project-overview /sc:load --focus architecture
|
/sc:save checkpoints |
Create session restoration points |
/sc:save --checkpoint "auth-complete" /sc:save session_name --summary
|
Cross-session patterns |
Maintain context between sessions |
/sc:load β Work β /sc:save β Resume later Session lifecycle management
|
Command | Description | Usage Examples |
---|---|---|
superclaude --verify |
Check system dependencies |
superclaude --verify superclaude --verify --verbose
|
superclaude commit |
Generate AI commit messages |
superclaude commit superclaude commit --interactive superclaude commit "Add OAuth"
|
superclaude changelog |
Create smart changelogs |
superclaude changelog superclaude changelog --verbose
|
superclaude readme |
Auto-generate README | superclaude readme |
superclaude review |
AI code review analysis |
superclaude review superclaude review --verbose
|
superclaude docs |
Generate technical documentation | superclaude docs |
superclaude brainstorm |
Feature ideation and suggestions | superclaude brainstorm |
superclaude annotate |
Add AI notes to git history |
superclaude annotate superclaude annotate --verbose
|
# Start Claude Code claude # Load project context /init # Explore codebase "Show me how authentication works" # Plan changes "Think hard about refactoring the auth module" # Implement changes "Refactor authentication to use JWT tokens" # Test changes /sc:test --coverage # Commit with AI message superclaude commit --interactive
# Identify issue /sc:troubleshoot "users can't login" --logs error.log # Analyze affected code /sc:analyze auth/ --focus security # Fix with validation /sc:improve auth.js --safe-mode --preview # Verify fix /sc:test auth/ --coverage # Document changes /sc:document --type changelog
# Design phase /sc:design "payment processing system" --persona-architect # Estimate effort /sc:estimate "payment feature" --type complexity # Implementation /sc:implement payment --type service --with-tests --iterative # Security review /sc:analyze payment/ --focus security --persona-security # Performance optimization /sc:improve payment/ --focus performance # Final documentation /sc:document payment/ --format markdown
# Load PR context claude -p "Review PR #123" # Deep analysis /sc:analyze --focus quality --scope project # Security check /sc:analyze --focus security --persona-security # Performance review /sc:analyze --focus performance # Generate review report superclaude review --verbose
# Terminal 1: Frontend claude --add-dir frontend/ /sc:implement dashboard --framework react # Terminal 2: Backend claude --add-dir backend/ /sc:implement api --type api # Terminal 3: Testing claude --add-dir tests/ /sc:test --type integration
{ "model": "claude-3-5-sonnet-20241022", "maxTokens": 4096, "permissions": { "allowedTools": ["Read", "Write", "Bash(git *)", "Edit"], "deny": ["Read(.env)", "Bash(rm *)", "Write(production.*)"] }, "hooks": { "PostToolUse": [{ "matcher": "Write(*.py)", "hooks": [{ "type": "command", "command": "python -m black $file" }] }] } }
## Project Context - Stack: React, TypeScript, PostgreSQL - Architecture: Microservices ## Commands - Build: npm run build - Test: npm test - Deploy: npm run deploy ## Standards - Use TypeScript for all new code - Minimum 80% test coverage - Follow ESLint configuration
{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "ghp_your_token" } } } }
/clear
regularly to manage context/compact
for long sessions@
--dangerously-skip-permissions
outside containers/permissions
regularly/cost
command/compact
to reduce token usage--uc
flag for large projects.claude/commands/
in version control