A collection of custom slash commands for Claude Code to streamline software development workflows.
Purpose: Initialize project context by reading key project files.
Usage: /cwp:prime
What it does:
- Runs
git ls-filesto list all tracked files in the repository - Reads essential project files:
README.md- Project overview and documentationCLAUDE.md- Claude-specific guidelines and patternspackage.json- Project dependencies and scriptsai_docs/Rules.md- AI-specific rules and conventions
Use this command at the start of a session to give Claude full context about your project structure and conventions.
Purpose: Create a well-formatted git commit with an AI-generated commit message.
Usage:
/cwp:commit- Commits currently staged changes/cwp:commit all- Stages and commits all changed files
Model: Uses Haiku for fast execution
What it does:
- Analyzes current changes in the repository
- Generates a descriptive commit message
- Creates a commit with the generated message
- If
allargument is passed, includes ALL changed files
Purpose: Execute complex feature implementation with optional parallel development using multiple coder agents.
Usage:
/cwp:implement "Add user authentication"- Sequential implementation/cwp:implement path/to/tasks.md --parallel- Parallel implementation with multiple agents
What it does:
- Analyzes the implementation requirements
- Breaks down work into tasks
- Spawns coder subagent(s) to implement features
- If
--parallelflag is provided: creates 2-5 parallel coder agents for independent tasks - Each coder must update task checkboxes and pass
bun check(or npm/yarn) - Runs quality gates and verification after completion
Quality Gates:
- All task checkboxes must be marked complete
- Build and type checking must pass with zero errors
- All tests must pass
- No
anytypes in TypeScript code - Code must follow project patterns
Purpose: Analyze requirements and recommend/document the technology stack.
Usage:
/cwp:tech-stack- Analyzes current codebase and creates tech stack docs/cwp:tech-stack path/to/requirements.md- Analyzes requirements first
What it does:
- Analyzes Requirements (if path provided):
- Reads project brief or PRD
- Identifies scalability, integration, and performance requirements
- Analyzes Existing Stack:
- Maps current technologies
- Identifies reusable components
- Flags breaking changes needed
- Recommends Stack:
- Frontend framework & libraries
- Backend framework & runtime
- Database & cache solutions
- Infrastructure & deployment
- Development tools & testing
- Documents Decisions:
- Rationale for each choice
- Trade-offs vs alternatives
- Compatibility matrix
- Migration path (if updating)
Output: Creates tech-stack.md with complete technology stack documentation
Purpose: Perform a comprehensive code review of the latest commit.
Usage: /cwp:review-code
What it does:
- Identifies the Commit: Retrieves and displays the most recent commit hash and message
- Conducts Code Review:
- Analyzes changes in the commit
- Provides three specific, actionable suggestions for improvement
- Focuses on performance, readability, maintainability, and security
- Considers Edge Cases:
- Identifies missing or unhandled edge cases
- Recommends updates to handle these scenarios
Provides thorough, professional feedback as if submitting a formal pull request review.
Purpose: Optimize prompts for better AI model performance and efficiency.
Usage: /cwp:prompt-optimizer "Your prompt here"
Model: Uses Sonnet for advanced reasoning
What it does:
- Prompt Engineering:
- Applies chain-of-thought reasoning
- Adds few-shot examples
- Implements role-based instructions
- Uses clear delimiters and formatting
- Adds output format specifications
- Context Optimization:
- Minimizes token usage
- Structures information hierarchically
- Removes redundant information
- Adds relevant context
- Uses compression techniques
- Performance Testing:
- Creates prompt variants
- Designs evaluation criteria
- Tests edge cases
- Measures consistency
- Model-Specific Optimization:
- GPT-4 best practices
- Claude optimization techniques
- Prompt chaining strategies
- Temperature/parameter tuning
- Token budget management
- RAG Integration:
- Context window management
- Retrieval query optimization
- Chunk size recommendations
- Embedding strategies
- Production Considerations:
- Prompt versioning
- A/B testing framework
- Monitoring metrics
- Fallback strategies
- Cost optimization
Output: Optimized prompts with explanations, evaluation metrics, and testing strategies.
Purpose: Comprehensive error analysis and resolution guidance.
Usage: /cwp:error-analisys "error description or path"
Model: Uses Sonnet for deep analysis
What it does:
- Error Pattern Analysis:
- Categorizes error types
- Identifies root causes
- Traces error propagation
- Analyzes error frequency
- Correlates with system events
- Debugging Strategy:
- Stack trace analysis
- Variable state inspection
- Execution flow tracing
- Memory dump analysis
- Race condition detection
- Error Handling Improvements:
- Custom exception classes
- Error boundary implementation
- Retry logic with backoff
- Circuit breaker patterns
- Graceful degradation
- Logging Enhancement:
- Structured logging setup
- Correlation ID implementation
- Log aggregation strategy
- Debug vs production logging
- Sensitive data masking
- Monitoring Integration:
- Sentry/Rollbar setup
- Error alerting rules
- Error dashboards
- Trend analysis
- Recovery Mechanisms:
- Automatic recovery procedures
- Data consistency checks
- Rollback strategies
- Prevention Strategies:
- Input validation
- Type safety improvements
- Contract testing
- Defensive programming
Output: Specific fixes, preventive measures, test cases, and long-term reliability improvements.
These commands are located in .claude/commands/cwp/ and are automatically available in Claude Code when you use the cwp: namespace.
Custom slash commands for Claude Code. Each command is a .md file with frontmatter and a prompt.
Custom agent definitions that extend Claude Code's capabilities:
- gemini-cli.md - A routing subagent that integrates Google's Gemini model for long-context reasoning and deep code analysis. It acts as a pure pass-through router, collecting file paths and passing tasks to Gemini via the
gemini-cliwrapper script.
Utility scripts for enhanced functionality:
- gemini-cli/ - TypeScript wrapper for calling Google's Gemini model from Claude subagents
gemini-cli.ts- Main CLI wrapper that formats requests for Gemini and normalizes responsesbuild.sh- Build script to compile and install the CLI tool to~/.local/bin- Usage:
echo '<payload-json>' | gemini-cli --task "<task>" --stdin - Requirements: Node.js, ts-node (or bun), and the official
geminiCLI installed and authenticated
To add new commands:
- Create a new
.mdfile in.claude/commands/cwp/ - Add frontmatter with
description,argument-hint, and optionalmodelspecification - Write the command prompt
- Update this README with documentation
To add new agents:
- Create a new
.mdfile in.claude/agents/ - Add frontmatter with
name,description,tools,model, andpermissionMode - Define the agent's behavior and constraints
- Update this README with documentation
Each command file follows this structure:
---
description: Brief description of the command
argument-hint: [optional-arg] [--flags]
model: sonnet|haiku|opus # Optional, defaults to sonnet
---
# Command prompt content hereEach agent file follows this structure:
---
name: agent-name
description: >
Brief description of what the agent does
tools: Read, Write, Bash
model: sonnet|haiku|opus
permissionMode: default|strict
---
# Agent instructions and behavior definition here