Command Development

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

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/AnXueHua/auto-research --skill command-development-anxuehua
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Command Development
Source: https://github.com/AnXueHua/auto-research/tree/main/skills/command-development
Command: npx skills add https://github.com/AnXueHua/auto-research --skill command-development-anxuehua

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Many users struggle to create, organize, and maintain Claude Code slash commands, dealing with YAML frontmatter, dynamic arguments, file references, and plugin integration, leading to inconsistent workflows and errors.

Core Features & Use Cases

  • Command Structure Guidance: Detailed explanation of markdown file format, required frontmatter fields, and naming conventions.
  • Dynamic Argument Handling: Instructions for $ARGUMENTS, positional arguments, and argument‑hint documentation.
  • File & Bash Integration: How to embed file contents with @ syntax and execute bash commands using ! syntax safely.
  • Plugin‑Specific Patterns: Use of ${CLAUDE_PLUGIN_ROOT}, namespacing, and multi‑script workflows.
  • Validation & Error Handling: Templates for input validation, tool restrictions, and troubleshooting common issues.
  • Use Cases: Creating a new /review command, adding plugin‑specific deployment commands, or building interactive workflows with AskUserQuestion.

Quick Start

Ask Claude to create a new slash command named “review‑pr” that takes a PR number and runs a git diff.

Frequently Asked Questions about Command Development

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

FAQPage Schema
How do I create Claude Code slash commands with dynamic arguments?

To create Claude Code slash commands, you define a markdown file with YAML frontmatter and use $ARGUMENTS for dynamic arguments. This allows you to build interactive workflows that accept positional inputs and execute repetitive development tasks safely.

What is the correct YAML frontmatter format for defining command structure?

The correct YAML frontmatter format for command structure requires specific fields to define the command's behavior and restrictions. Following these naming conventions and frontmatter templates ensures safe, consistent command creation and prevents workflow errors.

How do I execute bash commands and embed file contents in slash commands?

You can execute bash commands using the `!` syntax and embed file contents with the `@` syntax within your command definitions. This file and bash integration allows your commands to safely run scripts and reference project files dynamically.

Can I use Claude Code slash commands for plugin-specific workflows?

Yes, you can build plugin-specific workflows by using the `${CLAUDE_PLUGIN_ROOT}` variable and applying namespacing. This enables multi-script workflows and seamless plugin integration for tasks like plugin-specific deployments.

What are the limitations when adding validation and error handling to slash commands?

Limitations when adding validation to slash commands involve adhering to strict tool restrictions and troubleshooting common input errors. You must apply the provided validation templates to ensure safe execution and prevent unauthorized bash commands from running.