πŸ“š Claude Code and SuperClaude Tools Complete Reference Guide

Claude Code Tool Commands

Core CLI Commands

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

CLI Flags Reference

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)

Built-in Slash Commands

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 Integration

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

Advanced Execution Flags

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

SuperClaude Framework Commands

All 23 Slash Commands

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"

Business Expert Panel (9 Thought Leaders)

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

9 Cognitive Personas

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

Memory Management & Session Persistence

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

SuperClaude CLI (GitHub Workflow Tool)

All CLI Commands

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

Common Workflow Examples

Basic Development Workflow

# 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

Bug Fix Workflow

# 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

Feature Implementation Workflow

# 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

Code Review Workflow

# 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

Parallel Development

# 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

Configuration Files

Claude Code settings.json

{
  "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"
      }]
    }]
  }
}

CLAUDE.md Template

## 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

MCP Configuration

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token"
      }
    }
  }
}

Best Practices Quick Reference

Performance Tips

  • Use /clear regularly to manage context
  • Enable /compact for long sessions
  • Use specific file references with @
  • Leverage parallel processing with multiple terminals

Security Best Practices

  • Never use --dangerously-skip-permissions outside containers
  • Configure deny lists for sensitive files
  • Use project-specific CLAUDE.md files
  • Review /permissions regularly

Cost Optimization

  • Track usage with /cost command
  • Use /compact to reduce token usage
  • Be specific in prompts to reduce iterations
  • Use SuperClaude's --uc flag for large projects

Team Collaboration

  • Share .claude/commands/ in version control
  • Standardize CLAUDE.md templates
  • Use consistent SuperClaude personas
  • Document custom workflows in README