Claude Code Commands
How Claude Code commands and Prompt Recipes work together with KitRocket.
How commands work
Claude Code uses "slash commands" — project-specific commands that load context and instructions from files. In KitRocket, the Prompt Recipes in /prompts/ serve this purpose.
When you reference a recipe, Claude reads the instructions and executes the task with full knowledge of your project.
Core commands
/project:implement
Build a complete feature from scratch.
claude "Read prompts/implement.md. Add a notification system with in-app and email notifications."
What Claude does:
- Plans the feature (schema, API, UI)
- Creates database tables
- Builds API endpoints
- Creates UI components
- Wires everything together
/project:review
Code review with actionable feedback.
claude "Read prompts/review.md. Review the last 3 commits."
What Claude does:
- Reads the changed files
- Checks for bugs, security issues, performance problems
- Verifies adherence to project conventions
- Provides prioritized feedback with fix suggestions
/project:fix-bug
Debug and fix an issue.
claude "Read prompts/fix-bug.md. The checkout page throws a 500 error when the user has no subscription."
What Claude does:
- Traces the error through the code
- Identifies the root cause
- Applies the fix
- Suggests a test to prevent regression
/project:add-api
Create a new API endpoint.
claude "Read prompts/add-api.md. Add GET /api/teams to list the current user's teams."
What Claude does:
- Creates the route handler
- Adds input validation with zod
- Implements auth checks
- Adds proper error responses
- Creates TypeScript types
/project:add-page
Add a new page to the app.
claude "Read prompts/add-page.md. Add a /dashboard/reports page with a table of recent activity."
What Claude does:
- Creates the page component
- Adds metadata (title, description)
- Implements data fetching
- Updates sidebar navigation
/project:add-component
Create a reusable UI component.
claude "Read prompts/add-component.md. Create a DataTable component with sorting and pagination."
What Claude does:
- Creates the component with TypeScript props
- Builds on shadcn/ui primitives
- Adds proper accessibility attributes
- Makes it reusable across pages
/project:refactor
Improve existing code without changing behavior.
claude "Read prompts/refactor.md. The webhook handler at src/lib/payments/webhook.ts is too long. Break it up."
/project:test
Write tests for existing code.
claude "Read prompts/test.md. Write tests for the auth middleware."
/project:deploy
Pre-deployment checklist.
claude "Read prompts/deploy.md. I'm deploying to production for the first time."
/project:security
Security audit.
claude "Read prompts/security.md. Audit all API routes."
/project:performance
Performance optimization.
claude "Read prompts/performance.md. The dashboard takes 4 seconds to load."
/project:document
Generate documentation.
claude "Read prompts/document.md. Document the payments module."
How CLAUDE.md provides context
Every command benefits from CLAUDE.md. When Claude reads a prompt recipe, it also has access to:
- Tech stack — knows to use Drizzle ORM, not Prisma
- File structure — knows where to put new files
- Conventions — follows your coding style automatically
- Database schema — understands existing tables and relationships
- API patterns — matches existing route handler patterns
This is why the same prompt recipe produces different (correct) results for every project — it adapts to your specific setup.
Chaining commands
The most effective workflow chains multiple commands:
# 1. Implement
claude "Read prompts/implement.md. Add user teams with roles."
# 2. Review
claude "Read prompts/review.md. Review the teams implementation."
# 3. Test
claude "Read prompts/test.md. Write tests for the teams feature."
# 4. Security check
claude "Read prompts/security.md. Check the teams feature for security issues."
Creating custom commands
Add your own recipes to /prompts/:
# Task: Add a webhook handler
## Context
Read CLAUDE.md for project context. Look at the existing webhook handler
in src/app/api/webhook/dodo/route.ts for the pattern to follow.
## Instructions
1. Create a new webhook route
2. Verify the signature
3. Parse the event
4. Handle each event type
5. Return 200 on success
Then use it:
claude "Read prompts/add-webhook.md. Add a webhook handler for Stripe events."