Back to Workflow & Productivity

command-creator

claude codeslash commandsai automationworkflow automationagent commandsproductivity toolsdevelopment toolscustom commands
⭐ 2.0kπŸ“„ MITπŸ•’ 2026-03-05Source β†—

Install this skill

npx skills add softaworks/agent-toolkit

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

The command-creator skill manages the lifecycle of slash commands for Claude Code environments. These commands act as reusable, markdown-defined instruction sets that expand into prompts when invoked via the CLI. By organizing workflows into project-level or global directories, users can standardize complex procedures like CI validation, stack submission, or iterative debugging. The skill facilitates the entire lifecycle: directory detection, naming convention enforcement, frontmatter configuration, and systematic instruction drafting. It encourages modular automation by turning repetitive task sequences into static files that ensure consistent agent behavior every time they are executed. This approach removes the need for manual prompt repetition, allowing users to call specialized, multi-step agent actions with a simple shorthand prefix, ensuring predictable outcomes across both personal and repository-specific development environments.

When to Use This Skill

  • β€’Standardizing PR submission procedures across a development team
  • β€’Automating multi-step diagnostic routines that check logs and run tests
  • β€’Creating shortcuts for project-specific scaffolding tasks
  • β€’Defining consistent review protocols for incoming code contributions

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • β€œHelp me create a new slash command
  • β€œI want to make a reusable command for running tests
  • β€œHow do I save this workflow as a command?
  • β€œSet up a project-level command for my code review process
  • β€œI keep doing this same task manually, let's turn it into a command

Pro Tips

  • πŸ’‘Design commands to be atomic but composable: smaller commands can be chained together for more complex workflows, promoting reusability and maintainability.
  • πŸ’‘Leverage command arguments: make your commands dynamic by accepting parameters, allowing for flexible execution without editing the command file.
  • πŸ’‘Include clear '## Instructions' sections within your command markdown to guide the AI agent on its task, especially for iterative or conditional logic.

What this skill does

  • β€’Detects and selects optimal storage paths for global or project-local command files
  • β€’Enforces strict kebab-case naming conventions for command consistency
  • β€’Generates structured frontmatter including descriptions and argument placeholders
  • β€’Structures instructions using imperative verbs to maximize agent execution accuracy
  • β€’Provides templates for common patterns like agent delegation and iterative task fixing

When not to use it

  • βœ•When a task is performed only once and will never be repeated
  • βœ•When the workflow requires highly dynamic, non-deterministic logic that cannot be standardized
  • βœ•When you lack write access to the project repository or system home directory

Example workflow

  1. Identify the repetitive workflow to automate
  2. Run the command-creator to select a local or global directory
  3. Select a command pattern based on the task requirements
  4. Define command arguments and descriptive frontmatter
  5. Draft the agent instructions and finalize the markdown file

Prerequisites

  • –Active Claude Code installation
  • –Basic understanding of Markdown
  • –Write permissions for the target directory

Pitfalls & limitations

  • !Using underscores instead of hyphens in command names which causes lookup failures
  • !Over-complicating instructions, leading to agent drift during execution
  • !Neglecting to define clear error handling within the command content

FAQ

Where should I save my commands?
Use the project-level .claude/commands/ directory for repo-specific tasks and the global ~/.claude/commands/ folder for personal utilities.
Can my commands accept user input?
Yes, you can define arguments in the command's frontmatter using <angle-brackets> for required inputs and [square-brackets] for optional ones.
How do I update an existing command?
Simply edit the corresponding markdown file in your commands directory; changes take effect immediately upon the next execution.

How it compares

While manual prompts are ephemeral and rely on your memory, commands serve as a persistent, version-controlled library of your most efficient workflows.

Source & trust

⭐ 2.0k starsπŸ“„ MITπŸ•’ Updated 2026-03-05
πŸ“„ Full skill instructions β€” original source: softaworks/agent-toolkit
# 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 execution
- Writing style guidelines
- Quality checklist

Key principles:

- Use imperative/infinitive form (verb-first instructions)
- Be explicit and specific
- Include expected outcomes
- Provide concrete examples
- Define clear error handling

### Step 5: Create the Command File

1. Determine full file path:
- Project: .claude/commands/[command-name].md
- Global: ~/.claude/commands/[command-name].md

2. Ensure directory exists:

mkdir -p [directory-path]


3. Write the command file using the Write tool

4. Confirm with user:
- Report the file location
- Summarize what the command does
- Explain how to use it: /command-name [arguments]

### Step 6: Test and Iterate (Optional)

If the user wants to test:

1. Suggest testing: You can test this command by running: /command-name [arguments]
2. Be ready to iterate based on feedback
3. Update the file with improvements as needed

## Quick Tips

**For detailed guidance, load the bundled references:**

- Load **references/patterns.md** when designing the command workflow
- Load **references/examples.md** to see how existing commands are structured
- Load **references/best-practices.md** before finalizing to ensure quality

**Common patterns to remember:**

- Use Bash tool for pytest, pyright, ruff, prettier, make, gt commands
- Use Task tool to invoke subagents for specialized tasks
- Check for specific files first (e.g., .PLAN.md) before proceeding
- Mark todos complete immediately, not in batches
- Include explicit error handling instructions
- Define clear success criteria

## Summary

When creating a command:

1. **Detect location** (project vs global)
2. **Show patterns** to frame the conversation
3. **Gather information** (name, purpose, arguments, steps, tools)
4. **Generate optimized command** with agent-executable instructions
5. **Create file** at appropriate location
6. **Confirm and iterate** as needed

Focus on creating commands that agents can execute autonomously, with clear steps, explicit tool usage, and proper error handling.

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/command-creator/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/softaworks/agent-toolkit/command-creator/SKILL.md
  • Cursor: ~/.cursor/skills/softaworks/agent-toolkit/command-creator/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/softaworks/agent-toolkit/command-creator/SKILL.md

πŸš€ Install with CLI:
npx skills add softaworks/agent-toolkit

Read the Master Guide: Mastering Agent Skills β†’

Recommended Rules

View more rules β†’

Recommended Workflows

View more workflows β†’

Recommended MCP Servers

View more MCP servers β†’

Take It Further

Maximize your productivity with these powerful resources

πŸ“‹

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
πŸ“–

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid workflow & productivity issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Workflow & Productivity and is published by Softaworks, maintained in softaworks/agent-toolkit.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.