🌐 Language
Claude Code Slash Commands
Production-ready slash commands for Claude Code that accelerate development through intelligent automation.
52 commands organized as:
- 🤖 Workflows: Multi-subagent orchestration for complex tasks
- 🔧 Tools: Single-purpose utilities for specific operations
🤝 Requires Claude Code Subagents
These commands work with the Claude Code Subagents for orchestration capabilities.
Installation
cd ~/.claude
git clone https://github.com/wshobson/commands.git
git clone https://github.com/wshobson/agents.git # Required for subagent orchestration
Available Commands
- 🤖 Workflows - Orchestrate multiple subagents for complex tasks
- 🔧 Tools - Single-purpose commands for specific operations
Usage
Commands are organized in the tools/
and workflows/
directories. Use them with the directory prefix:
/tools:api-scaffold user management with authentication
/tools:security-scan check for vulnerabilities
/workflows:feature-development implement chat functionality
Note: If you prefer to use commands without prefixes, you can flatten the directories:
cp tools/*.md .
cp workflows/*.md .
Claude Code automatically suggests relevant commands based on context.🤖 Workflows
Multi-subagent orchestration for complex tasks:
Feature Development
- feature-development - Backend, frontend, testing, and deployment subagents build complete features
- full-review - Multiple review subagents provide comprehensive code analysis
- smart-fix - Analyzes issues and delegates to appropriate specialist subagents
Development Processes
- git-workflow - Implements effective Git workflows with branching strategies and PR templates
- improve-agent - Enhances subagent performance through prompt optimization
- legacy-modernize - Modernizes legacy codebases using specialized subagents
- ml-pipeline - Creates ML pipelines with data and ML engineering subagents
- multi-platform - Builds cross-platform apps with coordinated subagents
- workflow-automate - Automates CI/CD, monitoring, and deployment workflows
Subagent-Orchestrated Workflows
- full-stack-feature - Multi-platform features with backend, frontend, and mobile subagents
- security-hardening - Security-first implementation with specialized subagents
- data-driven-feature - ML-powered features with data science subagents
- performance-optimization - End-to-end optimization with performance subagents
- incident-response - Production incident resolution with ops subagents
🔧 Tools (Single-Purpose Commands)
AI & Machine Learning
- ai-assistant - Build production-ready AI assistants and chatbots
- ai-review - Specialized review for AI/ML codebases
- langchain-agent - Create LangChain/LangGraph agents with modern patterns
- ml-pipeline - Create end-to-end ML pipelines with MLOps
- prompt-optimize - Optimize AI prompts for performance and quality
Architecture & Code Quality
- code-explain - Generate detailed explanations of complex code
- code-migrate - Migrate code between languages, frameworks, or versions
- refactor-clean - Refactor code for maintainability and performance
- tech-debt - Analyze and prioritize technical debt
Data & Database
- data-pipeline - Design scalable data pipeline architectures
- data-validation - Implement comprehensive data validation systems
- db-migrate - Advanced database migration strategies
DevOps & Infrastructure
- deploy-checklist - Generate deployment configurations and checklists
- docker-optimize - Advanced container optimization strategies
- k8s-manifest - Production-grade Kubernetes deployments
- monitor-setup - Set up comprehensive monitoring and observability
- slo-implement - Implement Service Level Objectives (SLOs)
- workflow-automate - Automate development and operational workflows
Development & Testing
- api-mock - Create realistic API mocks for development and testing
- api-scaffold - Generate production-ready API endpoints with complete implementation stack
- test-harness - Create comprehensive test suites with framework detection
Security & Compliance
- accessibility-audit - Comprehensive accessibility testing and fixes
- compliance-check - Ensure regulatory compliance (GDPR, HIPAA, SOC2)
- security-scan - Comprehensive security scanning with automated remediation
Debugging & Analysis
- debug-trace - Advanced debugging and tracing strategies
- error-analysis - Deep error pattern analysis and resolution strategies
- error-trace - Trace and diagnose production errors
- issue - Create well-structured GitHub/GitLab issues
Dependencies & Configuration
- config-validate - Validate and manage application configuration
- deps-audit - Audit dependencies for security and licensing
- deps-upgrade - Safely upgrade project dependencies
Documentation & Collaboration
- doc-generate - Generate comprehensive documentation
- git-workflow - Implement effective Git workflows
- pr-enhance - Enhance pull requests with quality checks
Cost Optimization
- cost-optimize - Optimize cloud and infrastructure costs
Onboarding & Setup
- onboard - Set up development environments for new team members
Subagent Tools
- multi-agent-review - Multi-perspective code review with specialized subagents
- smart-debug - Deep debugging with debugger and performance subagents
- multi-agent-optimize - Full-stack optimization with multiple subagents
- context-save - Save project context using context-manager subagent
- context-restore - Restore saved context for continuity
Features
- Production-ready implementations
- Framework auto-detection
- Security best practices
- Built-in monitoring and testing
- Commands work together seamlessly
Command Count
Total: 52 production-ready slash commands organized into:
🤖 Workflows (14 commands)
- Feature Development & Review (3 commands)
- Development Process Automation (6 commands)
- Subagent-Orchestrated Workflows (5 commands)
🔧 Tools (38 commands)
- AI & Machine Learning (5 commands)
- Architecture & Code Quality (4 commands)
- Data & Database (3 commands)
- DevOps & Infrastructure (6 commands)
- Development & Testing (3 commands)
- Security & Compliance (3 commands)
- Debugging & Analysis (4 commands)
- Dependencies & Configuration (3 commands)
- Documentation & Collaboration (1 command)
- Onboarding & Setup (1 command)
- Subagent-Specific Tools (5 commands)
Usage Examples
🤖 Workflow Examples
# Implement a complete feature
/workflows:feature-development Add user authentication with OAuth2Comprehensive code review
/workflows:full-review Review the authentication moduleSmart issue resolution
/workflows:smart-fix Fix performance degradation in API response timesModernize legacy system
/workflows:legacy-modernize Migrate monolithic Java app to microservicesBuild comprehensive multi-platform feature
/workflows:full-stack-feature User authentication with social login across web and mobileImplement security-first architecture
/workflows:security-hardening Harden API endpoints and implement zero-trust security modelCreate data-driven ML feature
/workflows:data-driven-feature Build recommendation engine with real-time personalizationOptimize entire application stack
/workflows:performance-optimization Improve response times and reduce infrastructure costsRespond to production incident
/workflows:incident-response High CPU usage causing service degradation in production
🔧 Tool Examples (Single-Purpose Commands)
# Create a user management API
/tools:api-scaffold user CRUD operations with JWT auth and role-based accessReview microservices architecture
/tools:multi-agent-review analyze our microservices for coupling and scalability issuesOptimize LLM chat application
/tools:prompt-optimize reduce latency for customer support chatbot while maintaining accuracyCreate fraud detection pipeline
/tools:data-pipeline real-time fraud detection with feature store and monitoringDebug production issue
/tools:error-trace analyze high memory usage in production podsSecure container images
/tools:security-scan scan and fix vulnerabilities in Docker imagesGenerate API documentation
/tools:doc-generate create OpenAPI docs with examples for REST endpointsOnboard new developer
/tools:onboard Setup development environment for React/Node.js projectMulti-perspective code review
/tools:multi-agent-review Review authentication moduleDeep debugging
/tools:smart-debug Investigate memory leak in production workersFull-stack optimization
/tools:multi-agent-optimize Optimize checkout flow for better conversionSave project context
/tools:context-save Save current project state and architectural decisionsRestore project context
/tools:context-restore Load context from last week's sprint
Enhanced Commands
Security & DevOps
#### /security-scan
Comprehensive security scanning with automated remediation.
- Multi-Tool Scanning: Bandit, Safety, Trivy, Semgrep, ESLint Security, Snyk
- Automated Fixes: Common vulnerabilities auto-remediated
- CI/CD Integration: Security gates for GitHub Actions/GitLab CI
- Container Scanning: Image vulnerability analysis
- Secret Detection: GitLeaks and TruffleHog integration
/docker-optimize
Advanced container optimization strategies.
- Smart Optimization: Analyzes and suggests improvements
- Multi-Stage Builds: Framework-specific optimized Dockerfiles
- Modern Tools: BuildKit, Bun, UV for faster builds
- Security Hardening: Distroless images, non-root users
- Cross-Command Integration: Works with /api-scaffold outputs
/k8s-manifest
Production-grade Kubernetes deployments.
- Advanced Patterns: Pod Security Standards, Network Policies, OPA
- GitOps Ready: FluxCD and ArgoCD configurations
- Observability: Prometheus ServiceMonitors, OpenTelemetry
- Auto-Scaling: HPA, VPA, and cluster autoscaler configs
- Service Mesh: Istio/Linkerd integration
Frontend & Data
#### /db-migrate
Advanced database migration strategies.
- Multi-Database: PostgreSQL, MySQL, MongoDB, DynamoDB
- Zero-Downtime: Blue-green deployments, rolling migrations
- Event Sourcing: Kafka/Kinesis integration for CDC
- Cross-Platform: Handles polyglot persistence
- Monitoring: Migration health checks and rollback
Combining Workflows and Tools
The real power comes from combining workflows and tools for complete development cycles:
Example: Building a New Feature
# 1. Use a workflow to implement the feature with multiple subagents
/workflows:feature-development Add real-time chat feature with WebSocket support2. Use tools for specific enhancements
/tools:test-harness Add integration tests for WebSocket connections
/tools:security-scan Check for WebSocket vulnerabilities
/tools:docker-optimize Optimize container for WebSocket connections3. Use a workflow for comprehensive review
/workflows:full-review Review the entire chat feature implementation
Example: Modernizing Legacy Code
# 1. Start with the modernization workflow
/workflows:legacy-modernize Migrate Express.js v4 app to modern architecture2. Use specific tools for cleanup
/tools:deps-upgrade Update all dependencies to latest versions
/tools:refactor-clean Remove deprecated patterns and dead code
/tools:test-harness Ensure 100% test coverage3. Optimize and deploy
/tools:docker-optimize Create multi-stage production build
/tools:k8s-manifest Deploy with zero-downtime strategy
Command Orchestration Patterns
Commands can be used individually or combined in powerful patterns:
Sequential Execution
# Build → Test → Secure → Deploy pipeline
/tools:api-scaffold user management API
/tools:test-harness comprehensive test suite for user API
/tools:security-scan check user API for vulnerabilities
/tools:k8s-manifest deploy user API to production
Parallel Analysis
# Multiple perspectives on the same codebase
/tools:multi-agent-review comprehensive architecture and code review
/tools:security-scan audit security posture
/workflows:performance-optimization identify and fix bottlenecks
Then consolidate findings
Iterative Refinement
# Start broad, then narrow focus
/workflows:feature-development implement payment processing
/tools:security-scan focus on payment security
/tools:compliance-check ensure PCI compliance
/tools:test-harness add payment-specific tests
Cross-Domain Integration
# Frontend + Backend + Infrastructure
/tools:api-scaffold backend payment API
/tools:multi-agent-optimize optimize payment flow performance
/tools:docker-optimize containerize payment service
/tools:monitor-setup payment metrics and alerts
When to Use Workflows vs Tools
🔀 Workflows & Subagent Tools
- Problem-solving: Analyze and fix issues adaptively
- Multiple perspectives: Coordinate specialist subagents
- Complex tasks: Multi-step processes across domains
- Unknown solutions: Let subagents determine approach
🛠️ Specialized Tools
- Infrastructure setup: Configure environments
- Code generation: Create specific implementations
- Analysis: Generate reports without fixes
- Domain tasks: Highly specialized operations
- "Implement user authentication system" →
/workflows:feature-development
- "Fix performance issues across the stack" →
/workflows:smart-fix
- "Modernize legacy monolith" →
/workflows:legacy-modernize
🔧 Use Tools When:
- Specific expertise needed - Clear, focused task in one domain
- Precise control desired - Want to direct specific implementation details
- Part of manual workflow - Integrating into existing processes
- Deep specialization required - Need expert-level implementation
- Building on existing work - Enhancing or refining previous outputs
- "Create Kubernetes manifests" →
/tools:k8s-manifest
- "Scan for security vulnerabilities" →
/tools:security-scan
- "Generate API documentation" →
/tools:doc-generate
Command Format
Slash commands are simple markdown files where:
- The filename becomes the command name (e.g.,
tools/api-scaffold.md
→/tools:api-scaffold
) - The file content is the prompt/instructions executed when invoked
- Use
$ARGUMENTS
placeholder for user input
Best Practices
Command Selection
- Let Claude Code suggest automatically - Analyzes context and selects optimal commands
- Use workflows for complex tasks - Subagents coordinate multi-domain implementations
- Use tools for focused tasks - Apply specific commands for targeted improvements
Effective Usage
- Provide comprehensive context - Include tech stack, constraints, and requirements
- Chain commands strategically - Workflows → Tools → Refinements
- Build on previous outputs - Commands are designed to work together
Contributing
- Create
.md
file inworkflows/
ortools/
- Use lowercase-hyphen-names
- Include
$ARGUMENTS
for user input
Troubleshooting
Command not found:
- Check files are in
~/.claude/commands/tools/
or~/.claude/commands/workflows/
- Use the correct prefix:
/tools:command-name
or/workflows:command-name
- Or flatten directories if you prefer no prefixes:
cp tools/.md . && cp workflows/.md .
Generic output: Add more specific context about your tech stack
Integration issues: Verify file paths and command sequence
Performance Tips
Command Selection:
- Workflows: Multi-subagent coordination for complex features
- Tools: Single-purpose operations for specific tasks
- Simple edits: Stay with main agent
- Start with tools for known problems
- Provide detailed requirements upfront
- Build on previous command outputs
- Let workflows complete before modifications
Adding a New Workflow:
- Focus on subagent orchestration and delegation logic
- Specify which specialized subagents to use and in what order
- Define coordination patterns between subagents
Adding a New Tool:
- Include complete, production-ready implementations
- Structure content with clear sections and actionable outputs
- Include examples, best practices, and integration points
Learn More
- Claude Code Documentation
- Slash Commands Documentation
- Subagents Documentation
- Claude Code GitHub
- Claude Code Subagents Collection - Specialized subagents used by these commands