Generates optimized Markdown files for Claude Code slash commands, including frontmatter, agent-executable instructions, and proper directory placement. It structures repetitive workflows into reusable, consistent prompts for automated execution.
Say it in your own words; the assistant finds this recipe by itself. Examples:
Use this skill when a user wants to create, define, or document a new slash command for Claude Code. It is appropriate when the user describes a repetitive multi-step process they want to automate or asks to package a specific workflow into a reusable `/command`. It handles the technical structure, naming conventions, and best practices for agent-executable prompts.
This skill guides the creation of Claude Code slash commands - reusable workflows that can be invoked with /command-name in Claude Code conversations.
Slash commands are markdown files stored in .claude/commands/ (project-level) or ~/.claude/commands/ (global/user-level) that get expanded into prompts when invoked. They're ideal for:
Invoke this skill when users:
This skill includes reference documentation for detailed guidance:
Load these references as needed when creating commands to understand patterns, see examples, or ensure quality.
Every slash command is a markdown file with:
---
description: Brief description shown in /help (required)
argument-hint: <placeholder> (optional, if command takes arguments)
---
# Command Title
[Detailed instructions for the agent to execute autonomously]
Auto-detect the appropriate location:
git rev-parse --is-inside-work-tree 2>/dev/null.claude/commands/~/.claude/commands/~/.claude/commands/.claude/commands/Report the chosen location to the user before proceeding.
Help the user understand different command types. Load references/patterns.md to see available patterns:
Ask the user: "Which pattern is closest to what you want to create?" This helps frame the conversation.
Ask the user for key information:
Ask:
Guidelines:
submit-stack, ensure-ci, create-from-plansubmit_stack, ensure_ci, create_from_planmy-command.md → invoked as /my-command/help output)Ask:
If command takes arguments:
argument-hint: <placeholder> to frontmatter<angle-brackets> for required arguments[square-brackets] for optional argumentsAsk:
Gather details about:
Ask:
Create the command file with agent-optimized instructions. Load references/best-practices.md for:
Key principles:
.claude/commands/[command-name].mdGlobal: ~/.claude/commands/[command-name].md
Ensure directory exists:
bash
mkdir -p [directory-path]
Write the command file using the Write tool
Confirm with user:
/command-name [arguments]If the user wants to test:
You can test this command by running: /command-name [arguments]For detailed guidance, load the bundled references:
Common patterns to remember:
pytest, pyright, ruff, prettier, make, gt commands.PLAN.md) before proceedingWhen creating a command:
Focus on creating commands that agents can execute autonomously, with clear steps, explicit tool usage, and proper error handling.
LICENSEREADME.mdSKILL.mdreferences/best-practices.mdreferences/examples.mdreferences/patterns.mdVendored from softaworks/agent-toolkit, commit 3027f20f3181, path skills/command-creator, licence MIT. The upstream licence file ships inside the skill.