๐ฆด Slash Command
November 28, 2025 ยท View on GitHub
๐ Home โบ ๐ง Implementation โบ ๐ฆ Components โบ ๐ฆด Slash Command
โ ๐ฆ Subagent โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Skill โ
๐ฆด Slash Command
A Slash Command is a user-invokable workflow that starts with
/and triggers predefined prompt sequences.
Key Characteristics
| Property | Value |
|---|---|
| Invocation | ๐โโ๏ธ User types /command-name |
| Location | .claude/commands/*.md |
| Variables | $ARGUMENTS for user input |
| Execution | Synchronous, within main conversation |
File Structure
# .claude/commands/generate.md
---
description: Generate localization files for specified locales
argument-hint: [locale]
---
Generate localization files for: $ARGUMENTS
1. First, identify if this is a single locale or language cluster
2. Check LOCALES-200.csv for valid locales
3. ...
Note: Command name comes from filename (
generate.mdโ/generate).
Frontmatter Reference
| Field | Required | Description |
|---|---|---|
description | Recommended | Brief description (shown in /help) |
argument-hint | No | Expected arguments hint |
allowed-tools | No | Tools without permission prompts |
model | No | Specific model to use |
disable-model-invocation | No | Prevent programmatic invocation |
Usage Examples
/generate fr-FR # Single locale
/generate fr # Language cluster
/generate fr es de # Multiple clusters
Mermaid Representation
%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#64748b'}}}%%
flowchart LR
classDef user fill:#6366f1,stroke:#4f46e5,stroke-width:2px,color:#ffffff
classDef main fill:#8b5cf6,stroke:#7c3aed,stroke-width:2px,color:#ffffff
U["๐โโ๏ธ๐ฅ /generate fr-FR"]:::user --> CMD["๐ฆด Slash Command"]:::user
CMD --> MA["๐๐ญ Main Agent"]:::main
MA --> W["Workflow Execution"]
W --> R["๐โโ๏ธ๐ค Result"]
Advanced: Nested Commands
Commands can reference other files in the .claude/commands/ directory:
# .claude/commands/full-review.md
---
description: Run comprehensive review pipeline
---
Execute the following reviews in sequence:
1. First run /security-review on $ARGUMENTS
2. Then run /performance-review on the same files
3. Finally run /style-check
Tips
- Keep commands focused on single concerns
- Use
argument-hintfor better discoverability - Consider permission modes for destructive operations
- Document expected inputs and outputs
โ ๐ฆ Subagent โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Skill โ