Create custom slash commands for Claude Code including syntax, arguments, bash execution, file references, and frontmatter configuration. Use when creating slash commands, custom commands, .md command files, or when asked about command creation, /command syntax, or command best practices.
View on GitHubmike-coulbourn/claude-vibes
claude-vibes
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/mike-coulbourn/claude-vibes/blob/main/plugins/vibes/skills/slash-command-builder/SKILL.md -a claude-code --skill slash-command-builderInstallation paths:
.claude/skills/slash-command-builder/# Slash Command Builder Create effective custom slash commands for Claude Code with proper structure, dynamic features, and best practices. ## Quick Reference **Command File Location**: - Project (shared): `.claude/commands/name.md` - Personal (individual): `~/.claude/commands/name.md` **Dynamic Features**: - Arguments: `$ARGUMENTS` (all) or `$1`, `$2`, `$3` (positional) - Bash execution: [execute: command] (requires `allowed-tools: Bash(...)`) - File references: `@path/to/file` **Frontmatter**: Optional YAML with `description`, `allowed-tools`, `argument-hint`, `model` ## The Slash Command Creation Workflow ### Phase 1: Requirements Gathering Use AskUserQuestion to understand what they need: 1. **What should the command do?** - What task or prompt does it automate? - What's the expected outcome? 2. **Who will use it?** - Just you (personal command) - Your team (project command) 3. **Does it need dynamic inputs?** - Fixed prompt (no arguments) - User-provided values (arguments needed) - Context from system (bash execution) - File contents (file references) 4. **What tools should it access?** - Read-only analysis (Read, Grep, Glob) - Git operations (Bash(git:*)) - Full access (default, no restrictions) ### Phase 2: Choose Scope **Personal Command** (`~/.claude/commands/`): - Your individual shortcuts - Experimental commands - Personal workflow automation - Not shared with team **Project Command** (`.claude/commands/`): - Team-shared commands - Standardized workflows - Committed to git - Available to all team members ### Phase 3: Design the Structure Basic command structure: ```markdown --- description: Brief description for /help allowed-tools: Optional tool restrictions argument-hint: Optional argument guidance --- [Your prompt here] ``` **Decision tree**: 1. Start with basic prompt 2. Add arguments if needed ($ARGUMENTS or $1/$2) 3. Add bash execution if context needed ([execute: command]) 4. Add file references