Command Development

Create and structure Claude Code slash commands with frontmatter, arguments, and bash execution.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/Tgoldi/claude-skills --skill command-development-tgoldi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Command Development
Source: https://github.com/Tgoldi/claude-skills/tree/main/command-development
Command: npx skills add https://github.com/Tgoldi/claude-skills --skill command-development-tgoldi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building custom slash commands for Claude Code requires knowing the exact Markdown file format, YAML frontmatter fields, argument syntax, and organization conventions, which are easy to get wrong without a reference. ## Core Features & Use Cases - Command Structure Guidance: Covers file locations (project, personal, plugin), YAML frontmatter fields (description, allowed-tools, model, argument-hint, disable-model-invocation), and namespaced directory organization. - Dynamic Features: Explains $ARGUMENTS and positional arguments ($1, $2), @ file references, inline bash execution for context, and AskUserQuestion-based interactive commands. - Plugin Integration: Documents CLAUDE_PLUGIN_ROOT usage, agent/skill/hook coordination, validation patterns, and marketplace distribution considerations. - Use Case: When you want to add a /review-pr command to your project that fetches PR details via gh, validates arguments, and restricts tools to Bash(gh:*), this Skill provides the exact frontmatter and prompt structure to write. ## Quick Start Ask Claude to create a slash command for your project, for example a /review-pr command that takes a PR number argument and uses gh CLI to fetch and review the changes.

Frequently Asked Questions about Command Development

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

FAQPage Schema
How do I create a custom slash command in Claude Code?

Create a Markdown file in .claude/commands/ for project commands or ~/.claude/commands/ for personal commands. The file content becomes Claude's instructions when the command is invoked, and optional YAML frontmatter configures description, tools, and model.

How do I pass arguments to a Claude Code slash command?

Use $ARGUMENTS to capture all arguments as one string, or positional parameters like $1, $2, $3 for individual arguments. Add an argument-hint field in the frontmatter to document expected arguments for autocomplete.

What frontmatter fields are available for slash commands?

Slash commands support description, allowed-tools, model (sonnet, opus, haiku), argument-hint, and disable-model-invocation. All fields are optional, and commands work without any frontmatter.

Can a slash command run bash commands in Claude Code?

Yes, commands can execute bash inline to gather context like git status before Claude processes the prompt. The command must include Bash in its allowed-tools frontmatter, ideally scoped with filters like Bash(git:*).

Why is my slash command not appearing in Claude Code?

Check that the file is in the correct commands directory, has a .md extension, and contains valid Markdown. Restart Claude Code after adding the file so it can be discovered.

How do I make an interactive slash command that asks the user questions?

Include AskUserQuestion in the command's allowed-tools and instruct Claude to call it with structured questions, headers, and 2-4 options. This suits multi-choice decisions and configuration gathering that arguments cannot express well.