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-nameCommands 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.
| Input | Feature name as argument |
| Output | specs/{feature-name}/idea.md |
| Mode | Interactive — asks questions one at a time |
/refine-idea bulk-import/create-prd {feature-name}
Generates a comprehensive Product Requirements Document from the idea file.
| Input | Reads specs/{feature-name}/idea.md |
| Output | specs/{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.
| Input | Reads specs/{feature-name}/prd.md |
| Output | specs/{feature-name}/plan.md |
/create-plan bulk-importPull 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.
| Input | Current branch diff (automatic) |
| Output | GitHub PR created via gh pr create |
/open-prThe 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.
| Input | PR number or GitHub PR URL |
| Output | review-analysis.md at repo root |
| Mode | Analysis only — does NOT implement any fixes |
/pr-review-analysis 2159Each comment receives a verdict:
| Verdict | Meaning | Action |
|---|---|---|
| VALID | Feedback is correct | Resolution plan included |
| PARTIALLY VALID | Has merit but suggestion is incomplete | Explains what part is valid |
| CONDITIONAL | Valid only under certain conditions | States the condition to check |
| INVALID | Wrong or conflicts with project conventions | Pre-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:
| Phase | What it does |
|---|---|
| Phase 1 | Dismisses INVALID comments — posts replies and resolves threads |
| Phase 2 | Implements VALID fixes — makes code changes, runs typecheck |
| Phase 3 | Resolves remaining threads on GitHub |
| Input | Reads review-analysis.md (or custom path as argument) |
| Output | Code changes + resolved GitHub threads |
| Mode | Interactive — asks which phases to run, shows changes for review |
/pr-review-resolveYou’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 2159Code 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-validationKey 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:
- Context gathering — reads existing test infrastructure, page objects, and fixtures
- Test scaffolding — creates tests following project conventions
- 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.
| Input | Current branch diff (automatic) |
| Output | .changeset/{random-name}.md |
/write-changesetVersion 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-changelogProject 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-importParallel 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-featureThis 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-featureSpecialized 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-docsQuick Reference
| Command | Purpose |
|---|---|
/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-pr | Create PR with comprehensive description |
/pr-review-analysis {PR} | Triage review comments → review-analysis.md |
/pr-review-resolve | Act on review analysis (dismiss, fix, resolve) |
/resolve-pr-comments {PR} | Legacy single-step review resolver |
/simplify | Review code for quality and efficiency |
/fix-output-validation | Fix Zod schema mismatches in oRPC |
/generate-e2e-test {desc} | Generate e2e tests with screenshot iteration |
/write-changeset | Generate changeset for version management |
/production-changelog | Generate user-facing changelog for email |
/create-linear-issue | Create 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-game | Add a new trading card game |
/add-notification {type} | Add a notification type |
/generate-admin-ui {desc} | Generate admin UI with shadcn/ui |
/generate-v0-prompt | Generate v0.dev prototyping prompt |
/update-marketplace-docs | Update marketplace documentation |