claude-commands
Guide for creating custom slash commands for Claude Code. Use when adding a new slash command, writing $ARGUMENTS or $N argument substitutions, setting…
от vinnie357★ 30 звёзд на GitHub
Установить claude-commands в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Claude Code Commands
Custom slash commands for Claude Code: prompt files invoked with /name, with argument substitution and dynamic shell context.
Custom commands have merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Existing .claude/commands/ files keep working and support the same frontmatter. Skills add a directory for supporting files, invocation control, and automatic loading when relevant — so create new commands as skills, and use .claude/commands/ only for single-file prompts you already maintain there. The full skill-authoring guide is the claude-skills skill; this skill covers the command surface: naming, frontmatter, arguments, and dynamic context.
File Locations and Command Names
| Location | Path | Command name |
|---|---|---|
| Personal skill | ~/.claude/skills/<dir>/SKILL.md |
/<dir> |
| Project skill | .claude/skills/<dir>/SKILL.md |
/<dir> |
| Project command file | .claude/commands/<file>.md |
/<file> (extension dropped) |
| Plugin skill | <plugin>/skills/<dir>/SKILL.md |
/<plugin>:<dir> |
| Nested project skill | apps/web/.claude/skills/deploy/SKILL.md |
/apps/web:deploy when the name clashes with another skill |
- Use kebab-case directory and file names; the name on disk is the name typed.
- When a skill and a command file share a name, the skill takes precedence. Across levels, personal overrides project; enterprise managed settings take precedence over both. Plugin skills are namespaced, so they cannot conflict with other levels.
- In a plugin skill, the frontmatter
namefield replaces the last segment of the command (my-plugin/skills/review/SKILL.mdwithname: fancy→/my-plugin:fancy). In personal and project skills,nameis only a display label — the command still comes from the directory name.
Frontmatter Reference
YAML between --- markers at the top of the file. All fields are optional; description is recommended so Claude knows when to load the command automatically. Malformed YAML loads the body with empty metadata: /name still works, but Claude has no description to match against.
| Field | Type / values | Default | Effect |
|---|---|---|---|
name |
string | directory name | Display name; sets the command's last segment for plugin skills only |
description |
string | first paragraph of body | What it does and when to use it; drives automatic invocation |
when_to_use |
string | — | Extra trigger phrases, appended to description in the listing |
argument-hint |
string | — | Autocomplete hint, e.g. [issue-number] or [filename] [format] |
arguments |
space-separated string or YAML list | — | Declares named positional arguments for $name substitution; names map to positions in order |
disable-model-invocation |
boolean | false |
Only the user can invoke; Claude cannot trigger it automatically |
user-invocable |
boolean | true |
false hides it from the / menu; only Claude can invoke |
allowed-tools |
space/comma-separated string or YAML list | — | Tools pre-approved for the turn that invokes the command; the grant clears on the user's next message |
disallowed-tools |
space/comma-separated string or YAML list | — | Tools removed from the pool while the command is active; clears on the next message |
model |
model name or inherit |
session model | Model override for the rest of the current turn |
effort |
low | medium | high | xhigh | max |
session effort | Effort override while active |
context |
fork |
inline | Runs the command in a forked subagent; the body becomes the subagent's prompt |
agent |
agent type | general-purpose |
Which subagent type executes when context: fork is set |
background |
boolean | true |
With context: fork, false waits for the result in the invoking turn |
hooks |
hook config | — | Registered on invocation; keeps running for the rest of the session, not scoped to just that turn |
paths |
glob patterns (string or list) | — | Auto-load only when working with matching files |
shell |
bash | powershell |
bash |
Shell used for dynamic context injection in this file |
Do not put allowed-tools on skills in THIS marketplace — test/validate-plugin.nu rejects it as a hard failure; tool allowlists belong on agents here. The field itself is valid upstream Claude Code frontmatter, which is why the table documents it.
Argument Substitution
Placeholders in the body are replaced before Claude sees the content. This means a doc that shows the literal token gets it substituted too when the doc itself loads as a skill. Two different markers keep this page intact, because one escape does not cover both forms:
\$ARGUMENTSforms carry a leading backslash — the documented escape for a literal$(see "Substitution rules" below).
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/examples.md
FAQ
Что делает скилл claude-commands?
Guide for creating custom slash commands for Claude Code. Use when adding a new slash command, writing $ARGUMENTS or $N argument substitutions, setting argument-hint or arguments in command frontmatter, choosing command frontmatter fields, injecting shell output into a command, or migrating .claude/commands/ files to skills.
Как установить скилл claude-commands?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-commands запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…