Claude Code: Commands Frontmatter Reference
Quick-reference tables for defining custom commands in .claude/commands/<name>.md.
Frontmatter Fields
| Field |
Type |
Required |
Description |
description |
string |
Recommended |
Short description shown in autocomplete when user types / |
model |
string |
No |
Model override for this command (e.g., haiku, sonnet) |
Commands have minimal frontmatter compared to agents and skills — they are lightweight entry points that delegate heavy work to agents.
Invocation
| Method |
Example |
| Slash command |
User types /command-name at the prompt |
| With arguments |
/command-name arg1 arg2 — arguments are appended to the prompt |
Scope Levels
| Scope |
Location |
Shared |
| Project |
.claude/commands/*.md |
Yes (committed to repo) |
| User |
~/.claude/commands/*.md |
No (personal, all projects) |
Both scopes are available simultaneously — project commands appear alongside user commands.
Template Variables
Available inside command markdown via ${VARIABLE}:
| Variable |
Description |
${ARGUMENTS} |
Arguments passed after the command name |
${CLAUDE_SESSION_ID} |
Current session identifier |
${CLAUDE_PROJECT_DIR} |
Project root directory path |
Example: Orchestrator Command
Commands in This Repository
| Command |
Model |
Description |
Delegates To |
weather-orchestrator |
haiku |
Fetch and transform Karachi weather |
weather agent |
Intentionally Not Documented Here
These items were identified during the 2.1.0–2.1.49 audit but belong in other reports:
Sources