New advertisers: 50% off your first month with code FIRSTMONTHSee slots
anthropics avatar

Command Development

Guide for writing Claude Code slash commands, with frontmatter fields, dynamic arguments, and file references.

skills.sh installs
7.7K
GitHub stars
47.9K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers command file format, storage locations for project, personal, and plugin commands, and how to structure instructions for Claude
  • Includes YAML frontmatter fields (description, allowed-tools, model, argument-hint, disable-model-invocation) plus $ARGUMENTS and positional $1, $2 argument handling
  • Explains @ file references and inline bash execution for gathering repository or environment context before processing
  • Designed for developers building reusable, shareable workflows for Claude Code, with the .claude/skills/ format noted as preferred

Install

$ npx -y skills add anthropics/claude-plugins-official --skill command-development -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Command Development for Claude Code

Note: The .claude/commands/ directory is a legacy format. For new skills, use the .claude/skills/<name>/SKILL.md directory format. Both are loaded identically — the only difference is file layout. See the skill-development skill 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?

A slash command is a Markdown file containing a prompt that Claude executes when invoked. Commands provide:

  • Reusability: Define once, use repeatedly
  • Consistency: Standardize common workflows
  • Sharing: Distribute across team or projects
  • Efficiency: Quick access to complex prompts

Critical: Commands are Instructions FOR Claude

Details

Repository
github.com/anthropics/claude-plugins-official
Categories
Skill & Plugin Building, Technical Documentation
First seen
May 16, 2026

More from anthropics/claude-plugins-official

All 23

Similar to Command Development

More Skill & Plugin Building