Back to list
GzuPark

slash-command-creator

by GzuPark

Personal collection of plugins for Claude Code with multi-agent workflows and productivity tools

1🍴 0📅 Jan 24, 2026

SKILL.md


name: slash-command-creator description: Guide for creating Claude Code slash commands. Use when the user wants to create a new slash command, update an existing slash command, or asks about syntax and options.

Slash Command Creator

Create custom slash commands for Claude Code to automate frequently-used prompts.

Quick Start

Initialize a new command:

./run.sh scripts/init_command.py <command-name> [--scope project|personal]

# Namespaced command (creates frontend/build.md)
./run.sh scripts/init_command.py frontend/build --scope project

Command Structure

Slash commands are Markdown files with optional YAML frontmatter:

---
description: Brief description shown in /help
---

Your prompt instructions here.

$ARGUMENTS

File Locations

ScopePathShown as
Project.claude/commands/(project)
Personal~/.claude/commands/(user)

Namespacing

Organize commands in subdirectories:

  • .claude/commands/frontend/component.md/component shows "(project:frontend)"
  • ~/.claude/commands/backend/api.md/api shows "(user:backend)"

Features

Arguments

All arguments - $ARGUMENTS:

Fix issue #$ARGUMENTS following our coding standards
# /fix-issue 123 → "Fix issue #123 following..."

Positional - $1, $2, etc.:

Review PR #$1 with priority $2
# /review 456 high → "Review PR #456 with priority high"

Bash Execution

Execute shell commands inline using the exclamation mark prefix. The allowed-tools field is required in frontmatter:

---
allowed-tools: Bash(git status:*), Bash(git diff:*)
---

Current status: !`git status`
Changes: !`git diff HEAD`

Tip (Boris Cherny): Inline Bash pre-computes context, reducing round-trips with Claude:

# Current branch
!`git branch --show-current`

# Changed files
!`git diff --name-only`

# Based on above, create a PR with...

This pattern is especially powerful for /commit-push-pr style commands where context changes frequently.

File References

Include file contents with @ prefix:

Review @src/utils/helpers.js for issues.
Compare @$1 with @$2.

Frontmatter Options

FieldPurposeRequired
descriptionBrief description for /helpYes
allowed-toolsTools the command can useNo
argument-hintExpected arguments hintNo
modelSpecific model to useNo
disable-model-invocationPrevent Skill tool invocationNo
hooksHooks for command executionNo

See references/frontmatter.md for detailed reference.

Hooks in Commands

Define hooks that run during command execution:

---
description: Deploy to staging with validation
hooks:
  PreToolUse:
    - matcher: "Bash"
      hooks:
        - type: command
          command: "./scripts/validate-deploy.sh"
---

Examples

See references/examples.md for complete examples:

  • Simple review/explain commands
  • Commands with positional arguments
  • Git workflow commands with bash execution
  • Namespaced commands for frontend/backend

Creation Workflow

  1. Identify the use case: What prompt do you repeat often?
  2. Choose scope: Project (shared) or personal (private)?
  3. Initialize: Run ./run.sh scripts/init_command.py <name>
  4. Edit: Update description and body
  5. Test: Run the command in Claude Code

Triggers

This skill activates when users want to:

  • Create a new slash command for Claude Code
  • Update or modify an existing slash command
  • Learn about slash command syntax or frontmatter options
  • Understand best practices for command design
  • Organize commands with namespacing

Extension Points

  1. init_command.py customization: Modify the template generation script to match organizational standards or add custom frontmatter fields
  2. Frontmatter schema: Add custom frontmatter fields for organization metadata (e.g., owner, category, version)
  3. Command templates: Create reusable command templates in assets/ for common patterns (review, deploy, test workflows)

Anti-Patterns

Avoid these common mistakes when creating slash commands:

  • Overly complex commands: Commands should do one thing well; split complex workflows into multiple commands
  • Missing descriptions: Always include a description for discoverability
  • Hardcoded paths: Use arguments ($1, $2) instead of hardcoding file paths
  • Excessive bash execution: Prefer Claude's tools over shell commands
  • No argument hints: For commands with arguments, include argument-hint

Design Rationale

Why Markdown format? Markdown is readable, versionable, and familiar. YAML frontmatter provides structured metadata without sacrificing readability.

Why separate project/personal scopes? Project commands are shared via VCS. Personal commands are private and portable across projects.

Why namespacing? Subdirectories prevent naming conflicts and organize commands by domain, making large command libraries manageable.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon