Config Generator

Claude Code Custom Commands Generator

Create a reusable .md command file that turns repeated Claude Code prompts into a slash command.

Last updated: June 15, 2026

.claude/commands/code-review.md
---
description: Review the current diff for correctness, security, and maintainability issues
argument-hint: [target]
allowed-tools: Read, Grep, Glob, Bash(git diff *)
---

# code-review

Review the current changes. Focus on correctness bugs, regressions, missing tests, security risks, and unnecessary complexity. Return findings first, ordered by severity.

## Project Context

- Project type: Next.js
- Tech stack: Next.js, TypeScript, React, CSS modules
- Validation: npm test, npm run lint, npm run build

## Output

Summarize what you checked, what changed, and which validation commands passed or still need to run.

Use the Claude Code Custom Commands Generator to create reusable markdown commands for workflows you otherwise paste into chat. The generated file is useful for review, PRD, refactor, tests, security, changelog, and commit-message routines.

Custom Commands Versus Skills

Legacy .claude/commands markdown files still work, but Claude Code now recommends skills for richer reusable workflows. A custom command is still a quick way to publish a slash-command shortcut for a small prompt.

Official Claude Code Reference

The official slash commands and skills docs cover file locations, frontmatter, arguments, bash command execution, file references, namespacing, and the migration path from custom commands to skills.

Common Mistakes

Avoid vague prompts, broad allowed-tools rules, local-only absolute paths, commands that assume staged files when they read unstaged diff, and command names that collide with built-in commands.

FAQ

What filename becomes the slash command?

For legacy custom commands, the markdown filename without .md becomes the command name.

Can a custom command run shell commands?

Yes, but tool permissions should be narrow and team-reviewed before committing the command file.

When should I use a skill instead?

Use a skill when the workflow needs supporting files, longer instructions, automatic relevance, or easier sharing across projects.