Back to Skills

claude-code-slash-commands

verified

This skill should be used when creating, configuring, or working with Claude Code slash commands. Use when users ask to create custom slash commands, set up command features like arguments or bash execution, or need guidance on slash command structure and best practices.

View on GitHub

Marketplace

emdashcodes-claude-code-plugins

emdashcodes/claude-code-plugins

Plugin

claude-code-meta

development-tools

Repository

emdashcodes/claude-code-plugins
6stars

plugins/claude-code-meta/skills/claude-code-slash-commands/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/emdashcodes/claude-code-plugins/blob/main/plugins/claude-code-meta/skills/claude-code-slash-commands/SKILL.md -a claude-code --skill claude-code-slash-commands

Installation paths:

Claude
.claude/skills/claude-code-slash-commands/
Powered by add-skill CLI

Instructions

# Claude Code Slash Commands

Guide Claude through creating and configuring custom slash commands for Claude Code.

## Purpose

Slash commands let users define frequently-used prompts as Markdown files that Claude can execute on demand. This skill helps create well-structured slash commands with proper frontmatter, arguments, bash execution, and other advanced features.

## When to Use This Skill

Use this skill when:

- Creating new custom slash commands (project or personal)
- Adding arguments, bash execution, or file references to commands
- Configuring frontmatter options (allowed-tools, model, argument-hint, etc.)
- Troubleshooting slash command issues

## Command Types

### Project Commands

- Stored at: `.claude/commands/`
- Shared with the team (versioned in git)
- Shown as `(project)` in `/help`

### Personal Commands

- Stored at: `~/.claude/commands/`
- Available across all projects
- Shown as `(user)` in `/help`

### Plugin Commands

- Stored at: `commands/` in plugin root
- Distributed via plugin marketplaces
- Shown as `(plugin:plugin-name)` in `/help`
- Invoked with `/plugin-name:command-name` or just `/command-name`
- Support all features (arguments, frontmatter, bash, file references)

## Creating Slash Commands

### Quick Creation with Helper Script

Use the bundled creation script for fast, templated command setup:

```bash
# Create project command with basic template
scripts/create_slash_command.sh my-command --project

# Create personal command with advanced template
scripts/create_slash_command.sh my-command --user --template advanced

# Create plugin command (auto-detects plugin from current directory)
scripts/create_slash_command.sh my-command --plugin

# Create plugin command for specific plugin
scripts/create_slash_command.sh my-command --plugin my-plugin-name

# Available templates: basic, arguments, bash, advanced
```

The script is located at: `scripts/create_slash_command.sh`

**Plugin command creation:**

- Use `--plugin` to create com

Validation Details

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