Transform Claude Code into a complete development platform with 58 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
This repository extends Claude Code with custom slash commands that provide intelligent automation for:
- ⚡ Testing:
/xtest
- Run tests, generate coverage reports, create test cases - 🔍 Code Quality:
/xquality
- Format, lint, type-check with auto-fixes - 🔒 Security:
/xsecurity
- Scan for vulnerabilities, secrets, security issues - 🏗️ Architecture:
/xarchitecture
- Design systems, analyze patterns - 🚀 Git Workflow:
/xgit
- Automated commits with smart messages - 🐛 Debugging:
/xdebug
- AI debugging assistant with persistent context - 📚 Documentation:
/xdocs
- Generate and maintain documentation - 🔧 Refactoring:
/xrefactor
- Intelligent code improvements
Think of it like VS Code extensions - but for Claude Code. These commands give Claude deep knowledge of development workflows and tools.
-
🔍 Review the source code - Examine the files you'll be running:
- NPM package source:
claude-dev-toolkit/
- The published package code - Commands directory:
slash-commands/active/
- All command implementations - Hook scripts:
hooks/
- Scripts that integrate with Claude Code events
- NPM package source:
-
🛡️ Understand what runs: Commands will:
- Execute bash/shell commands on your system
- Read and modify files in your projects
- Make git commits and pushes
- Install dependencies and tools
- Run tests and linting tools
-
🔐 Verify authenticity:
- Check the commit history
- Review GitHub Actions tests
- Examine the MIT License
- Start with individual commands, not bulk installation
- Test in a disposable/sandbox environment first
- Review any command with
/x[name] help
before using - Monitor what files are created/modified
- Keep your git history clean for easy rollback
This tool is provided as-is under MIT License. Use at your own discretion.
Security First: Review the Security Notice above before installation
# 1. Install Claude Code (if you haven't already)
npm install -g @anthropic-ai/claude-code
# 2. Install Claude Dev Toolkit via NPM (review source first!)
npm install -g @paulduvall/claude-dev-toolkit
# 3. Deploy commands to Claude Code
claude-commands install --active # Install 13 core commands
# OR
claude-commands install --all # Install all 58 commands
# 4. Configure Claude Code settings (Recommended)
claude-commands config --list # List available templates
claude-commands config --template basic-settings.json # Apply basic config
# OR
claude-commands config --template security-focused-settings.json # Enhanced security
# OR
claude-commands config --template comprehensive-settings.json # Full features
# 5. Install AI subagents (Optional)
claude-commands subagents --install # Install 26 specialized AI subagents
# 6. Start using AI-powered development commands
claude
/xtest # Run all tests intelligently
/xquality # Check and fix code quality issues
/xsecurity # Scan for security vulnerabilities
/xgit # Automated git workflow with smart commits
For contributing or accessing experimental features (
# Install development version with experimental commands
npm install -g @paulduvall/claude-dev-toolkit
# Install experimental commands (45 additional commands)
claude-commands install --experiments # Experimental features
claude-commands install --all # All 58 commands
# Access AI subagents for specialized tasks
claude-commands subagents --install # 26 specialized AI assistants
That's it! You now have 13 powerful AI development commands + intelligent subagents available in any project.
Once installed, these 13 essential commands work in any project on your machine:
/xtest
- Smart test runner (detects framework, runs all tests)/xquality
- Code quality checks (format, lint, type-check)/xquality fix
- Auto-fix common quality issues/xgit
- Automated git workflow with AI-generated commit messages
/xsecurity
- Comprehensive security scanning (secrets, vulnerabilities)/xrefactor
- Intelligent code refactoring and smell detection/xdebug
- AI-powered debugging assistant with persistent context
/xarchitecture
- System design and architecture analysis/xspec
- Requirements and specification generation/xdocs
- Documentation generation and maintenance
/xpipeline
- CI/CD pipeline optimization and management/xrelease
- Release management and deployment automation/xconfig
- Configuration management and environment setup
Every command includes built-in help:
/xtest help # Show all testing options
/xquality help # Show quality check options
/xsecurity help # Show security scanning options
/xconfig help # Show configuration options
# Check code quality and fix issues
/xquality # Run all quality checks
/xquality fix # Auto-fix formatting, imports, etc.
# Run tests with intelligent defaults
/xtest # Runs all tests automatically
/xtest coverage # Include coverage analysis
/xtest unit # Run only unit tests
# Security scanning
/xsecurity # Comprehensive security scan
/xsecurity secrets # Quick check for exposed credentials
# Automated git workflow
/xgit # Stage, commit with AI message, and push
# Comprehensive analysis before code review
/xrefactor --analyze # Find code smells and improvement opportunities
/xquality report # Detailed quality metrics
/xsecurity # Security vulnerability scan
/xdocs --update # Update documentation
/xgit # Commit improvements
# Design system architecture
/xarchitecture --design --pattern microservices
# Create specifications
/xspec --feature "user-authentication" --gherkin
# Generate documentation
/xdocs --api --architecture
You need Claude Code installed first:
# Install Claude Code
npm install -g @anthropic-ai/claude-code
# Authenticate (opens browser automatically)
claude
Most users authenticate via browser (no API key needed). See Claude Code docs for details.
Debug Specialist - Persistent debugging assistant for complex issues:
# Simple debugging handled by /xdebug command
/xdebug "ImportError: No module named 'requests'"
# Complex issues automatically route to specialist sub-agent
@debug-specialist analyze this intermittent memory leak
@debug-specialist continuing our investigation from yesterday
Features:
- Persistent Context: Remembers previous debugging sessions
- Root Cause Analysis: Systematic investigation methodology
- Multi-Language Support: Python, JavaScript, Java, Go, and more
- Performance Debugging: Memory leaks, bottlenecks, optimization
NEW: Lightweight trigger scripts that delegate to AI subagents:
# Automatic security analysis before file changes
CLAUDE_TOOL="Edit" ./hooks/pre-write-security.sh
# Quality checks before git commits
./hooks/pre-commit-quality.sh
# Automatic debugging assistance on errors
./hooks/on-error-debug.sh "ImportError: No module named 'requests'"
Hybrid Approach Benefits:
- Immediate Response: Lightweight bash triggers (30-150 lines each)
- AI Intelligence: Complex analysis delegated to specialized subagents
- Simplified Maintenance: Replaced 253-line monolithic script with focused triggers
- Clear Delegation: Structured context passed to appropriate subagents
Available Trigger Scripts:
hooks/pre-write-security.sh # → security-auditor subagent
hooks/pre-commit-quality.sh # → style-enforcer subagent
hooks/on-error-debug.sh # → debug-specialist subagent
hooks/subagent-trigger-simple.sh # → any subagent (flexible)
Claude Code Integration:
{
"hooks": {
"PreToolUse": [{
"matcher": "Edit|Write|MultiEdit",
"hooks": [{
"command": "~/.claude/hooks/pre-write-security.sh",
"blocking": true
}]
}]
}
}
Architecture Foundation:
- 8 Modular Libraries: Shared utilities in
hooks/lib/
for consistency - Security First: Input validation, credential detection, audit trails
- Production Ready: Error recovery, comprehensive logging, timeout handling
- Easy Extension: Simple patterns for creating domain-specific triggers
Advanced commands for specialized workflows:
- Planning & Analytics:
/xplanning
,/xanalytics
,/xmetrics
- Infrastructure:
/xinfra
,/xmonitoring
,/xaws
- Compliance:
/xcompliance
,/xgovernance
,/xpolicy
- Advanced Security:
/xred
,/xrisk
,/xscan
- Performance:
/xperformance
,/xoptimize
Deploy with: ./deploy.sh --experiments
- Zero Configuration: Commands work intelligently with any project
- Smart Defaults: No parameters needed for common tasks
- Context Aware: AI understands your codebase and suggests improvements
- Learns Your Patterns: Adapts to your coding style and preferences
- Cross-Language: Works with Python, JavaScript, Go, Java, and more
- Contextual Help: Provides relevant suggestions based on your code
- Git Automation: Smart commit messages, automated workflows
- CI/CD Ready: Commands integrate seamlessly with pipelines
- Security First: Built-in security scanning and governance
- Compliance: Automated policy enforcement and audit trails
- Security Hooks: Real-time protection against vulnerabilities
- Scalable: Works for individual developers and large teams
# Install the toolkit globally
npm install -g @paulduvall/claude-dev-toolkit
# Install command sets
claude-commands install --active # Install 13 core commands
claude-commands install --experiments # Install 44 experimental commands
claude-commands install --all # Install all 58 commands
# Configuration management
claude-commands config --list # List available templates
claude-commands config --template <name> # Apply configuration template
claude-commands config --help # Show config command help
# Subagents management
claude-commands subagents --list # List available subagents
claude-commands subagents --install # Install subagents to Claude Code
claude-commands subagents --help # Show subagents command help
# Check what's available
claude-commands list # List all available commands
claude-commands list --active # List only active commands
claude-commands list --experimental # List only experimental commands
# Check installation status
claude-commands status
# Commands are now available in Claude Code
claude
/xhelp # List all available commands
Quick one-liner without global install:
npx @paulduvall/claude-dev-toolkit
Uninstall:
# Uninstall the package (removes everything)
npm uninstall -g @paulduvall/claude-dev-toolkit
git clone https://github.com/PaulDuvall/claude-code.git
cd claude-code
./setup.sh # Basic setup with 13 core commands + subagents
./setup.sh --setup-type security # Includes security hooks
./setup.sh --setup-type comprehensive # All commands + all subagents + security
./setup.sh --skip-subagents # Skip subagent deployment
./deploy.sh # Deploy core commands only
./deploy.sh --experiments # Deploy experimental commands
./deploy.sh --all # Deploy all 58 commands
./deploy-subagents.sh # Deploy subagents separately
./deploy-subagents.sh --all # Deploy all available subagents
./verify-setup.sh # Diagnose installation issues
./validate-commands.sh # Validate command integrity
ls ~/.claude/commands/x*.md # List installed commands
Common Issues:
- Commands not recognized? Restart Claude Code:
claude
- Permission errors? Re-run:
./setup.sh
- Need help? Each command has built-in help:
/xtest help
slash-commands/active/
- 13 production-ready commands (deployed by default)slash-commands/experiments/
- 44 experimental/conceptual commandssubagents/
- AI specialist subagents with persistent contexthooks/
- Hybrid hook architecture with lightweight triggers- Lightweight Trigger Scripts (30-150 lines each):
pre-write-security.sh
- Security analysis → security-auditor subagentpre-commit-quality.sh
- Quality checks → style-enforcer subagenton-error-debug.sh
- Error analysis → debug-specialist subagentsubagent-trigger-simple.sh
- General-purpose subagent trigger
lib/
- Modular foundation (8 specialized modules):config-constants.sh
- Configuration constants and validationfile-utils.sh
- Secure file operations and path validationerror-handler.sh
- Standardized error handling and loggingcontext-manager.sh
- Context gathering and managementargument-parser.sh
- CLI argument parsing with validationsubagent-discovery.sh
- Subagent discovery and enumerationsubagent-validator.sh
- Comprehensive subagent validationexecution-engine.sh
- Advanced execution patterns (for complex scenarios)
- Lightweight Trigger Scripts (30-150 lines each):
templates/
- Configuration templates for different use casessubagent-hooks.yaml
- Event mapping configuration templatehybrid-hook-config.yaml
- Hybrid architecture configuration guide
tests/
- Integration test suite for hook systemspecs/
- Command specifications and validation frameworkdocs/
- Complete documentation including hook integration guide
The hook system has evolved through two major architectural improvements:
Phase 1: Monolithic → Modular (v1.0)
- 333-line monolithic script → 8 specialized modules
- Eliminated god function antipattern and code smells
- Enhanced CLI, security, and error handling
Phase 2: Complex → Hybrid (v2.0)
- 253-line complex orchestration script → 4 lightweight trigger scripts
- Bash complexity → AI-driven intelligence via subagent delegation
- Heavy orchestration → Simple context gathering and delegation
Current Hybrid Architecture:
- 4 lightweight triggers (30-150 lines each) replacing complex bash logic
- AI delegation for complex analysis via specialized subagents
- Preserved modular foundation with 8 shared library modules
- Immediate response with intelligent analysis
- Simplified maintenance and easy extensibility
Key Quality Improvements:
- ✅ Simplified Architecture: 253-line complex script → 4 focused triggers (30-150 lines each)
- ✅ AI-Driven Logic: Replaced bash complexity with intelligent subagent delegation
- ✅ Immediate Response: Lightweight triggers with structured context gathering
- ✅ Preserved Foundation: 8 modular libraries for consistency and reuse
- ✅ Enhanced Security: Comprehensive validation, credential detection, audit trails
- ✅ Production Ready: Error recovery, logging, timeout handling, compatibility
- ✅ Easy Extension: Simple patterns for creating domain-specific triggers
- Create new commands in
slash-commands/active/
orslash-commands/experiments/
- Validate with
./validate-commands.sh
- Test locally with
./deploy.sh --include yourcommand
- Follow existing patterns and security best practices
- Lightweight Triggers: Create focused trigger scripts (30-150 lines) following existing patterns
- Use Shared Libraries: Leverage
hooks/lib/
modules for consistency and security - AI Delegation: Structure context and delegate complex logic to appropriate subagents
- Testing: Support manual testing with environment variables (
CLAUDE_TOOL
,CLAUDE_FILE
) - Documentation: Include usage examples and Claude Code integration patterns
Example New Trigger:
# hooks/my-custom-trigger.sh
source "$(dirname "$0")/lib/config-constants.sh"
source "$(dirname "$0")/lib/context-manager.sh"
# Gather context, delegate to subagent, provide clear user guidance
Transform your development workflow with AI. Get started in 2 minutes with intelligent automation for testing, quality, security, and deployment.