No slash command · from authoring
Guide to writing slash commands for Claude Code. Covers structure, argument substitution, inline bash, invocation control, and best practices for minimal tokens.
Ships in authoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Commands specify constraints and mode, not instructions. Claude already knows how to do most things — commands tell it what to do differently.
Commands and skills are the same thing now. .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both produce /deploy and use the same frontmatter. Existing commands/ files keep working. Prefer skills when you need bundled scripts, reference files, or per-skill hooks — see the skills-authoring skill for the full feature set.
---
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 a single string$ARGUMENTS[N] or $N — positional arg by 0-based index ($0 is first)${CLAUDE_SESSION_ID}, ${CLAUDE_SKILL_DIR} — runtime substitutions! immediately followed by a backtick-wrapped command (e.g. the bang-prefix form around git status). Output is included in context. The literal pattern is intentionally not shown verbatim here because the preprocessor evaluates it on raw text including inside fenced code blocks, which would run the example at command-load time.!, and close it with a normal triple-backtick fence. Each line runs as a separate shell command; Claude sees the combined output.@path/to/file.ts — file reference (contents included inline)Inline bash runs at template expansion time — it does not require allowed-tools. The allowed-tools field only governs tools the model can call at runtime.
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) |
effort | Override effort level: low, medium, high, max |
argument-hint | Document expected args for autocomplete |
paths | Glob patterns — only activate when working with matching files |
context: fork | Run in an isolated subagent context |
agent | Subagent type when context: fork is set (Explore, Plan, etc.) |
hooks | Command-scoped hooks (same format as hooks.json, nested in frontmatter) |
shell | bash (default) or powershell for inline shell execution |
Functionally identical — same frontmatter, same invocation. Choose the file layout:
Single .md in commands/ | Directory in skills/ |
|---|---|
| Quick prompts, single file | Needs bundled scripts or reference files |
| Existing muscle memory | Per-skill hooks via hooks: frontmatter |
| <200 lines | Progressive disclosure across multiple .md files |
If a command needs to grow supporting files or bundled scripts, convert it to a skill directory.
description (won't appear in /help or Skill tool)allowed-tools: Bash(*) (overly permissive)@ references instead)argument-hint when args are expectedWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
16 skills in this plugin
/claude-md-authoringBest practices for writing effective CLAUDE.md files. Use when creating, updating, or auditing CLAUDE.md files for projects or directories./cli-designDesign CLIs for humans and LLM agents — subcommand shape, output streams, exit codes, JSON modes, TTY-aware color, structured errors, mutation safety. Use when building or refactoring a CLI, adding machine-readable output, writing --help, deciding stdout vs stderr, or making a tool agent-friendly./context-managementToken budgeting, placement effects, RAG patterns, prompt caching, compression, and multi-turn context strategies for LLM applications. Use when dealing with context windows, token budgets, retrieval-augmented generation, long context, context overflow, caching costs, observation masking, or compressing LLM inputs./eval-and-quality-gatesEvaluation strategies and quality gates for LLM systems. LLM-as-judge implementation, prompt regression testing, structural and semantic validation pipelines, production monitoring, guardrails, and metrics that actually work. Use when building evals, setting up CI quality gates, testing prompts, measuring output quality, detecting regressions, or adding safety guardrails to AI applications./hooksGuide to Claude Code hooks — lifecycle events, handler types, decision control, and common patterns. Use when creating, debugging, or planning hooks for guardrails, context injection, quality gates, notifications, or automation./multi-agent-orchestrationDesign and implement multi-agent LLM systems. Covers orchestrator patterns, parallel agent coordination, pipeline architecture, hierarchical delegation, agent communication, and failure handling. Use when building multi-agent workflows, coordinating parallel agents, designing orchestrators, splitting tasks across agents, or debugging multi-agent failures.npx claudepluginhub crouton-labs/crouton-kit --plugin authoringOther plugins' skills for the same job