Create and structure reusable slash commands for Claude Code workflows.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "command-development" skill from askskill: 1. Download https://raw.githubusercontent.com/anthropics/claude-plugins-official/main/plugins/plugin-dev/skills/command-development/SKILL.md 2. Save it as ~/.claude/skills/command-development/SKILL.md 3. Reload skills and tell me it's ready
Help me create a /review command for Claude Code in Markdown format. It should instruct Claude to check security issues, performance problems, and maintainability, and include a YAML frontmatter example.
A usable command draft with command content structure and a frontmatter example.
Help me write a Claude Code slash command that supports dynamic arguments and file references to analyze test coverage for specified files, and explain how the arguments should be organized.
A command template with a dynamic argument design and guidance on using file references.
Design an interactive command for Claude Code that uses AskUserQuestion to ask for deployment environment and version before execution, and include best-practice recommendations.
An interactive command example showing the question flow, command structure, and authoring recommendations.
When developers repeatedly run code review, testing, or deployment tasks in Claude Code, they can turn prompts into slash commands to improve reuse and consistency.
When a team shares Claude Code workflows inside a project, this skill helps organize command locations, namespacing, and frontmatter fields for consistent maintenance.
When a command needs dynamic arguments, file references, or user questions before execution, this skill helps design a more flexible command structure and interaction pattern.
The document explains how slash commands work in Claude Code and how to author them effectively. It emphasizes that commands are Markdown instructions for Claude, not user-facing descriptions, and covers command locations, YAML frontmatter, dynamic arguments, file references, bash execution, and command organization. It also notes the relationship between the legacy commands directory and the newer skills directory layout.
Note: The
.claude/commands/directory is a legacy format. For new skills, use the.claude/skills/<name>/SKILL.mddirectory format. Both are loaded identically — the only difference is file layout. See theskill-developmentskill for the preferred format.
Slash commands are frequently-used prompts defined as Markdown files that Claude executes during interactive sessions. Understanding command structure, frontmatter options, and dynamic features enables creating powerful, reusable workflows.
Key concepts:
A slash command is a Markdown file containing a prompt that Claude executes when invoked. Commands provide:
Commands are written for agent consumption, not human consumption.
When a user invokes /command-name, the command content becomes Claude's instructions. Write commands as directives TO Claude about what to do, not as messages TO the user.
Correct approach (instructions for Claude):
Review this code for security vulnerabilities including:
- SQL injection
- XSS attacks
- Authentication issues
Provide specific line numbers and severity ratings.
Incorrect approach (messages to user):
This command will review your code for security issues.
You'll receive a report with vulnerability details.
The first example tells Claude what to do. The second tells the user what will happen but doesn't instruct Claude. Always use the first approach.
Project commands (shared with team):
.claude/commands//helpPersonal commands (available everywhere):
~/.claude/commands//helpPlugin commands (bundled with plugins):
plugin-name/commands//helpCommands are Markdown files with .md extension:
.claude/commands/
├── review.md # /review command
├── test.md # /test command
└── deploy.md # /deploy command
Simple command:
Review this code for security vulnerabilities including:
- SQL injection
- XSS attacks
- Authentication bypass
- Insecure data handling
No frontmatter needed for basic commands.
Add configuration using YAML frontmatter:
---
description: Review code for security issues
allowed-tools: Read, Grep, Bash(git:*)
model: sonnet
---
Review this code for security vulnerabilities...
Purpose: Brief description shown in /help
Type: String
Default: First line of command prompt
---
description: Review pull request for code quality
---
Best practice: Clear, actionable description (under 60 characters)
Purpose: Specify which tools command can use Type: String or Array Default: Inherits from conversation
---
allowed-tools: Read, Write, Edit, Bash(git:*)
---
Patterns:
Read, Write, Edit - Specific toolsBash(git:*) - Bash with git commands only* - All tools (rarely needed)Use when: Command requires specific tool access
…
It is used to create and organize slash commands for Claude Code, including command structure, YAML frontmatter, dynamic arguments, file references, bash execution, and interaction patterns.
The documentation says slash commands are Markdown files, typically using the .md extension. When invoked, the command content is executed as instructions for Claude.
The docs list locations for project, personal, and plugin commands, such as `.claude/commands/` and `~/.claude/commands/`. They also note that `.claude/commands/` is a legacy format and new skills should prefer `.claude/skills/<name>/SKILL.md`; see the source repository for details.
Package a local MCP server into a runtime-bundled .mcpb file.
Browse Anthropic’s official directory of quality Claude Code plugins.
Create Claude Code plugin hooks for tool validation and event-driven automation.
Helps developers plan the right MCP server architecture and build approach.
Build single-file interactive HTML playgrounds with live preview and prompt export.
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".
Provides slash commands for Claude and Codex to speed up common development tasks.
Generate and manage slash commands for AI coding assistants efficiently.
Learn Claude Code setup, commands, workflows, and power-user best practices.
Build and deploy Claude skills, commands, and prompt templates at scale
Create a composable CLI from docs, specs, SDKs, apps, or scripts.
Access reusable skills, commands, and scripts for coding agents and teamwork.