A curated collection of powerful commands for Claude Code to enhance your development workflow.
Detailed command documentation available in docs/
Each command has comprehensive documentation including:
- When to use it (specific scenarios and triggers)
- How it works (step-by-step workflow)
- Usage examples (real-world scenarios)
- Integration patterns (command chaining)
- Success criteria (expected outcomes)
Quick links:
- /ok documentation - Universal router
- /code/debug documentation - TAPE debugging
- /code/refactor documentation - Smart refactoring
- /code/dry documentation - DRY optimization
- /code/repomix documentation - Production audit
- /learn documentation - Deep learning
One command that does everything - reads context and routes automatically
The smart entry point for all workflows. Analyzes your current context (git status, file types, directory structure) and automatically routes to the most appropriate command.
# Just type /ok and let it figure out what you need
/ok
Smart detection:
- π¨ Errors detected β Routes to
/code/debug
- π Code smells β Routes to
/code/refactor
- π Duplicate content β Routes to
/content/dedup
or/code/dry
- π Documentation scattered β Routes to
/learn
or/content/write
- π― Complex project β Routes to
/workflow/orchestrate
- β‘ Active development β Continues current momentum
Special handling:
- Detects
~/.claude/*
system directories (commands, agents, hooks) - Avoids auto-processing command definitions and system files
- Learns your workflow patterns over time
Philosophy: "One command, infinite intelligence." Type /ok
and let context drive action.
Automated production readiness audits using AI-powered analysis
Generates comprehensive audit reports focused on production hardening: caching strategies, observability, security vulnerabilities, and performance optimization.
# Audit current directory
/code/repomix
# Audit specific project
/code/repomix ~/projects/my-app
What it does:
- Auto-detects project type (Go, JavaScript, PHP, Python, Rust)
- Generates optimized
.repomixignore
for clean code snapshots - Uses Gemini AI to analyze codebase for production issues
- Validates findings with language-specific specialists
- Outputs single comprehensive
AUDIT.md
with actionable roadmap
Output: Prioritized implementation plan with:
- π¨ Critical (Deploy Blockers)
β οΈ High Priority (This Week)- π Medium Priority (This Month)
- β Quick Wins (Low Effort, High Impact)
Requirements:
TAPE methodology enforcement for systematic bug resolution
Orchestrates error analysis, fix implementation, and validation using the TAPE framework: Think β Analyze β Plan β Execute.
# Debug with error description
/code/debug "ImportError: module 'requests' not found"
# Debug system issue
/code/debug "Server returns 500 errors intermittently"
# General debugging session
/code/debug
TAPE workflow:
- THINK - Understand system architecture and data flow
- ANALYZE - Gather error symptoms, logs, and evidence
- PLAN - Generate and test hypotheses systematically
- EXECUTE - Implement proven fix, test, and validate
What it does:
- Delegates to
error-analysis-specialist
for systematic diagnosis - Enforces TAPE checkpoints (no Execute without proven root cause)
- Implements fixes via
fix-implementation-specialist
- Validates with
test-analyzer
(no regressions) - Extracts debugging patterns for future reference
Output: Complete debugging session report with resolution metrics.
Philosophy: "Think twice, code once." No trial-and-error. Every fix must be based on proven root cause.
Auto-detects project type and delegates to language-specific specialists
Intelligent code quality improvements with automatic project detection. Routes to Go, JavaScript, PHP, Python, or Rust specialists based on your codebase.
# Auto-detect and refactor
/code/refactor
# Focus on specific area
/code/refactor logging
/code/refactor performance
/code/refactor testing
Auto-detection:
- Checks for
go.mod
βgo-specialist
- Checks for
package.json
βjs-specialist
(orreact-specialist
,nextjs-specialist
) - Checks for
composer.json
βphp-specialist
- Checks for
requirements.txt
/pyproject.toml
β Python specialist - Checks for
Cargo.toml
β Rust specialist
Refactoring priorities:
- Reusability-first design - Pure functions, dependency injection, composable code
- Simplify - Reduce complexity, clear naming
- Organize - Proper structure, separation of concerns
- Clean - Remove dead code, eliminate duplication (3+ occurrences β extract)
- Clarify - Self-documenting code, explicit logic
Output:
- List of refactorings performed with before/after samples
- Duplication report with extraction recommendations
- Domain-specific utils file suggestions
- Remaining opportunities for future work
Philosophy: "Make it better, not perfect - with reusability from day one."
Extract genuinely novel insights from large documentation sets
Process 1000+ documentation files efficiently using subagent architecture. Filters out "training data synthesis" to surface only counter-intuitive patterns and architectural insights you wouldn't discover otherwise.
# Learn from Go documentation
/learn docs/languages/go
# Focus on specific topic
/learn vendor/package/src --focus="concurrency patterns"
# Custom output location
/learn docs/frameworks/svelte --output=~/learnings/svelte.md
What it does:
- Discovers all documentation files recursively
- Batches files (10-15 per subagent) for context efficiency
- Extracts insights using 4-tier novelty classification:
- Tier 4 (Counter-intuitive): Contradicts common assumptions
- Tier 3 (Architectural): Design philosophy and trade-offs
- Tier 2 (Implementation): Technology-specific patterns
- Tier 1 (Training data): Excluded automatically
- Synthesizes findings into structured learning document
Output: Organized by value with code examples, anti-patterns, and immediate actions.
Key benefit: Can process 500+ files using <50k tokens (10x more efficient than direct reading).
Ruthlessly eliminate redundancy and enforce pristine workspace organization
Four-phase workflow that transforms messy codebases into maintainable, well-organized projects.
/code/dry
What it does:
Phase 1: DRY Code Optimization
- Eliminate duplicate code blocks (3+ lines, 2+ occurrences)
- Extract reusable functions and shared modules
- Remove dead code, unused imports, commented-out blocks
- Eliminate version sprawl:
*-v2
,*-final
,*-backup
files - Simplify complexity: flatten nesting, reduce conditions
- Consolidate configuration files
Phase 2: Test Coverage
- Run existing tests to verify refactoring
- Add tests for extracted functions
- Target 80% coverage for refactored modules
Phase 3: Workspace Cleanup
- Enforce language-specific directory structures (Go, JS, PHP, Python)
- Remove binary artifacts:
*.test
,*.exe
,__pycache__/
,node_modules/
- Deduplicate and organize documentation into
docs/
subdirectories - Clean temp files:
.DS_Store
,*.tmp
,*.bak
,*.log
- Rename files to kebab-case, update imports
Phase 4: Git Cleanup
- Logical, atomic commits (refactor β organize β cleanup)
- End with clean working tree:
nothing to commit
Philosophy: Edit files in-place. Use git for version history. One file per purpose. No backup sprawl.
# Clone repository
git clone https://github.com/dotcommander/claude-commands.git
# Copy to Claude Code commands directory
cp -r claude-commands/code ~/.claude/commands/
cp claude-commands/learn.md ~/.claude/commands/
cp claude-commands/ok.md ~/.claude/commands/
# Verify installation
ls ~/.claude/commands/code/
ls ~/.claude/commands/ok.md
# Universal router (recommended starting point)
curl -o ~/.claude/commands/ok.md \
https://raw.githubusercontent.com/dotcommander/claude-commands/main/ok.md
# Code commands
curl -o ~/.claude/commands/code/repomix.md \
https://raw.githubusercontent.com/dotcommander/claude-commands/main/code/repomix.md
curl -o ~/.claude/commands/code/debug.md \
https://raw.githubusercontent.com/dotcommander/claude-commands/main/code/debug.md
curl -o ~/.claude/commands/code/refactor.md \
https://raw.githubusercontent.com/dotcommander/claude-commands/main/code/refactor.md
curl -o ~/.claude/commands/code/dry.md \
https://raw.githubusercontent.com/dotcommander/claude-commands/main/code/dry.md
# Learning command
curl -o ~/.claude/commands/learn.md \
https://raw.githubusercontent.com/dotcommander/claude-commands/main/learn.md
# Let /ok analyze your context and route automatically
/ok
# It detects your situation and picks the right command:
# - Errors? Routes to /code/debug
# - Code smells? Routes to /code/refactor
# - Duplicates? Routes to /code/dry
# - Documentation? Routes to /learn
# - Complex project? Routes to workflow commands
# 1. Start systematic debugging
/code/debug "Tests failing after dependency update"
# 2. TAPE phases execute automatically:
# - THINK: Understand system architecture
# - ANALYZE: Gather error symptoms and evidence
# - PLAN: Test hypotheses systematically
# - EXECUTE: Implement proven fix
# 3. Validation runs automatically (no regressions)
# 4. Review debugging session report
# 1. Auto-detect project and refactor
/code/refactor
# 2. Focus on specific improvements
/code/refactor performance
/code/refactor logging
# 3. Clean up workspace after refactoring
/code/dry
# 4. Validate with tests
npm test # or go test, phpunit, pytest
# 1. Audit codebase
/code/repomix
# 2. Review AUDIT.md and implement Phase 1 critical fixes
/code/debug # for any issues found
# 3. Refactor based on audit findings
/code/refactor
# 4. Clean up workspace
/code/dry
# 5. Re-audit to verify improvements
/code/repomix
# 1. Extract insights from new framework documentation
/learn vendor/framework/docs --focus="performance optimization"
# 2. Review learnings-{timestamp}.md for actionable patterns
# 3. Apply Tier 4 (counter-intuitive) insights immediately
# 4. Validate with tests/benchmarks
# 1. Let /ok analyze and route
/ok
# 2. Debug any issues first (TAPE methodology)
/code/debug
# 3. Refactor for quality
/code/refactor
# 4. DRY optimization
/code/dry
# 5. Production audit
/code/repomix
# 6. Implement remaining high-priority fixes
/code/refactor
# 7. Final cleanup
/code/dry
We welcome contributions! Here's how:
- Fork this repository
- Create a branch for your command:
git checkout -b add-new-command
- Follow the pattern: Study existing commands for structure
- Test thoroughly: Ensure your command works in real scenarios
- Document clearly: Include purpose, usage, examples, requirements
- Submit PR: Describe what your command does and why it's useful
- Use frontmatter for metadata (
description
,argument-hint
, etc.) - Include clear usage examples
- Document requirements and dependencies
- Explain the "why" not just the "what"
- Provide success criteria and output examples
- Consider error handling and edge cases
MIT License - See LICENSE for details.
Built for the Claude Code community.
Special thanks to:
- repomix for repository analysis
- Google Gemini for AI-powered insights
- The Claude Code team for building an amazing tool
Questions or Issues? Open an issue on GitHub.