create-command
БесплатноБез исполняемых скриптовНе проверенGuide for creating custom Claude Code slash commands with proper structure, argument handling, frontmatter configuration, and best practices. Use when the…
Об этом скилле
Create Slash Command Guide
This skill helps you create custom Claude Code slash commands - reusable prompts stored as Markdown files that can be invoked with /command-name syntax. Slash commands are ideal for frequently-used prompts that you want to trigger explicitly.
Quick Start
When creating a new slash command, follow this workflow:
- Identify the purpose - What reusable prompt do you need?
- Choose scope - Project-level (.claude/commands/) or personal (~/.claude/commands/)?
- Select name - Clear, descriptive filename without .md extension
- Design arguments - Will it use $ARGUMENTS, $1/$2/$3, or none?
- Add frontmatter - Optional metadata (description, tools, model)
- Write prompt - The markdown content that becomes the prompt
- Test invocation - Verify command works with various arguments
Basic Syntax
Commands are invoked with:
/command-name [arguments]
The command name comes from the filename without .md extension.
File Locations
Project Commands (.claude/commands/)
- Scope: Project-specific, shared with team via git
- Label: Shows as "(project)" in help listing
- Use for: Team workflows, project conventions, shared prompts
# Create project command
echo "Review this code for security vulnerabilities" > .claude/commands/security-review.md
Example structure:
.claude/commands/
├── review.md # /review
├── optimize.md # /optimize
├── test.md # /test
└── frontend/
└── component.md # /component (project:frontend)
Personal Commands (~/.claude/commands/)
- Scope: Available across all projects
- Label: Shows as "(user)" in help listing
- Use for: Personal productivity, individual workflows, cross-project utilities
# Create personal command
echo "Explain this code in simple terms" > ~/.claude/commands/explain.md
Example structure:
~/.claude/commands/
├── explain.md # /explain (user)
├── refactor.md # /refactor (user)
└── snippets/
└── doc.md # /doc (user:snippets)
Argument Handling
No Arguments
Simple commands that don't need input:
Review the current codebase for potential improvements and suggest optimizations.
Usage: /review
All Arguments with $ARGUMENTS
Captures everything passed to the command:
Fix issue #$ARGUMENTS following our coding standards and best practices.
Usage:
/fix-issue 123/fix-issue 123 high-priority security
Positional Arguments with $1, $2, $3, etc.
Access specific arguments by position:
Review PR #$1 with priority $2 and assign to $3 for review.
Usage: /review-pr 456 high alice
Benefits:
- Access arguments in different parts of the prompt
- Provide defaults for missing arguments
- Build structured commands with specific parameter roles
- Clearer intent for multi-parameter commands
Combining Arguments
Use both positional and all arguments:
Create a $1 feature called "$2" with the following requirements:
$ARGUMENTS
Usage: /create-feature backend "user authentication" JWT tokens, role-based access, password hashing
Frontmatter Configuration
Add optional metadata at the top of your command file:
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: <issue-number> [priority]
description: Fix GitHub issue following coding standards
model: claude-3-5-sonnet-20241022
---
Your command prompt content goes here...
Frontmatter Fields
allowed-tools: Restrict which tools Claude can use
allowed-tools: Read, Write, Edit, Bash
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
argument-hint: Show expected arguments in autocomplete
argument-hint: <file-path>
argument-hint: <pr-number> [priority] [assignee]
argument-hint: [message]
description: Brief command description (overrides first line)
description: Create a git commit with proper formatting
model: Specific model to use for this command
model: claude-3-5-haiku-20241022 # Fast, cheap
model: claude-3-5-sonnet-20241022 # Balanced
model: claude-opus-4-20250514 # Advanced
disable-model-invocation: Prevent auto-invocation via SlashCommand tool
disable-model-invocation: true
Advanced Features
File References with @
Include file contents in your command:
---
description: Review code implementation
---
Review the implementation in @src/utils/helpers.js and compare it with @src/utils/legacy.js.
Identify:
- Code quality improvements
- Performance optimizations
- Security vulnerabilities
Usage: /review-implementation
Bash Command Execution with !
Execute bash commands and include output (requires allowed-tools):
---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
description: Create a git commit
---
Create a git com
Установить create-command в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл create-command?
Guide for creating custom Claude Code slash commands with proper structure, argument handling, frontmatter configuration, and best practices. Use when the user wants to create slash commands, custom commands, reusable prompts, or mentions creating/designing/building commands.
Как установить скилл create-command?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-command запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic