command-development
Markdown-based slash commands for defining reusable prompts with dynamic arguments, file references, and bash execution.
- Commands are instructions written for Claude (not users), stored as
.mdfiles in.claude/commands/,~/.claude/commands/, or plugin directories - YAML frontmatter configures description, allowed tools, model selection, and argument hints; use
$ARGUMENTS,$1,$2for dynamic substitution and@file-pathsyntax for file inclusion - Bash execution via backticks gathers dynamic context;
allowed-toolsrestricts access (e.g.,Bash(git:*)for git-only commands) - Organize commands in flat or namespaced structures; plugin commands access
${CLAUDE_PLUGIN_ROOT}for portable resource references and can integrate with agents, skills, and hooks
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Command Development for Claude Code
Note: The
.claude/commands/directory is a legacy format. For new skills, use the.claude/skills/<name>/SKILL.mddirectory format. Both are loaded identically — the only difference is file layout. See theskill-developmentskill for the preferred format.
Overview
Slash commands are frequently-used prompts defined as Markdown files that Claude executes during interactive sessions. Understanding command structure, frontmatter options, and dynamic features enables creating powerful, reusable workflows.
Key concepts:
- Markdown file format for commands
- YAML frontmatter for configuration
- Dynamic arguments and file references
- Bash execution for context
- Command organization and namespacing
Command Basics
What is a Slash Command?
More from anthropics/claude-plugins-official
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
7.9Kclaude-md-improver
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".
4.6Kplayground
Creates interactive HTML playgrounds — self-contained single-file explorers that let users configure something visually through controls, see a live preview, and copy out a prompt. Use when the user asks to make a playground, explorer, or interactive tool for a topic.
3.3Kclaude-automation-recommender
Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
3.2Kagent-development
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
2.5Kskill-development
This 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 content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
2.5K