Master the complete Claude Code command ecosystem through strategic integration patterns that create seamless, automated development workflows.
Claude Code commands are designed as interconnected specialists that work together to create a complete development experience. Rather than isolated tools, they form an intelligent workflow orchestration system.
Specialist Coordination: Each command serves as a domain expert that can invoke other specialists when needed, creating a multi-agent development team.
Context Preservation: Information flows seamlessly between commands, maintaining project context and reducing cognitive overhead.
Workflow Automation: Commands automatically determine the next logical step, removing decision fatigue from development workflows.
flowchart LR
subgraph P["🎯 Planning"]
PRD["@prd.md"]
ASK["@ask.md"]
end
subgraph O["📊 Orchestration"]
STATE["@state_tracker.md"]
end
subgraph D["⚙️ Development"]
CODE["@code.md"]
DEBUG["@debug.md"]
REFACTOR["@refactor.md"]
OPTIMIZE["@optimize.md"]
end
subgraph Q["✅ Quality"]
TEST["@test.md"]
REVIEW["@review.md"]
DEPLOY["@deploy-check.md"]
end
%% Main Flow
PRD --> STATE
STATE --> CODE
CODE --> TEST
TEST --> REVIEW
REVIEW --> DEPLOY
%% Problem Resolution
CODE --> DEBUG
DEBUG --> ASK
ASK --> CODE
%% Code Improvement
REVIEW --> REFACTOR
REFACTOR --> CODE
%% Performance Loop
DEPLOY --> OPTIMIZE
OPTIMIZE --> CODE
%% State Updates
CODE -.-> STATE
REVIEW -.-> STATE
classDef planning fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef orchestration fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px
classDef development fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
classDef quality fill:#fff3e0,stroke:#f57c00,stroke-width:2px
class PRD,ASK planning
class STATE orchestration
class CODE,DEBUG,REFACTOR,OPTIMIZE development
class TEST,REVIEW,DEPLOY quality
- @prd.md - Comprehensive product requirements with market analysis
- @ask.md - Senior architect consultation for technical decisions
- @goals.md - Detailed task breakdown and milestone tracking
- @state_tracker.md - Central workflow coordinator with automated tool integration
- Manages phase transitions and automatically invokes other commands
- @code.md - Feature development with multi-agent coordination
- @debug.md - Systematic issue resolution and root cause analysis
- @refactor.md - Strategic code improvement and modernization
- @optimize.md - Performance enhancement with measurement
- @test.md - Comprehensive testing strategy and coverage
- @review.md - Multi-dimensional code quality assessment
- @deploy-check.md - Production readiness validation
# 1. Strategic Planning
@prd.md "Advanced Task Management Platform"
@ask.md "What's the best architecture for a scalable task management system?"
# 2. Development Setup
@state_tracker.md create
@goals.md "Break down development into detailed tasks"
# 3. Phase-Based Development
@state_tracker.md start 1 # Invokes @code.md automatically
@state_tracker.md continue # Resumes or gets guidance via @ask.md
# 4. Quality Assurance
@state_tracker.md state 1 completed
@state_tracker.md review 1 # Invokes @review.md automatically
@test.md "Phase 1 components"
# 5. Issue Resolution (if needed)
@debug.md "Authentication system issues"
@refactor.md "Improve authentication code structure"
# 6. Performance Optimization
@optimize.md "Database query performance"
# 7. Deployment Preparation
@deploy-check.md
@state_tracker.md state 1 deployed# Development Loop
@state_tracker.md start 2 # Begin next phase
@code.md "User dashboard implementation" # Core development
# Encounter Issue
@debug.md "Dashboard rendering problems" # Issue resolution
@ask.md "Best practices for React state management" # Get guidance
# Continue Development
@state_tracker.md continue # Resume with insights
@refactor.md "Apply state management improvements" # Apply learnings
# Quality Gates
@test.md "Dashboard components and interactions" # Testing
@review.md "Dashboard implementation" # Code review
@optimize.md "Dashboard load performance" # Performance
# Deploy
@deploy-check.md
@state_tracker.md state 2 deployed# Issue Discovery
@debug.md "API response times are too slow"
# Get Expert Guidance
@ask.md "How to optimize API performance in Node.js applications?"
# Apply Solutions
@optimize.md "API endpoint performance based on recommendations"
@refactor.md "Restructure API code for better performance"
# Validate Improvements
@test.md "API performance and load testing"
@review.md "Optimized API implementation"
# Update Project State
@state_tracker.md state 3 completedThe @state_tracker.md command serves as the central workflow orchestrator. Here's how it automatically coordinates with other commands:
flowchart TD
START["@state_tracker.md start 1"] --> CODE1["🔄 Invokes @code.md"]
CONTINUE["@state_tracker.md continue"] --> DECISION{Current Status?}
DECISION -->|Blocked| ASK1["🔄 Invokes @ask.md"]
DECISION -->|In Progress| CODE2["🔄 Invokes @code.md"]
REVIEW["@state_tracker.md review 1"] --> REV["🔄 Invokes @review.md"]
CODE1 --> UPDATE1["✅ Updates Phase State"]
ASK1 --> GUIDANCE["💡 Provides Guidance"]
CODE2 --> PROGRESS["📈 Continues Development"]
REV --> RESULTS{"Review Results?"}
RESULTS -->|Pass| COMPLETE["✅ Mark Completed"]
RESULTS -->|Issues| BLOCKED["⚠️ Mark Blocked"]
classDef action fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef invoke fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
classDef result fill:#fff3e0,stroke:#f57c00,stroke-width:2px
class START,CONTINUE,REVIEW action
class CODE1,ASK1,CODE2,REV invoke
class UPDATE1,COMPLETE,BLOCKED result
The @state_tracker.md command serves as the central orchestrator, automatically invoking other commands based on context:
@state_tracker.md start 1Automatic Flow:
- Reads phase description from state tracker
- Invokes
@code.md "Phase 1 description" - Updates phase state to 🔄 In Progress
- Tracks progress with timestamps
@state_tracker.md continueSmart Tool Selection:
- If blocked: Invokes
@ask.mdfor architectural guidance - If progressing: Invokes
@code.mdfor continued implementation - If debugging needed: Suggests
@debug.mdusage - If optimization needed: Suggests
@optimize.mdusage
@state_tracker.md review 1Quality Assurance Flow:
- Marks phase as 🔍 Under Review
- Invokes
@review.md "Phase 1 scope and implementation" - Integrates review findings into phase documentation
- Sets final state based on results (✅ or
⚠️ )
The @code.md command coordinates with multiple specialists:
When complex architectural decisions arise, @code.md can internally reference patterns from @ask.md consultations.
If implementation encounters issues, the workflow naturally progresses to @debug.md for systematic resolution.
Implementation completion triggers quality validation through @review.md.
The @review.md command coordinates quality assurance:
Code quality issues trigger strategic refactoring recommendations.
Performance bottlenecks identified in review lead to optimization workflows.
Security vulnerabilities require systematic debugging and remediation.
# Smart conditional workflow
@state_tracker.md continue # May invoke different commands based on state
# If phase is blocked → @ask.md for guidance
# If phase has bugs → @debug.md for resolution
# If phase is slow → @optimize.md for performance
# If phase is messy → @refactor.md for cleanup
# If phase is untested → @test.md for coverage# Context flows between commands
@prd.md "E-commerce Platform" # Establishes project context
@state_tracker.md create # Uses PRD context for phases
@state_tracker.md start 1 # Passes phase context to @code.md
@code.md # Receives "Phase 1: Architecture" context
@review.md # Receives implementation context# Quality feedback drives continuous improvement
@code.md "Payment processing system" # Initial implementation
@review.md "Payment processing" # Identifies security issues
@debug.md "Payment security vulnerabilities" # Addresses specific issues
@refactor.md "Secure payment architecture" # Improves overall structure
@test.md "Payment security and functionality" # Validates improvements
@state_tracker.md state 2 completed # Updates project progress- Commands automatically determine next logical steps
- Context flows seamlessly without manual intervention
- Decision fatigue eliminated through intelligent orchestration
- No context switching between planning and implementation
- Automated quality gates prevent technical debt accumulation
- Continuous feedback loops drive rapid improvement
- Built-in review processes at every phase boundary
- Systematic issue resolution before problems compound
- Performance optimization integrated into development flow
- Shared workflow patterns across team members
- Consistent quality standards through automated processes
- Clear visibility into project progress and technical decisions
- Systematic approach reduces project risks
- Quality gates ensure deliverable standards
- Progress tracking enables accurate timeline management
Always begin with @prd.md to establish clear project context that informs all subsequent commands.
Let @state_tracker.md manage workflow progression rather than manually choosing commands.
Allow commands to invoke related commands automatically rather than micromanaging the process.
Ensure project information flows naturally between commands without duplication or conflicts.
Don't bypass review and testing phases - they prevent technical debt and improve long-term velocity.
Create team-specific integration patterns that reflect your project's unique requirements and constraints.
Don't manually re-explain project context to each command. Let context flow naturally through the integration system.
Don't bypass @review.md or @test.md to save time. Quality issues compound and slow down future development.
Don't use commands in isolation. Leverage their integration capabilities for maximum effectiveness.
Don't ignore @state_tracker.md help recommendations. The orchestrator understands project context better than manual assessment.
This integrated command ecosystem transforms individual development tools into a cohesive, intelligent development team that guides projects from conception to deployment with minimal manual intervention and maximum quality assurance.