anthropics avatar

Command Development

If you're building custom workflows in Claude Code, this is your reference for creating slash commands with the `.claude/commands/` directory structure. It covers YAML frontmatter options like model selection and tool permissions, dynamic argument substitution with $1, $2, and $ARGUMENTS, file references using @ syntax, and inline bash execution for pulling in context like git status. The critical insight here is that commands are instructions for Claude, not messages to users, so write them as directives about what to do. Worth noting this is the legacy format, the newer `.claude/skills/` approach is preferred for new work, but both load identically so existing commands keep working.

skills.sh installs
7.4K
GitHub stars
46.7K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/anthropics/claude-plugins-official
Categories
Design & UI/UX, CLI & Terminal
First seen
May 16, 2026

More from anthropics/claude-plugins-official

All 24
1agents365-ai avatardrawio-skillagents365-ai/drawio-skillUse when the user requests diagrams, flowcharts, architecture diagrams, ER diagrams, UML / sequence / class diagrams, SysML / MBSE diagrams (block definition, i7.4Kskills.sh installs
2anthropics avatarbuild-mcp-serveranthropics/claude-plugins-officialThis skill should be used when the user asks to "build an MCP server", "create an MCP", "make an MCP integration", "wrap an API for Claude", "expose tools to Cl7.4Kskills.sh installs
3wondelai avatarjobs-to-be-donewondelai/skillsDiscover what customers truly need by analyzing the "job" they hire your product to do. Use when the user mentions "customer discovery", "why customers churn", 7.3Kskills.sh installs
4affaan-m avatarbackend-patternsaffaan-m/eccBackend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.7.2Kskills.sh installs
5grafana avatarloki-label-analyzergrafana/skillsExpert evaluator for Grafana Loki label strategy. Audits, designs, and improves label schemas using cardinality scoring, access-pattern alignment, static vs. dy7.2Kskills.sh installs
6pixijs avatarpixijs-scene-spritepixijs/pixijs-skillsUse this skill when drawing images in PixiJS v8. Covers Sprite with anchor/tint/texture, AnimatedSprite for frame animation, NineSliceSprite for resizable UI pa7Kskills.sh installs