Context Forge now generates a comprehensive set of slash commands for Claude Code, enabling powerful AI-assisted development workflows. These commands are stored in .claude/commands/ and provide structured, repeatable patterns for common development tasks.
Each slash command is a markdown file in .claude/commands/ with this format:
name: command-name
description: Brief description of the command
category: PRPs|context|implementation|testing|documentation|custom
---
# Command Title: $ARGUMENTS
[Detailed instructions for Claude]In Claude Code, invoke commands by typing:
/command-name your arguments here
The $ARGUMENTS placeholder is replaced with everything after the command name.
Generate comprehensive PRPs with deep research and context gathering.
Usage: /prp-create user authentication system
Process:
- Analyzes codebase for patterns
- Researches external documentation
- Identifies gotchas and best practices
- Generates context-rich PRP with validation gates
Execute a PRP with built-in validation loops.
Usage: /prp-execute authentication-prp
Features:
- Reads PRP from
PRPs/directory - Implements step-by-step
- Runs validation after each step
- Auto-fixes issues
- Confirms all tests pass
Create multiple interdependent PRPs simultaneously.
Usage: /parallel-prp-create auth, user-management, permissions
Benefits:
- Considers feature interactions
- Shared context across PRPs
- Consistent architecture
Check PRP completeness and quality.
Usage: /prp-validate authentication-prp
Checks:
- Required sections present
- Validation gates defined
- Context sufficiency
- Task clarity
Add critical documentation to ai_docs for future reference.
Usage: /prp-add-docs https://docs.example.com/auth-guide
NEW: Smart project detection and architect mode
Load essential project knowledge and automatically switch to appropriate mode.
Usage: /prime-context
Smart Features:
- Project State Detection: Automatically identifies new vs existing projects
- Mode Switching: Different behavior based on project type
- Architect Mode: For new projects, Claude becomes Lead Software Architect
- Analysis Mode: For existing projects, provides comprehensive codebase analysis
New Project Mode:
- 🏗️ Architect Mode Activated: Claude takes charge as Lead Software Architect
- 📋 TodoWrite Integration: Creates concrete development tasks
- 🚀 Immediate Implementation: Starts building instead of just analyzing
- 🚫 Clean Commits: Enforces proper commit message format
Existing Project Mode:
- 🔍 Comprehensive Analysis: Deep dive into codebase structure
- 📊 Strategic Recommendations: Actionable improvement suggestions
- 🎯 Context Loading: Project structure, patterns, and conventions
Deep dive into specific codebase areas.
Usage: /analyze-codebase authentication flow
Analysis includes:
- File relationships
- Data flow
- Dependencies
- Patterns used
Update context with recent changes.
Usage: /context-refresh
Updates:
- Modified files
- New dependencies
- Configuration changes
Document and explain system architecture.
Usage: /explain-architecture API layer
Implement features with tests and validation.
Usage: /implement-feature dark mode toggle
Process:
- Research similar features
- Plan implementation
- Write code with tests
- Run validation gates
- Ensure quality
Diagnose and fix bugs with regression tests.
Usage: /fix-bug login fails with special characters
Workflow:
- Reproduce issue
- Identify root cause
- Implement fix
- Add regression tests
- Verify fix
Safe refactoring with test coverage.
Usage: /refactor-code user service to use dependency injection
Safety measures:
- Maintains test coverage
- Incremental changes
- Validation after each step
Optimize code with benchmarking.
Usage: /performance-optimize database queries in user service
Includes:
- Performance profiling
- Optimization strategies
- Before/after benchmarks
- Regression testing
Generate comprehensive test suites.
Usage: /test-create user authentication module
Coverage:
- Unit tests
- Integration tests
- Edge cases
- Error scenarios
Analyze and improve test coverage.
Usage: /test-coverage
Actions:
- Identify untested code
- Generate missing tests
- Improve test quality
Create end-to-end integration tests.
Usage: /test-integration user registration flow
Generate API documentation.
Usage: /doc-api user endpoints
Generates:
- Endpoint descriptions
- Request/response examples
- Error codes
- Authentication requirements
Create architecture documentation.
Usage: /doc-architecture
Includes:
- System overview
- Component diagrams
- Data flow
- Design decisions
Generate user-facing documentation.
Usage: /doc-user-guide authentication features
Generate deployment checklist.
Usage: /deploy-checklist production
Covers:
- Pre-deployment tests
- Configuration validation
- Migration steps
- Rollback procedures
Set up environment configurations.
Usage: /env-setup staging
Analyze issues with debugging strategies.
Usage: /debug-analyze memory leak in background jobs
Analyze logs for patterns and issues.
Usage: /log-analysis last 24 hours
Perform AI code review.
Usage: /review-code src/services/auth.ts
Reviews:
- Code quality
- Best practices
- Security issues
- Performance concerns
Security-focused code analysis.
Usage: /security-scan authentication module
Generate module boilerplate.
Usage: /scaffold-module payment-processing
Create API endpoint structure.
Usage: /scaffold-api /api/v2/orders CRUD
- Create a new file in
.claude/commands/custom/:
name: my-project-command
description: Project-specific workflow
category: custom
---
# My Custom Command: $ARGUMENTS
## Purpose
[What this command does]
## Steps
1. [Step 1 with specific project conventions]
2. [Step 2 with validation]
3. [Step 3 with output]
## Validation
- [ ] Tests pass
- [ ] Linting clean
- [ ] Project-specific checks- Use in Claude Code:
/my-project-command parameters
- Be Specific: Include exact file paths, patterns, and conventions
- Add Validation: Always include verification steps
- Reference Examples: Point to existing code patterns
- Include Context: Add links to relevant documentation
- Error Handling: Specify what to do when things go wrong
Commands can reference other commands for complex workflows:
/prime-context
/analyze-codebase authentication
/prp-create OAuth2 integration
/prp-execute oauth2-integration
Commands support multiple parameters:
/implement-feature "user profiles" --priority=high --tests=comprehensive
Commands can include conditional logic:
## If using TypeScript
- Add type definitions
- Run type checking
## If using JavaScript
- Add JSDoc comments
- Run lintingSlash commands work seamlessly with the PRP runner:
- Create PRP:
/prp-create feature-name - Review generated PRP
- Execute:
context-forge run-prp feature-name
Or directly in Claude Code:
/prp-execute feature-name
- Ensure
.claude/commands/exists - Check command name spelling
- Verify file has correct frontmatter
- Ensure using
$ARGUMENTS(all caps) - Check for typos in placeholder
- Review command instructions
- Check for project-specific requirements
- Ensure all dependencies available
# 1. Load context
/prime-context
# 2. Create comprehensive PRP
/prp-create user notification system with email and SMS
# 3. Review and execute
/prp-execute user-notification-system
# 4. Generate tests
/test-create notification service
# 5. Document
/doc-api notification endpoints# 1. Analyze the issue
/debug-analyze users report login timeout
# 2. Fix with tests
/fix-bug login timeout after 30 seconds
# 3. Verify
/test-integration login flow# 1. Analyze current performance
/performance-analyze API response times
# 2. Optimize
/performance-optimize database queries
# 3. Verify improvements
/benchmark-compare before afterSlash commands transform Claude Code into a powerful development orchestrator, providing:
- Consistency: Repeatable workflows
- Quality: Built-in validation
- Efficiency: Complex tasks in one command
- Customization: Project-specific workflows
- Knowledge: Embedded best practices
Use them to accelerate development while maintaining high code quality!