KitRocket

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:

  1. Plans the feature (schema, API, UI)
  2. Creates database tables
  3. Builds API endpoints
  4. Creates UI components
  5. Wires everything together

/project:review

Code review with actionable feedback.

claude "Read prompts/review.md. Review the last 3 commits."

What Claude does:

  1. Reads the changed files
  2. Checks for bugs, security issues, performance problems
  3. Verifies adherence to project conventions
  4. 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:

  1. Traces the error through the code
  2. Identifies the root cause
  3. Applies the fix
  4. 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:

  1. Creates the route handler
  2. Adds input validation with zod
  3. Implements auth checks
  4. Adds proper error responses
  5. 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:

  1. Creates the page component
  2. Adds metadata (title, description)
  3. Implements data fetching
  4. 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:

  1. Creates the component with TypeScript props
  2. Builds on shadcn/ui primitives
  3. Adds proper accessibility attributes
  4. 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."

Next steps

  • CLAUDE.md — customize the project context
  • Tips — get more out of Claude Code

On this page