6e3dfaaefc
Commands: add `shell` frontmatter field (bash/powershell), update /fast to /fast [on|off], bump to 12 fields. Skills: add `shell` frontmatter field, bump to 12 fields. Subagents: add `initialPrompt` frontmatter field, bump to 16 fields. Settings: add WebFetch and MCP permission rules for workflow domains. Changelogs: append v2.1.84 entries for commands, skills, subagents, concepts, and development workflows. Co-Authored-By: Claude <noreply@anthropic.com>
12 KiB
12 KiB
Commands Best Practice
Claude Code commands — frontmatter fields and official built-in slash commands.
| ← Back to Claude Code Best Practice |
Frontmatter Fields (12)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | No | Display name and /slash-command identifier. Defaults to the directory name if omitted |
description |
string | Recommended | What the command does. Shown in autocomplete and used by Claude for auto-discovery |
argument-hint |
string | No | Hint shown during autocomplete (e.g., [issue-number], [filename]) |
disable-model-invocation |
boolean | No | Set true to prevent Claude from automatically invoking this command |
user-invocable |
boolean | No | Set false to hide from the / menu — command becomes background knowledge only |
allowed-tools |
string | No | Tools allowed without permission prompts when this command is active |
model |
string | No | Model to use when this command runs (e.g., haiku, sonnet, opus) |
effort |
string | No | Override the model effort level when invoked (low, medium, high, max) |
context |
string | No | Set to fork to run the command in an isolated subagent context |
agent |
string | No | Subagent type when context: fork is set (default: general-purpose) |
shell |
string | No | Shell for !`command` blocks — accepts bash (default) or powershell. Requires CLAUDE_CODE_USE_POWERSHELL_TOOL=1 |
hooks |
object | No | Lifecycle hooks scoped to this command |
(64)
Bundled skills such as /debug can also appear in the slash-command menu, but they are not built-in commands.