Skip to Content
Claude Commands Reference

Claude Commands Reference

Claude Code commands automate common development tasks and enforce project conventions. They’re defined in .claude/commands/ and invoked by typing /command-name in a Claude Code session.

# Example: open a PR from the current branch /open-pr # Example: pass arguments to a command /create-plan my-feature-name

Commands are context-aware — they read your current branch, diff, and project structure automatically. You don’t need to provide extra context unless specified.

Feature Ideation & Planning

These three commands form a pipeline that takes a feature from rough concept to actionable implementation plan. Each step produces a file in specs/{feature-name}/ that feeds into the next.

/refine-idea {feature-name}

Interactive feature refinement through guided questions. Asks about the problem, target users, core functionality, scope, and constraints.

InputFeature name as argument
Outputspecs/{feature-name}/idea.md
ModeInteractive — asks questions one at a time
/refine-idea bulk-import

/create-prd {feature-name}

Generates a comprehensive Product Requirements Document from the idea file.

InputReads specs/{feature-name}/idea.md
Outputspecs/{feature-name}/prd.md
/create-prd bulk-import

/create-plan {feature-name}

Creates a technical implementation plan with an actionable checklist organized by feature area.

InputReads specs/{feature-name}/prd.md
Outputspecs/{feature-name}/plan.md
/create-plan bulk-import

Pull Request & Code Review

These commands cover the full PR lifecycle — from creation through review triage and resolution. See the Development Workflow for the complete flow.

/open-pr

Creates a pull request by analyzing the diff between the current branch and develop. Generates a comprehensive description including summary, rationale, technical implementation details, testing instructions, and impact analysis.

InputCurrent branch diff (automatic)
OutputGitHub PR created via gh pr create
/open-pr

The generated PR includes:

  • Summary and Why sections for reviewers
  • What Changed broken down by package
  • Technical Implementation details
  • Testing instructions (manual + automated)
  • Impact Analysis (user, performance, breaking changes)
  • Standard checklist (conventions, tests, docs, changeset)

/pr-review-analysis {PR-number}

Fetches all review comments (bot and human) from a PR, analyzes each against the codebase and project conventions, and produces a structured analysis file with verdicts.

InputPR number or GitHub PR URL
Outputreview-analysis.md at repo root
ModeAnalysis only — does NOT implement any fixes
/pr-review-analysis 2159

Each comment receives a verdict:

VerdictMeaningAction
VALIDFeedback is correctResolution plan included
PARTIALLY VALIDHas merit but suggestion is incompleteExplains what part is valid
CONDITIONALValid only under certain conditionsStates the condition to check
INVALIDWrong or conflicts with project conventionsPre-composed reply included

The output file includes all metadata (PR number, thread IDs, comment IDs) needed for /pr-review-resolve to act on it — even in a new conversation.

You can (and should) edit review-analysis.md before running resolve — change verdicts, tweak replies, adjust resolution plans, or remove entries entirely.

/pr-review-resolve

Acts on a previously generated review-analysis.md. Works in three phases:

PhaseWhat it does
Phase 1Dismisses INVALID comments — posts replies and resolves threads
Phase 2Implements VALID fixes — makes code changes, runs typecheck
Phase 3Resolves remaining threads on GitHub
InputReads review-analysis.md (or custom path as argument)
OutputCode changes + resolved GitHub threads
ModeInteractive — asks which phases to run, shows changes for review
/pr-review-resolve

You’ll be asked to review and confirm all code changes before committing. Phases are independent — you can run Phase 1 today and Phase 2 tomorrow in a new conversation.

/resolve-pr-comments {PR-number}

Legacy command. Prefer the two-step /pr-review-analysis + /pr-review-resolve workflow — it gives you the chance to review verdicts before acting.

Older single-step command that fetches, analyzes, and proposes fixes for unresolved review comments in one pass.

/resolve-pr-comments 2159

Code Quality & Debugging

/simplify

Reviews changed code for reuse, quality, and efficiency. Identifies opportunities to reduce duplication, improve patterns, and fix issues. This is a built-in Claude Code skill.

/simplify

/fix-output-validation

Helps diagnose and fix Zod output schema validation errors in oRPC endpoints. Paste the TypeScript error and it will identify the mismatch between what the service returns and what the schema expects.

/fix-output-validation

Key principle: the schema should match what the service returns, NOT the other way around.

/generate-e2e-test {description}

Generates end-to-end tests using a multi-phase approach:

  1. Context gathering — reads existing test infrastructure, page objects, and fixtures
  2. Test scaffolding — creates tests following project conventions
  3. Screenshot-driven iteration — runs tests with --trace on, views failure screenshots visually, and iterates until tests pass
/generate-e2e-test "user can add a card to their inventory from the catalog page"

Versioning & Release

/write-changeset

Generates a changeset file by analyzing the diff between the current branch and develop. Determines affected packages and appropriate version bumps without the interactive pnpm changeset prompt.

InputCurrent branch diff (automatic)
Output.changeset/{random-name}.md
/write-changeset

Version bump guidelines:

  • patch — Bug fixes, documentation, internal refactoring (default)
  • minor — New features, new APIs (backward-compatible)
  • major — Breaking changes (use rarely)

/production-changelog

Generates a user-facing changelog for email newsletters by analyzing the diff between current production and develop. Focuses on user-facing changes only.

/production-changelog

Project Management

/create-linear-issue {project-name} {assignee-email}

Creates a Linear issue in a specified project, prompts for issue content (title, description, acceptance criteria), and assigns it to a team member.

/create-linear-issue "Localize the Game Data" "marcin@cardnexus.com"

/create-linear-project {feature-name}

Creates a Linear project with issues derived from the feature’s implementation plan. Reads the PRD, idea, and plan files from specs/{feature-name}/.

/create-linear-project bulk-import

Parallel Development

/worktree {feature-name}

Creates a git worktree in a sibling directory for parallel Claude Code sessions. Each worktree gets its own branch and directory so you can work on multiple features simultaneously.

/worktree my-feature

This creates:

  • Branch: feature/my-feature
  • Directory: ../cardnexus-my-feature/

Then open a new terminal, cd into the worktree, and run claude to start a parallel session.

/worktree-cleanup {feature-name}

Removes a worktree and optionally deletes its branch after the feature has been merged.

/worktree-cleanup my-feature

Specialized Commands

/add-game

Step-by-step guide for adding a new trading card game to the platform. Covers data analysis, schema configuration, image handling, attribute mapping, and testing.

/add-notification {type}

Adds a new notification type using the config-driven notification system. Handles payload schema, delivery strategy, content (in-app + email), and auto-generated workflows.

/add-notification order-shipped

/generate-admin-ui {description}

Generates admin UI features using shadcn/ui components. Demos relevant components during planning, follows admin app patterns, and creates complete implementations.

/generate-admin-ui "user management dashboard"

/generate-v0-prompt

Generates a v0.dev prompt for rapid UI prototyping based on the project’s design system and component library.

/update-marketplace-docs

Analyzes changes in the current branch related to marketplace features and updates the marketplace documentation in apps/internal-doc/src/content/marketplace/ accordingly.

/update-marketplace-docs

Quick Reference

CommandPurpose
/refine-idea {name}Interactive feature ideation → idea.md
/create-prd {name}Product requirements from idea → prd.md
/create-plan {name}Technical implementation plan → plan.md
/open-prCreate PR with comprehensive description
/pr-review-analysis {PR}Triage review comments → review-analysis.md
/pr-review-resolveAct on review analysis (dismiss, fix, resolve)
/resolve-pr-comments {PR}Legacy single-step review resolver
/simplifyReview code for quality and efficiency
/fix-output-validationFix Zod schema mismatches in oRPC
/generate-e2e-test {desc}Generate e2e tests with screenshot iteration
/write-changesetGenerate changeset for version management
/production-changelogGenerate user-facing changelog for email
/create-linear-issueCreate Linear issue in a project
/create-linear-project {name}Create Linear project from plan
/worktree {name}Create git worktree for parallel development
/worktree-cleanup {name}Remove worktree after merge
/add-gameAdd a new trading card game
/add-notification {type}Add a notification type
/generate-admin-ui {desc}Generate admin UI with shadcn/ui
/generate-v0-promptGenerate v0.dev prototyping prompt
/update-marketplace-docsUpdate marketplace documentation
Last updated on