Back to Skills

slash-command-creator

verified

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 slash command syntax, frontmatter options, or best practices.

View on GitHub

Marketplace

wlab-claude-code-marketplace

Wondermove-Inc/wlab-claude-code-marketplace

Plugin

plugin-creator

development

Repository

Wondermove-Inc/wlab-claude-code-marketplace

plugins/plugin-creator/skills/slash-command-creator/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/Wondermove-Inc/wlab-claude-code-marketplace/blob/main/plugins/plugin-creator/skills/slash-command-creator/SKILL.md -a claude-code --skill slash-command-creator

Installation paths:

Claude
.claude/skills/slash-command-creator/
Powered by add-skill CLI

Instructions

# Slash Command Creator

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

## Quick Start

Initialize a new command:
```bash
scripts/init_command.py <command-name> [--scope project|personal]
```

## Command Structure

Slash commands are Markdown files with optional YAML frontmatter:

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

Your prompt instructions here.

$ARGUMENTS
```

### File Locations

| Scope    | Path                    | Shown 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`:
```markdown
Fix issue #$ARGUMENTS following our coding standards
# /fix-issue 123 → "Fix issue #123 following..."
```

**Positional** - `$1`, `$2`, etc.:
```markdown
Review PR #$1 with priority $2
# /review 456 high → "Review PR #456 with priority high"
```

### Bash Execution

Execute shell commands with `!` prefix (requires `allowed-tools` in frontmatter):

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

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

### File References

Include file contents with `@` prefix:

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

## Frontmatter Options

| Field                     | Purpose                                | Required |
|---------------------------|----------------------------------------|----------|
| `description`             | Brief description for /help            | Yes      |
| `allowed-tools`           | Tools the command can use              | No       |
| `argument-hint`           | Expected arguments

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2550 chars