Guide to writing slash commands for Claude Code. Use when creating commands that set mode, constraints, or workflows invoked via /command-name.
Guides developers in writing effective slash commands by focusing on constraints and proper invocation controls.
npx claudepluginhub captaincrouton89/crouton-kitThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Commands specify constraints and mode, not instructions. Claude already knows how to do most things — commands tell it what to do differently.
---
description: One-line description (shows in /help)
allowed-tools: Tool(pattern:*), Tool(pattern:*)
argument-hint: [arg1] [arg2]
---
Prompt content. Set role, constraints, then get out of the way.
$ARGUMENTS — all args as string, or $1, $2 for positional!`git status` — inline bash execution (output included in context)@path/to/file.ts — file reference (contents included inline)Bash execution requires matching allowed-tools declarations.
Most commands should be user-only or agent-only — rarely both.
| Field | Who can invoke | Description in context | Use when |
|---|---|---|---|
| (default) | User + Agent | Yes | Rare — general-purpose commands |
disable-model-invocation: true | User only | No | Actions with side effects (commit, deploy, send) |
user-invocable: false | Agent only | Yes | Background knowledge, auto-applied patterns |
Default to disable-model-invocation: true for most commands. Agent auto-invocation is a footgun — commands that modify state, run tools, or trigger workflows should require explicit user intent. Reserve agent-invocable commands for read-only reference or context-injection where autonomous discovery is the point.
| Field | Purpose |
|---|---|
model | Override model (haiku for cheap, opus for capability) |
argument-hint | Document expected args for autocomplete |
| Commands | Skills |
|---|---|
| Quick, frequently used prompts | Complex multi-step workflows |
| Single .md file | Directory with SKILL.md + reference files |
User explicitly invokes with / | Automatic discovery by context |
| <200 lines | Extensive reference documentation |
description (won't appear in /help or Skill tool)allowed-tools: Bash(*) (overly permissive)@ references instead)argument-hint when args are expected