Framework Commands
The claude-setup framework provides powerful commands that orchestrate complex development workflows. Each command encapsulates best practices and automates repetitive tasks.
Core Commands
/project:develop
Initializes a complete development environment with structured workflow management.
Syntax
/project:develop <project-name> [options]
Options
--with-tests
- Include comprehensive test setup--with-ci
- Add CI/CD pipeline configuration--with-docker
- Include Docker configuration--with-reflection
- Enable think-tool integration
Example
You: /project:develop user-dashboard --with-tests --with-ci
Claude: Initializing user-dashboard development environment...
✓ Created project directory: projects/user-dashboard/
✓ Generated CLAUDE.md with structured workflow
✓ Initialized Git repository
✓ Created initial project structure
✓ Set up test framework (Jest + Testing Library)
✓ Configured CI pipeline (.github/workflows/ci.yml)
PHASE 1: ANALYSIS [ACTIVE]
□ Analyze requirements
□ Define component architecture
□ Plan state management
□ Design API contracts
Ready to begin analysis phase. Shall I proceed?
What It Creates
-
Project Structure
projects/user-dashboard/
├── CLAUDE.md # Working memory
├── src/ # Source code
├── tests/ # Test suites
├── docs/ # Documentation
├── .github/ # GitHub workflows
└── planning/ # Architecture decisions -
Working Memory (CLAUDE.md)
- Project phases
- TODO tracking
- Progress dashboard
- Validation gates
- Blocker management
/project:analyze
Deep-dive analysis of existing codebases with actionable insights.
Syntax
/project:analyze [path] [focus-area]
Focus Areas
architecture
- Overall structure and patternsperformance
- Bottlenecks and optimizationsecurity
- Vulnerability assessmentquality
- Code quality metricsdependencies
- Package analysis
Example
You: /project:analyze . architecture
Claude: Analyzing codebase architecture...
CODEBASE METRICS
├── Total Files: 284
├── Lines of Code: 45,821
├── Test Coverage: 67%
└── Complexity Score: Medium-High
ARCHITECTURE ANALYSIS
1. Pattern: Modified MVC
- Controllers: 32 files
- Models: 28 files
- Views: 45 components
- Services: 18 files
2. Issues Detected:
- Circular dependencies: 3 instances
- God objects: UserController (1,200 LOC)
- Missing abstractions in data layer
3. Strengths:
- Consistent naming conventions
- Good separation of concerns
- Comprehensive error handling
RECOMMENDATIONS
Priority 1: Refactor UserController
Priority 2: Implement repository pattern
Priority 3: Extract shared business logic
Full report saved to: analysis/architecture-report.md
/project:refactor
Systematic refactoring with safety checks and rollback capabilities.
Syntax
/project:refactor <scope> <pattern>
Supported Patterns
extract-service
- Extract business logic to servicesrepository
- Implement repository patternstrategy
- Apply strategy patternfactory
- Implement factory patternclean-arch
- Move to clean architecture
Example
You: /project:refactor auth repository
Claude: Planning authentication refactoring...
REFACTORING PLAN: Repository Pattern
1. PREPARATION
✓ Analyzed 12 auth-related files
✓ Created backup branch: refactor/auth-repository
✓ Generated 24 tests for current behavior
2. IMPLEMENTATION STEPS
□ Create AuthRepository interface
□ Implement PrismaAuthRepository
□ Create MockAuthRepository for tests
□ Migrate controllers to use repository
□ Update dependency injection
3. SAFETY MEASURES
- All tests passing before changes
- Incremental migration approach
- Feature flags for rollback
Shall I proceed with Step 1?
/project:document
Generates comprehensive documentation from code analysis.
Syntax
/project:document [type] [options]
Documentation Types
api
- API reference documentationarchitecture
- Architecture decision recordsuser
- User guides and tutorialsdeveloper
- Developer documentationall
- Complete documentation suite
Example
You: /project:document api --format openapi
Claude: Generating API documentation...
✓ Analyzed 23 API endpoints
✓ Extracted request/response schemas
✓ Documented authentication flows
✓ Generated example requests
Created:
- docs/api/openapi.yaml
- docs/api/README.md
- docs/api/examples/
- docs/api/postman-collection.json
SUMMARY
Total Endpoints: 23
- Public: 8
- Authenticated: 15
- Admin: 5
Coverage: 100%
Missing Descriptions: 2
View at: http://localhost:3000/api-docs
/project:deploy
Manages deployment workflows with safety checks.
Syntax
/project:deploy <environment> [options]
Environments
development
- Local developmentstaging
- Staging environmentproduction
- Production deploymentpreview
- PR preview environments
Example
You: /project:deploy staging --with-checks
Claude: Preparing staging deployment...
PRE-DEPLOYMENT CHECKS
✓ All tests passing (248/248)
✓ Build successful
✓ No security vulnerabilities
✓ Database migrations ready
✓ Environment variables set
DEPLOYMENT PLAN
1. Build Docker image
2. Push to registry
3. Run database migrations
4. Deploy to ECS
5. Run health checks
6. Update Route53
ROLLBACK READY
- Previous version: v1.2.3
- Rollback command prepared
- Database backup created
Proceed with deployment? [y/N]
Utility Commands
/project:validate
Validates current project state against best practices.
You: /project:validate
Claude: Running project validation...
✓ Code Quality
- ESLint: 0 errors, 3 warnings
- TypeScript: No errors
- Test Coverage: 89%
⚠ Security
- 2 medium vulnerabilities in dependencies
- Run: npm audit fix
✓ Performance
- Bundle size: 245KB (gzipped)
- Lighthouse score: 94
✓ Documentation
- README: Complete
- API docs: 95% coverage
/project:optimize
Optimizes various aspects of the project.
You: /project:optimize performance
Claude: Analyzing performance optimization opportunities...
RECOMMENDATIONS
1. Image Optimization
- 15 images can be compressed (save 2.3MB)
- Consider WebP format
2. Bundle Splitting
- Vendor bundle: 180KB
- Suggest 3 split points
3. Database Queries
- 3 N+1 queries detected
- 2 missing indexes
Shall I implement these optimizations?
/project:backup
Creates comprehensive project backups.
You: /project:backup --include-env
Claude: Creating project backup...
✓ Code repository backed up
✓ Database exported (schema + data)
✓ Environment variables encrypted
✓ Documentation included
✓ CI/CD configs saved
Backup created: backups/project-2024-01-15-1430.tar.gz
Size: 45.2MB (compressed)
Encryption: AES-256
Command Composition
Commands can be chained for complex workflows:
You: /project:analyze && /project:refactor clean-arch && /project:deploy staging
Claude: Executing command pipeline...
1. ANALYSIS COMPLETE
- Identified refactoring targets
2. REFACTORING IN PROGRESS
- Applying clean architecture
- 15/23 modules migrated
3. DEPLOYMENT QUEUED
- Will deploy after refactoring
- Estimated time: 45 minutes
Custom Commands
Extend the framework with custom commands:
// commands/custom-migrate.ts
export const customMigrate = {
name: 'project:migrate',
description: 'Migrate legacy code',
execute: async (args) => {
// Implementation
}
};
Best Practices
1. Start with Analysis
Always run /project:analyze
before major changes:
/project:analyze . quality
/project:refactor based on analysis
2. Use Validation Gates
Validate before critical operations:
/project:validate
/project:deploy production
3. Leverage Options
Commands have powerful options:
/project:develop my-app --with-tests --with-ci --with-docker
4. Monitor Progress
Check working memory regularly:
Read CLAUDE.md and show current progress
Next Steps
- Understand Working Memory system
- Explore Specialized Agents
- Return to Framework Overview