Command creator

From manu14357/zskills · View interactive version

Command creator is an AI agent skill from the GitHub repository manu14357/zskills. 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 be

How to use this skill

Skill file

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:

When to Use This Skill

Invoke this skill when users:

Bundled Resources

This skill includes reference documentation for detailed guidance:

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:
  1. Allow user override:

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:

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:

Guidelines:

B. Arguments

Ask:

If command takes arguments:

C. Workflow Steps

Ask:

Gather details about:

D. Tool Restrictions and Guidance

Ask:

Step 4: Generate Optimized Command

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

Key principles:

Step 5: Create the Command File

  1. Determine full file path:
  1. Ensure directory exists:

```bash

mkdir -p [directory-path]

```

  1. Write the command file using the Write tool
  1. Confirm with user:

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:

Common patterns to remember:

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.