C

Command Creator Skill

Interactive wizard for creating new Claude Code custom slash commands. Guides you through naming, parameter design, behavior specification, and outputs a ready-to-use command markdown file.

SkillCommunitydevelopmentv1.0.0MIT
0 views0 copies

Description

This skill walks you through creating a new Claude Code custom slash command. It handles the structure, formatting, and best practices so you get a production-quality command file that works immediately.

Instructions

When the user wants to create a new command, follow this guided workflow:

Step 1: Gather Requirements

Ask the user (or infer from context):

  1. What should the command do? (one-sentence description)
  2. What inputs does it need? (arguments, flags, file paths)
  3. What should it output? (files, terminal output, git actions)
  4. Any constraints? (language, framework, safety requirements)

Step 2: Generate the Command File

Structure the command markdown:

--- description: [One-line description for the command picker] argument: [Description of the $ARGUMENTS placeholder] --- ## Command `/command-name` ## Description [2-3 sentences explaining what the command does, when to use it] ## Behavior [Step-by-step instructions for Claude on how to execute this command] 1. **Step one** — What to do first 2. **Step two** — What to do next 3. **Step three** — How to finish ## Output Format [Description or template of expected output] ## Rules - Rule 1 - Rule 2 - Rule 3 ## Examples [Usage examples]

Step 3: Write the File

mkdir -p .claude/commands # Write to .claude/commands/{command-name}.md

Step 4: Verify

  • Confirm the file was created
  • Show the user how to invoke it: /command-name [args]
  • Suggest testing it immediately

Rules

  • Command names should use kebab-case: my-command not myCommand
  • Always include a description frontmatter field for the command picker
  • Include argument frontmatter only if the command accepts arguments
  • Use $ARGUMENTS placeholder in the body where user input should be inserted
  • Keep the behavior section specific and actionable — avoid vague instructions
  • Include at least 2 examples showing different usage patterns
  • Save to .claude/commands/ directory (create it if it does not exist)
  • For project-specific commands, use the project's .claude/commands/ directory
  • For global commands, use ~/.claude/commands/

Examples

User: Create a command that generates API route boilerplate Action: Ask for framework (Express/Fastify/etc), create command with templates for route, controller, validation, and tests

User: I want a /deploy command Action: Ask for deployment target, create command with build, test, and deploy steps

User: Make a command for database migrations Action: Create command that generates migration files with up/down functions, timestamps, and naming conventions

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates