Awesome-omni-skill claude-code-slash-commands
This skill should be used when the user asks to "create a command", "write a slash command", "build a plugin command", or wants to add custom commands to Claude Code.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tools/claude-code-slash-commands" ~/.claude/skills/diegosouzapw-awesome-omni-skill-claude-code-slash-commands && rm -rf "$T"
manifest:
skills/tools/claude-code-slash-commands/SKILL.mdsource content
Slash Command Development
Create custom slash commands for Claude Code.
Quick Reference
You MUST read these references for detailed guidance:
- Official Documentation - Anthropic's slash command guide
Command Structure
Commands are Markdown files in specific locations:
| Scope | Location | Description suffix |
|---|---|---|
| Project | | |
| Personal | | |
| Plugin | in plugin root | |
Basic Command
--- description: Brief description of what this command does --- Your prompt instructions here.
Frontmatter Options
--- allowed-tools: Bash(git:*), Read argument-hint: [filename] [options] description: What this command does model: claude-3-5-haiku-20241022 disable-model-invocation: false context: fork ---
| Field | Purpose |
|---|---|
| Tools the command can use |
| Shows in autocomplete (e.g., ) |
| Brief description (required for SlashCommand tool) |
| Specific model to use |
| Prevent programmatic invocation |
| Run in isolated sub-agent context, preventing side effects on main agent state |
Arguments
All arguments:
Fix issue #$ARGUMENTS following our coding standards
Positional arguments:
Review PR #$1 with priority $2 and assign to $3
Dynamic Content
<!-- NOTE: Avoid isolated special chars in backticks due to bug #12762 --> <!-- See: https://github.com/anthropics/claude-code/issues/12762 -->Bash execution (prefix with exclamation mark):
Current branch: EXCLAMATION`git branch --show-current` Recent commits: EXCLAMATION`git log --oneline -5`
Replace EXCLAMATION with the exclamation mark character - workaround for bug #12762.
File references (prefix with at-sign):
Review the implementation in @src/utils/helpers.js
Namespacing
Subdirectories group related commands:
→.claude/commands/frontend/test.md
shows/test(project:frontend)
→.claude/commands/backend/test.md
shows/test(project:backend)
Checklist
- Description filled in frontmatter
-
if command takes argumentsargument-hint -
if using Bash or specific toolsallowed-tools - Test with
style invocation/command-name --help