Claude Code Slash Commands
A comprehensive collection of production-ready slash commands for Claude Code that provides intelligent automation and multi-agent orchestration capabilities for modern software development.
Overview
This repository provides 57 production-ready slash commands (15 workflows, 42 tools) that extend Claude Code's capabilities through:
Workflows : Multi-agent orchestration systems that coordinate complex, multi-step operations across different domains
Tools : Specialized single-purpose utilities for focused development tasks
System Requirements
Claude Code installed and configured
Git for repository management
Installation
Note : This repository uses the slash commands pattern. For a more modern approach, consider the Plugin Marketplace which provides similar functionality through a cleaner plugin architecture.
Slash Commands (This Repository)
hljs language-bash
Copy
cd ~/.claude
git clone https://github.com/wshobson/commands.git
Plugin Marketplace (Alternative)
hljs language-bash
Copy
/plugin marketplace add https://github.com/wshobson/agents
/plugin install claude-code-essentials
Available collections include: claude-code-essentials, full-stack-development, security-hardening, data-ml-pipeline, infrastructure-devops, and more.
Command Invocation
Commands are organized in tools/ and workflows/ directories and invoked using directory prefixes:
hljs language-bash
Copy
/workflows:feature-development implement OAuth2 authentication
/tools:security-scan perform vulnerability assessment
/tools:api-scaffold create user management endpoints with RBAC
Alternative Setup (No Prefixes)
To invoke commands without directory prefixes, copy files to the root directory:
hljs language-bash
Copy cp tools/*.md .
cp workflows/*.md .
/api-scaffold create REST endpoints
/feature-development implement payment system
Command Architecture
Workflows (15 commands)
Workflows implement multi-agent orchestration patterns for complex, cross-domain tasks. Each workflow analyzes requirements, delegates to specialized agents, and coordinates execution across multiple subsystems.
Core Development Workflows
Command Purpose Agent Coordination feature-developmentEnd-to-end feature implementation Backend, frontend, testing, deployment full-reviewMulti-perspective code analysis Architecture, security, performance, quality smart-fixIntelligent problem resolution Dynamic agent selection based on issue type tdd-cycleTest-driven development orchestration Test writer, implementer, refactoring specialist
Process Automation Workflows
Command Purpose Scope git-workflowVersion control process automation Branching strategies, commit standards, PR templates improve-agentAgent optimization Prompt engineering, performance tuning legacy-modernizeCodebase modernization Architecture migration, dependency updates, pattern refactoring multi-platformCross-platform development Web, mobile, desktop coordination workflow-automateCI/CD pipeline automation Build, test, deploy, monitor
Advanced Orchestration Workflows
Command Primary Focus Specialized Agents full-stack-featureMulti-tier implementation Backend API, frontend UI, mobile, database security-hardeningSecurity-first development Threat modeling, vulnerability assessment, remediation data-driven-featureML-powered functionality Data science, feature engineering, model deployment performance-optimizationSystem-wide optimization Profiling, caching, query optimization, load testing incident-responseProduction issue resolution Diagnostics, root cause analysis, hotfix deployment
Tools (42 commands)
Tools provide focused, single-purpose utilities for specific development operations. Each tool is optimized for its domain with production-ready implementations.
AI and Machine Learning (4 tools)
Command Functionality Key Features ai-assistantAI assistant implementation LLM integration, conversation management, context handling ai-reviewML code review Model architecture validation, training pipeline review langchain-agentLangChain agent creation RAG patterns, tool integration, memory management prompt-optimizePrompt engineering Performance testing, cost optimization, quality metrics
Agent Collaboration (3 tools)
Command Focus Highlights multi-agent-reviewMulti-perspective code reviews Architecture, security, and quality assessments multi-agent-optimizeCoordinated performance optimization Database, application, and frontend tuning smart-debugAssisted debugging Root-cause analysis with performance-aware escalation
Architecture and Code Quality (4 tools)
Command Purpose Capabilities code-explainCode documentation AST analysis, complexity metrics, flow diagrams code-migrateMigration automation Framework upgrades, language porting, API migrations refactor-cleanCode improvement Pattern detection, dead code removal, structure optimization tech-debtDebt assessment Complexity analysis, risk scoring, remediation planning
Data and Database (3 tools)
Command Focus Area Technologies data-pipelineETL/ELT architecture Apache Spark, Airflow, dbt, streaming platforms data-validationData quality Schema validation, anomaly detection, constraint checking db-migrateDatabase migrations Schema versioning, zero-downtime strategies, rollback plans
DevOps and Infrastructure (5 tools)
Command Domain Implementation deploy-checklistDeployment preparation Pre-flight checks, rollback procedures, monitoring setup docker-optimizeContainer optimization Multi-stage builds, layer caching, size reduction k8s-manifestKubernetes configuration Deployments, services, ingress, autoscaling, security policies monitor-setupObservability Metrics, logging, tracing, alerting rules slo-implementSLO/SLI definition Error budgets, monitoring, automated responses
Testing and Development (6 tools)
Command Testing Focus Framework Support api-mockMock generation REST, GraphQL, gRPC, WebSocket api-scaffoldEndpoint creation CRUD operations, authentication, validation test-harnessTest suite generation Unit, integration, e2e, performance tdd-redTest-first development Failing test creation, edge case coverage tdd-greenImplementation Minimal code to pass tests tdd-refactorCode improvement Optimization while maintaining green tests
Security and Compliance (3 tools)
Command Security Domain Standards accessibility-auditWCAG compliance ARIA, keyboard navigation, screen reader support compliance-checkRegulatory compliance GDPR, HIPAA, SOC2, PCI-DSS security-scanVulnerability assessment OWASP, CVE scanning, dependency audits
Debugging and Analysis (4 tools)
Command Analysis Type Output debug-traceRuntime analysis Stack traces, memory profiles, execution paths error-analysisError patterns Root cause analysis, frequency analysis, impact assessment error-traceProduction debugging Log correlation, distributed tracing, error reproduction issueIssue tracking Standardized templates, reproduction steps, acceptance criteria
Dependency and Configuration Management (3 tools)
Command Management Area Features config-validateConfiguration management Schema validation, environment variables, secrets handling deps-auditDependency analysis Security vulnerabilities, license compliance, version conflicts deps-upgradeVersion management Breaking change detection, compatibility testing, rollback support
Documentation and Collaboration (3 tools)
Command Documentation Type Format doc-generateAPI documentation OpenAPI, JSDoc, TypeDoc, Sphinx pr-enhancePull request optimization Description generation, checklist creation, review suggestions standup-notesStatus reporting Progress tracking, blocker identification, next steps
Operations and Context (4 tools)
Command Operational Focus Use Case cost-optimizeResource optimization Cloud spend analysis, right-sizing, reserved capacity onboardEnvironment setup Development tools, access configuration, documentation context-saveState persistence Architecture decisions, configuration snapshots context-restoreState recovery Context reload, decision history, configuration restore
Usage Patterns
Common Development Scenarios
Feature Implementation
hljs language-bash
Copy
/workflows:feature-development OAuth2 authentication with JWT tokens
/tools:api-scaffold REST endpoints for user management with RBAC
/workflows:tdd-cycle shopping cart with discount calculation logic
Debugging and Performance
hljs language-bash
Copy
/workflows:smart-fix high memory consumption in production workers
/tools:error-trace investigate Redis connection timeouts
/workflows:performance-optimization optimize database query performance
Security and Compliance
hljs language-bash
Copy
/tools:security-scan OWASP Top 10 vulnerability scan
/tools:compliance-check GDPR data handling requirements
/workflows:security-hardening implement zero-trust architecture
Test-Driven Development
Standard TDD Flow
hljs language-bash
Copy
/workflows:tdd-cycle payment processing with Stripe integration
/tools:tdd-red create failing tests for order validation
/tools:tdd-green implement minimal order validation logic
/tools:tdd-refactor optimize validation performance
Command Composition Strategies
Sequential Execution Pattern
hljs language-bash
Copy
/workflows:feature-development real-time notifications with WebSockets
/tools:security-scan WebSocket implementation vulnerabilities
/workflows:performance-optimization WebSocket connection handling
/tools:deploy-checklist notification service deployment requirements
/tools:k8s-manifest WebSocket service with session affinity
Modernization Pipeline
hljs language-bash
Copy
/workflows:legacy-modernize migrate monolith to microservices
/tools:deps-audit check dependency vulnerabilities
/tools:deps-upgrade update to latest stable versions
/tools:refactor-clean remove deprecated patterns
/tools:test-harness generate comprehensive test coverage
/tools:docker-optimize create optimized container images
/tools:k8s-manifest deploy with rolling update strategy
Command Selection Guidelines
Workflow vs Tool Decision Matrix
Criteria Use Workflows Use Tools Problem Complexity Multi-domain, cross-cutting concerns Single domain, focused scope Solution Clarity Exploratory, undefined approach Clear implementation path Agent Coordination Multiple specialists required Single expertise sufficient Implementation Scope End-to-end features Specific components Control Level Automated orchestration preferred Manual control required
Workflow Selection Examples
Requirement Recommended Workflow Rationale "Build complete authentication system" /workflows:feature-developmentMulti-tier implementation required "Debug production performance issues" /workflows:smart-fixUnknown root cause, needs analysis "Modernize legacy application" /workflows:legacy-modernizeComplex refactoring across stack "Implement ML-powered feature" /workflows:data-driven-featureRequires data science expertise
Tool Selection Examples
Task Recommended Tool Output "Generate Kubernetes configs" /tools:k8s-manifestYAML manifests with best practices "Audit security vulnerabilities" /tools:security-scanVulnerability report with fixes "Create API documentation" /tools:doc-generateOpenAPI/Swagger specifications "Optimize Docker images" /tools:docker-optimizeMulti-stage Dockerfile
Execution Best Practices
Context Optimization
Technology Stack Specification : Include framework versions, database systems, deployment targets
Constraint Definition : Specify performance requirements, security standards, compliance needs
Integration Requirements : Define external services, APIs, authentication methods
Output Preferences : Indicate coding standards, testing frameworks, documentation formats
Command Chaining Strategies
Progressive Enhancement : Start with workflows for foundation, refine with tools
Pipeline Construction : Chain commands in logical sequence for complete solutions
Iterative Refinement : Use tool outputs as inputs for subsequent commands
Parallel Execution : Run independent tools simultaneously when possible
Performance Considerations
Workflows typically require 30-90 seconds for complete orchestration
Tools execute in 5-30 seconds for focused operations
Provide detailed requirements upfront to minimize iteration cycles
Use saved context (context-save/context-restore) for multi-session projects
Technical Architecture
Command Structure
Each slash command is a markdown file with the following characteristics:
Component Description Example Filename Determines command name api-scaffold.md → /tools:api-scaffoldContent Execution instructions Agent prompts and orchestration logic Variables $ARGUMENTS placeholderCaptures and processes user input Directory Command category tools/ for utilities, workflows/ for orchestration
File Organization
hljs language-ruby
Copy ~/.claude/commands /
├── workflows/
│ ├── feature-development.md
│ ├── smart-fix.md
│ └── ...
├── tools/
│ ├── api-scaffold.md
│ ├── security-scan.md
│ └── ...
└── README .md
Development Guidelines
Creating New Commands
Workflow Development
File Creation : Place in workflows/ directory with descriptive naming
Agent Orchestration : Define delegation logic for multiple specialists
Error Handling : Include fallback strategies and error recovery
Output Coordination : Specify how agent outputs should be combined
Tool Development
File Creation : Place in tools/ directory with single-purpose naming
Implementation : Provide complete, production-ready code generation
Framework Detection : Auto-detect and adapt to project stack
Best Practices : Include security, performance, and scalability considerations
Naming Conventions
Use lowercase with hyphens: feature-name.md
Be descriptive but concise: security-scan not scan
Indicate action clearly: deps-upgrade not dependencies
Maintain consistency with existing commands
Troubleshooting Guide
Diagnostic Steps
Issue Cause Resolution Command not recognized File missing or misnamed Verify file exists in correct directory Slow execution Normal workflow behavior Workflows coordinate multiple agents (30-90s typical) Incomplete output Insufficient context Provide technology stack and requirements Integration failures Path or configuration issues Check file paths and dependencies
Performance Optimization
Context Caching : Use context-save for multi-session projects
Batch Operations : Combine related tasks in single workflow
Tool Selection : Use tools for known problems, workflows for exploration
Requirement Clarity : Detailed specifications reduce iteration cycles
Featured Command Implementations
Test-Driven Development Suite
Command Type Capabilities tdd-cycleWorkflow Complete red-green-refactor orchestration with test coverage analysis tdd-redTool Failing test generation with edge case coverage and mocking tdd-greenTool Minimal implementation to achieve test passage tdd-refactorTool Code optimization while maintaining test integrity
Framework Support : Jest, Mocha, PyTest, RSpec, JUnit, Go testing, Rust tests
Security and Infrastructure
Command Specialization Key Features security-scanVulnerability detection SAST/DAST analysis, dependency scanning, secret detection docker-optimizeContainer optimization Multi-stage builds, layer caching, size reduction (50-90% typical) k8s-manifestKubernetes deployment HPA, NetworkPolicy, PodSecurityPolicy, service mesh ready monitor-setupObservability Prometheus metrics, Grafana dashboards, alert rules
Security Tools Integration : Bandit, Safety, Trivy, Semgrep, Snyk, GitGuardian
Data and Database Operations
Command Database Support Migration Strategies db-migratePostgreSQL, MySQL, MongoDB, DynamoDB Blue-green, expand-contract, versioned schemas data-pipelineBatch and streaming Apache Spark, Kafka, Airflow, dbt integration data-validationSchema and quality Great Expectations, Pandera, custom validators
Zero-Downtime Patterns : Rolling migrations, feature flags, dual writes, backfill strategies
Performance and Optimization
Command Analysis Type Optimization Techniques performance-optimizationFull-stack profiling Query optimization, caching strategies, CDN configuration cost-optimizeCloud resource analysis Right-sizing, spot instances, reserved capacity planning docker-optimizeContainer performance Build cache optimization, minimal base images, layer reduction
Additional Resources
Documentation
Source Repositories
Integration Examples
hljs language-bash
Copy
/workflows:feature-development user authentication system
/tools:security-scan authentication implementation
/tools:test-harness authentication test suite
/tools:docker-optimize authentication service
/tools:k8s-manifest authentication deployment
/tools:monitor-setup authentication metrics
License
MIT License - See LICENSE file for complete terms.
Support and Contribution
Issues : GitHub Issues
Contributions : Pull requests welcome following the development guidelines
Questions : Open a discussion in the repository