Skip to content

Custom Commands Reference

AI Velocity Exclusive - Claude Code

Custom commands are exclusive to AI Velocity tier.

6 pre-built slash commands for common development workflows.

Using Commands

Type / in Claude Code to see all available commands, then use:

Text Only
/command-name arguments

/new-api-endpoint

Generate complete FastAPI endpoint following clean architecture.

Usage:

Text Only
/new-api-endpoint GET /api/users/{id}/stats returns user statistics

What it does: 1. Creates Pydantic schemas (app/schemas/) 2. Implements service logic (app/services/) 3. Creates controller endpoint (app/controllers/) 4. Registers router in main.py (if new) 5. Generates frontend client (task frontend:generate-client) 6. Creates React Query hook (frontend/src/hooks/api/) 7. Writes tests

Example:

Text Only
/new-api-endpoint GET /api/articles/{id}/analytics returns view count and engagement metrics

View command file: .claude/commands/new-api-endpoint.md


/new-component

Create React component with Material-UI and proper patterns.

Usage:

Text Only
/new-component UserProfileCard displays user info with avatar and stats

What it does: 1. Determines location (pages/ or components/) 2. Creates component file with TypeScript interface 3. Uses unified components from @/components/ui 4. Adds proper error handling 5. Includes responsive design 6. Creates test file (optional)

Example:

Text Only
/new-component ArticleStatsCard shows article metrics with charts

View command file: .claude/commands/new-component.md


/add-payment-feature

Extend Stripe integration with new payment feature.

Usage:

Text Only
/add-payment-feature lifetime deal one-time purchase option

What it does: 1. Creates Stripe product & price (or guides you) 2. Adds price ID to config 3. Updates payment manager 4. Handles webhook events 5. Updates controller 6. Generates frontend client 7. Creates React hook 8. Tests payment flow

Example:

Text Only
/add-payment-feature annual subscription discount 20% off

View command file: .claude/commands/add-payment-feature.md


/create-migration

Generate Alembic database migration.

Usage:

Text Only
/create-migration add email_verified column to users table

What it does: 1. Updates model in app/models.py 2. Creates migration: task db:migrate-create 3. Reviews generated migration 4. Adds data migrations if needed 5. Applies migration: task db:migrate-up 6. Tests migration

Example:

Text Only
/create-migration add avatar_url to user profile

View command file: .claude/commands/create-migration.md


/run-tests

Execute test suite with proper configuration.

Usage:

Text Only
/run-tests
/run-tests tests/unit/test_auth.py

What it does: - Runs backend tests (poetry run pytest) - Runs frontend tests (cd frontend && npm run test) - Shows coverage reports - Identifies failures

Options:

Text Only
1
2
3
4
/run-tests                    # All tests
/run-tests backend           # Backend only
/run-tests frontend          # Frontend only
/run-tests path/to/test.py  # Specific test

View command file: .claude/commands/run-tests.md


/fix-lint

Auto-fix linting errors in backend and frontend.

Usage:

Text Only
/fix-lint
/fix-lint frontend

What it does: 1. Checks current issues (ruff, eslint) 2. Auto-fixes what's possible 3. Shows remaining issues 4. Provides manual fix suggestions

Example workflow:

Text Only
1
2
3
4
/fix-lint
# Reviews auto-fixes
# Manually fixes remaining issues
# Runs tests to verify

View command file: .claude/commands/fix-lint.md


Creating Custom Commands

Add your own commands in .claude/commands/:

Markdown
1
2
3
4
5
6
7
8
9
# my-command.md
My custom workflow description.

**Arguments**: $ARGUMENTS - Description

## Steps:
1. First step
2. Second step
...

Access with /my-command

Command Best Practices

  • Be specific with arguments
  • Let Claude decide implementation details
  • Review generated code before accepting
  • Run tests after code changes
  • Use /clear between unrelated tasks

Files Location

All command files in: .claude/commands/

Edit them to customize workflows!