Skip to content
Skillpedia
Prompts & LLMs33k Β· #8743

command-creator

What it does

This skill helps your AI agent create Claude Code slash commands from a workflow you repeat. It is for people who want a faster, consistent way to run common tasks.

When to use it

  • βœ“When you repeat the same steps often and want a command for them.
  • βœ“When you want a project-level or global slash command.
  • βœ“When you want to document a team workflow as a reusable command.

Skill link

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/command-creator/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/command-creator/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œMake a slash command that runs our code review checklist on the current changes.”

5 new skills a week. 1 minute to read.

How it works

The agent writes a markdown command file in the project or user commands folder. It follows proven patterns so the command runs reliably each time.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Command Creator

This skill guides the creation of Claude Code slash commands - reusable workflows that can be invoked with /command-name in Claude Code conversations.

About Slash Commands

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:

  • Repetitive workflows (code review, PR submission, CI fixing)
  • Multi-step processes that need consistency
  • Agent delegation patterns
  • Project-specific automation

When to Use This Skill

Invoke this skill when users:

  • Ask to "create a command" or "make a slash command"
  • Want to automate a repetitive workflow
  • Need to document a consistent process for reuse
  • Say "I keep doing X, can we make a command for it?"
  • Want to create project-specific or global commands

Bundled Resources

This skill includes reference documentation for detailed guidance:

  • references/patterns.md - Command patterns (workflow automation, iterative fixing, agent delegation, simple execution)
  • references/examples.md - Real command examples with full source (submit-stack, ensure-ci, create-implementation-plan)
  • references/best-practices.md - Quality checklist, common pitfalls, writing guidelines, template structure

Load these references as needed when creating commands to understand patterns, see examples, or ensure quality.

Command Structure Overview

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]

Command Creation Workflow

Step 1: Determine Location

Auto-detect the appropriate location:

  1. Check git repository status: git rev-parse --is-inside-work-tree 2>/dev/null
  2. Default location:
    • If in git repo β†’ Project-level: .claude/commands/
    • If not in git repo β†’ Global: ~/.claude/commands/
  3. Allow user override:
    • If user explicitly mentions "global" or "user-level" β†’ Use ~/.claude/commands/
    • If user explicitly mentions "project" or "project-level" β†’ Use .claude/commands/

Report the chosen location to the user before proceeding.

Step 2: Show Command Patterns

Help the user understand different command types. Load references/patterns.md to see available patterns:

  • Workflow Automation - Analyze β†’ Act β†’ Report (e.g., submit-stack)
  • Iterative Fixing - Run β†’ Parse β†’ Fix β†’ Repeat (e.g., ensure-ci)
  • Agent Delegation - Context β†’ Delegate β†’ Iterate (e.g., create-implementation-plan)
  • Simple Execution - Run command with args (e.g., codex-review)

Ask the user: "Which pattern is closest to what you want to create?" This helps frame the conversation.

Step 3: Gather Command Information

Ask the user for key information:

A. Command Name and Purpose

Ask:

  • "What should the command be called?" (for filename)
  • "What does this command do?" (for description field)

Guidelines:

  • Command names MUST be kebab-case (hyphens, NOT underscores)
    • βœ… CORRECT: submit-stack, ensure-ci, create-from-plan
    • ❌ WRONG: submit_stack, ensure_ci, create_from_plan
  • File names match command names: my-command.md β†’ invoked as /my-command
  • Description should be concise, action-oriented (appears in /help output)

B. Arguments

Ask:

  • "Does this command take any arguments?"
  • "Are arguments required or optional?"
  • "What should arguments represent?"

If command takes arguments:

  • Add argument-hint: <placeholder> to frontmatter
  • Use <angle-brackets> for required arguments
  • Use [square-brackets] for optional arguments

C. Workflow Steps

Ask:

  • "What are the specific steps this command should follow?"
  • "What order should they happen in?"
  • "What tools or commands should be used?"

Gather details about:

  • Initial analysis or checks to perform
  • Main actions to take
  • How to handle results
  • Success criteria
  • Error handling approach

D. Tool Restrictions and Guidance

Ask:

  • "Should this command use any specific agents or tools?"
  • "Are there any tools or operations it should avoid?"
  • "Should it read any specific files for context?"

Step 4: Generate Optimized Command

Create the command file with agent-optimized instructions. Load references/best-practices.md for:

  • Template structure
  • Best practices for agent e
FAQ

Where are commands saved?

Project commands go in the project's commands folder, and global commands go in your user commands folder.

What patterns does it use?

It uses patterns such as workflow automation, iterative fixing and agent delegation.

Does it include examples?

Yes, it includes reference examples such as submitting a stack and fixing CI.

Details

Original description by the author

This skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash command", "add a command", or want to document a workflow as a reusable command. Essential for creating optimized, agent-executable slash commands with proper structure and best practices.

repo: davila7/claude-code-templates

Popularity

GitHub stars
33k
Ranking position
#8743
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills