Complete AI Training

Skill · Prompt Engineering

Command creator

Creates reusable Claude Code slash command markdown files in .claude/commands/ or ~/.claude/commands/ from a user's workflow. Use when the user wants to turn a workflow into a slash command, design or write a custom command, or decide between project-level and global command storage.

Complete AI SkillsLicense: MITAdded Sep 29, 2026

How to use it

  1. Start your plan and connect your AI once
  2. Ask for the task in your own words, or say it directly:
Use the Command creator skill to help me with this.

Without a connection: copy the SKILL.md below into your AI's project instructions.

SKILL.md

Command Creator

Helps users design and write reusable slash commands stored as markdown files in .claude/commands/ or ~/.claude/commands/. For users who repeat a workflow and want it available as a slash command. This skill writes command files only; it does not execute them.

When to use

  • User asks to create a slash command or custom command.
  • User wants to turn a repeated workflow into a reusable command.
  • User asks where a command file should live (project vs global).
  • User wants help choosing a command pattern or writing command frontmatter.

Workflows

Determine command location

Inputs: Current working directory; any user preference for project or global.

  1. Run git rev-parse --is-inside-work-tree to check if the current directory is inside a git repository.
  2. If yes, default to project-level .claude/commands/. If not, default to global ~/.claude/commands/.
  3. Allow the user to override by mentioning 'global' or 'project'.
  4. Report the chosen location before proceeding.
  5. Check: The reported location matches the git status of the directory unless the user overrode it. Output: A stated target directory path.

Show command patterns

Inputs: The user's described need.

  1. Present the four main command patterns: Work Automation (analyze-act-report), Iterative Fixing (run-parse-fix-repeat), Agent Delegation (context-delegate-iterate), and Simple Execution (run with args).
  2. Ask the user which pattern best fits their need to frame the conversation.
  3. Check: The user has named or confirmed a pattern. Output: A chosen pattern that shapes the rest of the interview.

Gather command information

Inputs: The user's answers; the chosen pattern.

  1. Interview the user once to collect: command name (must be kebab-case), description, whether it takes arguments (and if so, required vs optional placeholders), the specific workflow steps in order, tools or agents to use or avoid, and any files to read for context.
  2. Save these inputs so the user is not asked again.
  3. Check: All six items are captured, and the name is kebab-case. Output: A complete set of command inputs held for the next step.

Generate and write the command file

Inputs: The gathered command information; the chosen location.

  1. Create the markdown file with frontmatter (description, optional argument-hint) and agent-optimized instructions.
  2. Use imperative verb-first language, include expected outcomes, concrete examples, and explicit error handling.
  3. Ensure the directory exists with mkdir -p, then write the file.
  4. Confirm the location and usage syntax with the user.
  5. Check: The file exists at the reported path, frontmatter is valid, and instructions are verb-first with error handling. Output: The written command file plus a confirmation of its location and usage syntax.

Tools and data

  • Use file system write access to .claude/commands/ or ~/.claude/commands/ when available; if the tool is not available, ask the user to provide the data or connect it.

Guardrails

  • Do not modify existing commands unless the user explicitly asks.
  • Do not execute the commands you create; only write the files.
  • Do not create commands outside .claude/commands/ or ~/.claude/commands/.
  • Do not invent capabilities or steps the user did not describe.

Getting started

Ask the user what workflow they want to turn into a slash command, then follow the creation workflow step by step.

Credits

Adapted from an open-source original (MIT): https://www.aitmpl.com/component/skills/development/command-creator