Author custom Claude Code slash commands as reusable Markdown prompt templates. Covers frontmatter configuration, argument handling, variable substitution, and workflow automation patterns. Invoke when designing new commands, debugging command syntax, or converting repetitive prompts into reusable shortcuts.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Author custom Claude Code slash commands as reusable Markdown prompt templates. Covers frontmatter configuration, argument handling, variable substitution, and workflow automation patterns. Invoke when designing new commands, debugging command syntax, or converting repetitive prompts into reusable shortcuts.
Slash Command Creator
Create effective Claude Code slash commands - reusable prompt templates stored as Markdown files.
Quick Reference
Scope
Location
Label in /help
Project
.claude/commands/*.md
(project)
Personal
~/.claude/commands/*.md
(user)
File Structure
---
description: Brief description shown in /help
argument-hint: <required> [optional]
allowed-tools: Bash(git *), Read, Edit
model: sonnet
disable-model-invocation: false
---
Your prompt template here with $ARGUMENTS or $1, $2, etc.
Variables
Variable
Description
Example
$ARGUMENTS
All args as single string
/cmd foo bar -> "foo bar"
$1, $2...
Positional args
/cmd foo bar -> $1="foo", $2="bar"
@path/file
Include file contents
Review @src/main.py
`!command`
Execute bash, include output
`!git status`
Frontmatter Fields
Field
Purpose
Default
description
Shown in /help, enables discoverability
First line of prompt
argument-hint
Shows in autocomplete
None
allowed-tools
Restrict tool access
Inherits from conversation
model
Override model
Inherits from conversation
disable-model-invocation
Prevent auto-invocation
false
Creation Process
Identify the workflow - What repetitive task needs automation?
Clear descriptions - Help discoverability in /help
Single responsibility - One task per command
Use argument hints - Guide users on expected input
Version control - Check into git for team sharing
Abstract patterns - Make commands reusable across scenarios
References
Consult these resources when creating slash commands:
examples.md - Read when you need complete working examples or want to show the user reference implementations. Covers git workflows, code review, documentation, testing, scaffolding, and utilities.
patterns.md - Read when implementing specific features: variable handling, file inclusion (@path), bash execution (`!cmd`), tool restrictions, multi-step workflows, or output formatting.
template.md - Starting template for new commands. Copy and customize the structure.