Skip to content

wshobson/commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

/api-scaffold user management with authentication
/security-scan check for vulnerabilities
/feature-development implement chat functionality

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

🔧 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

DevOps & Infrastructure

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

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

Documentation & Collaboration

Cost Optimization

Onboarding & Setup

  • onboard - Set up development environments for new team members

Subagent Tools

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
/feature-development Add user authentication with OAuth2

# Comprehensive code review
/full-review Review the authentication module

# Smart issue resolution
/smart-fix Fix performance degradation in API response times

# Modernize legacy system
/legacy-modernize Migrate monolithic Java app to microservices

# Build comprehensive multi-platform feature
/full-stack-feature User authentication with social login across web and mobile

# Implement security-first architecture
/security-hardening Harden API endpoints and implement zero-trust security model

# Create data-driven ML feature
/data-driven-feature Build recommendation engine with real-time personalization

# Optimize entire application stack
/performance-optimization Improve response times and reduce infrastructure costs

# Respond to production incident
/incident-response High CPU usage causing service degradation in production

🔧 Tool Examples (Single-Purpose Commands)

# Create a user management API
/api-scaffold user CRUD operations with JWT auth and role-based access

# Review microservices architecture
/multi-agent-review analyze our microservices for coupling and scalability issues

# Optimize LLM chat application
/prompt-optimize reduce latency for customer support chatbot while maintaining accuracy

# Create fraud detection pipeline
/data-pipeline real-time fraud detection with feature store and monitoring

# Debug production issue
/error-trace analyze high memory usage in production pods

# Secure container images
/security-scan scan and fix vulnerabilities in Docker images

# Generate API documentation
/doc-generate create OpenAPI docs with examples for REST endpoints

# Onboard new developer
/onboard Setup development environment for React/Node.js project

# Multi-perspective code review
/multi-agent-review Review authentication module

# Deep debugging
/smart-debug Investigate memory leak in production workers

# Full-stack optimization
/multi-agent-optimize Optimize checkout flow for better conversion

# Save project context
/context-save Save current project state and architectural decisions

# Restore project context
/context-restore Load context from last week's sprint

Enhanced Commands

Security & DevOps

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

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

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

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
/feature-development Add real-time chat feature with WebSocket support

# 2. Use tools for specific enhancements
/test-harness Add integration tests for WebSocket connections
/security-scan Check for WebSocket vulnerabilities
/docker-optimize Optimize container for WebSocket connections

# 3. Use a workflow for comprehensive review
/full-review Review the entire chat feature implementation

Example: Modernizing Legacy Code

# 1. Start with the modernization workflow
/legacy-modernize Migrate Express.js v4 app to modern architecture

# 2. Use specific tools for cleanup
/deps-upgrade Update all dependencies to latest versions
/refactor-clean Remove deprecated patterns and dead code
/test-harness Ensure 100% test coverage

# 3. Optimize and deploy
/docker-optimize Create multi-stage production build
/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
/api-scaffold user management API
/test-harness comprehensive test suite for user API  
/security-scan check user API for vulnerabilities
/k8s-manifest deploy user API to production

Parallel Analysis

# Multiple perspectives on the same codebase
/multi-agent-review comprehensive architecture and code review
/security-scan audit security posture  
/performance-optimization identify and fix bottlenecks
# Then consolidate findings

Iterative Refinement

# Start broad, then narrow focus
/feature-development implement payment processing
/security-scan focus on payment security
/compliance-check ensure PCI compliance
/test-harness add payment-specific tests

Cross-Domain Integration

# Frontend + Backend + Infrastructure
/api-scaffold backend payment API
/multi-agent-optimize optimize payment flow performance
/docker-optimize containerize payment service
/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

Examples:

  • "Implement user authentication system" → /feature-development
  • "Fix performance issues across the stack" → /smart-fix
  • "Modernize legacy monolith" → /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

Examples:

  • "Create Kubernetes manifests" → /k8s-manifest
  • "Scan for security vulnerabilities" → /security-scan
  • "Generate API documentation" → /doc-generate

Command Format

Slash commands are simple markdown files where:

  • The filename becomes the command name (e.g., api-scaffold.md/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

  1. Create .md file in workflows/ or tools/
  2. Use lowercase-hyphen-names
  3. Include $ARGUMENTS for user input

Troubleshooting

Command not found: Check files are in ~/.claude/commands/

Workflows slow: Normal - they coordinate multiple subagents

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

Optimization:

  • 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