command-development

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

Updated Oct 7, 2022
One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill command-development-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: command-development
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/command-development
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill command-development-tamagusko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing Claude Code slash commands requires knowing the Markdown file format, YAML frontmatter fields, dynamic argument syntax, and plugin integration patterns, which are easy to get wrong without structured guidance. ## Core Features & Use Cases - Command Format Guidance: Covers file locations, YAML frontmatter fields (description, allowed-tools, model, argument-hint, disable-model-invocation), dynamic arguments ($ARGUMENTS, $1, $2), file references (@ syntax), and inline bash execution. - Plugin Integration Patterns: Documents ${CLAUDE_PLUGIN_ROOT} usage, plugin command discovery, and coordination with agents, skills, and hooks. - Reference Library: Includes detailed references on frontmatter fields, interactive commands with AskUserQuestion, advanced workflows, testing strategies, documentation patterns, and marketplace considerations. - Use Case: When you ask to create a /review-pr command that accepts a PR number, runs git commands, and restricts tools, this Skill provides the exact frontmatter and prompt structure to produce a working command. ## Quick Start Ask Claude to create a slash command for reviewing pull requests with a PR number argument and git tool access.

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 slash command in Claude Code?

Create a Markdown file in .claude/commands/ for project commands or ~/.claude/commands/ for personal commands. Add optional YAML frontmatter with a description field, then write the prompt as instructions directed at Claude.

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

Use $ARGUMENTS to capture all arguments as one string, or positional placeholders like $1, $2, $3 for individual arguments. Document them with the argument-hint frontmatter field so users see expected inputs in autocomplete.

What frontmatter fields does a slash command support?

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

Can a slash command run bash commands?

Yes, commands can execute bash inline using the !`command` syntax to inject dynamic context like git status into the prompt. The command must include Bash in its allowed-tools frontmatter, ideally scoped 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, and verify any YAML frontmatter has no syntax errors.

How do plugin commands reference plugin files portably?

Use the ${CLAUDE_PLUGIN_ROOT} environment variable, which resolves to the plugin's absolute path at runtime. It works for executing scripts, loading configuration, and referencing templates without hardcoded paths.