Langsung ke konten
Skillpedia
Prompt & LLM33k Β· #8743

command-creator

Fungsinya

Skill ini membantu agent AI Anda membuat slash command Claude Code dari alur kerja yang sering Anda ulangi. Skill ini ditujukan untuk orang yang menginginkan cara yang lebih cepat dan konsisten untuk menjalankan tugas umum.

Kapan dipakai

  • βœ“Saat Anda sering mengulangi langkah yang sama dan ingin perintah untuk itu.
  • βœ“Saat Anda ingin slash command tingkat proyek atau global.
  • βœ“Saat Anda ingin mendokumentasikan alur kerja tim sebagai perintah yang dapat digunakan ulang.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/command-creator/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuat slash command yang menjalankan daftar periksa tinjauan kode kami pada perubahan saat ini.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menulis file perintah markdown di folder perintah proyek atau pengguna. Agent mengikuti pola yang sudah terbukti agar perintah berjalan andal setiap kali.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Di mana perintah disimpan?

Perintah proyek disimpan di folder commands proyek, dan perintah global disimpan di folder commands pengguna Anda.

Pola apa yang digunakan?

Skill menggunakan pola seperti otomatisasi alur kerja, perbaikan berulang, dan delegasi ke agent.

Apakah ada contohnya?

Ya. Skill mencakup contoh referensi seperti mengirim stack dan memperbaiki CI.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
33k
Peringkat
#8743
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa