Command Development

Create Claude Code slash commands with YAML frontmatter and dynamic arguments.

33.3k|3.8k|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/anthropics/claude-plugins-official --skill command-development-anthropics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Command Development
Source: https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/command-development
Command: npx skills add https://github.com/anthropics/claude-plugins-official --skill command-development-anthropics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill empowers users to create custom slash commands in Claude Code, transforming repetitive tasks into efficient, reusable prompts. It streamlines workflows and standardizes common operations.

Core Features & Use Cases

  • Dynamic Arguments: Define commands with $ARGUMENTS or positional $1, $2 for flexible input.
  • File & Bash Integration: Include file contents (@syntax) or execute bash commands (!command``) directly within prompts for dynamic context.
  • Plugin-Specific Features: Leverage ${CLAUDE_PLUGIN_ROOT} for portable paths and integrate with plugin agents, skills, and hooks.
  • Use Case: Create a /deploy command that takes environment and version as arguments, executes a plugin-specific deployment script, and reports status, automating your release process.

Quick Start

Use the Command Development skill to create a new slash command that runs 'git status' and displays the output.

Frequently Asked Questions about Command Development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create slash commands in Claude Code?

Slash commands in Claude Code are custom prompts defined with YAML frontmatter that execute automated tasks. You configure dynamic arguments using `$ARGUMENTS` or positional parameters (`$1`, `$2`), optionally include file contents with `@path` syntax or execute bash commands with backticks, then invoke the command with a forward slash prefix to run your workflow instantly.

Can I pass arguments to a slash command?

Yes, slash commands support dynamic arguments through `$ARGUMENTS` for flexible input or positional syntax like `$1` and `$2` for specific parameters. This lets you create reusable commands that adapt to different contexts—for example, a `/deploy` command that accepts environment and version inputs.

How do I execute bash commands within a slash command?

Use backtick syntax (`` !`command` ``) to execute bash commands directly within your command's prompt. The output integrates dynamically into the context, letting you reference git status, file metadata, or deployment scripts without manual copy-paste.

What's the difference between file references and bash execution in slash commands?

File references (`@path`) include file contents statically in your command, while bash execution (`` !`command` ``) runs a script and captures live output. Use file references for stable context like configuration or templates; use bash for dynamic data like system status or versioned artifacts.

Can I use slash commands across different Claude Code deployments?

Yes, slash commands support plugin-scoped and project-scoped deployment. Use `${CLAUDE_PLUGIN_ROOT}` for portable paths in plugins, and organize commands with integration points for agents, skills, and hooks to ensure consistency across deployments.

What happens if a slash command argument is missing or invalid?

Slash commands include validation and error handling logic in their frontmatter configuration. Missing or invalid arguments trigger progressive disclosure—the command guides users to provide required inputs or reformulate their request before execution proceeds.