Skip to content

Commands Cheatsheet

Fresh

Skill Locations

bash
# Personal (all projects)
~/.claude/skills/<name>/SKILL.md

# Project (this repo)
.claude/skills/<name>/SKILL.md

# Plugin
<plugin>/skills/<name>/SKILL.md

# Legacy commands (still work)
.claude/commands/<name>.md

Priority Order

enterprise > personal > project (plugin uses namespace, no conflicts)

Frontmatter Fields

yaml
---
name: my-skill                    # /slash-command name (lowercase, hyphens, max 64)
description: What it does         # RECOMMENDED - triggers auto-invocation
argument-hint: "[issue-number]"   # Autocomplete hint
disable-model-invocation: true    # Manual-only (default: false)
user-invocable: false             # Hide from / menu (default: true)
allowed-tools: Read, Grep, Glob   # Restrict tools
model: claude-sonnet-4-5-20250929 # Override model
context: fork                     # Run in subagent
agent: Explore                    # Subagent type (Explore, Plan, general-purpose, custom)
hooks: {}                         # Lifecycle hooks
---

String Substitutions

SyntaxExpands ToExample
$ARGUMENTSAll args/skill foo bar -> foo bar
$ARGUMENTS[0]First arg/skill foo bar -> foo
$ARGUMENTS[1]Second arg/skill foo bar -> bar
$0Shorthand for $ARGUMENTS[0]Same as above
$1Shorthand for $ARGUMENTS[1]Same as above
${CLAUDE_SESSION_ID}Session IDsess_abc123

Dynamic Context

markdown
# Preprocessor syntax - runs before Claude sees content
!`shell command here`

# Example
- PR diff: !`gh pr diff`
- Changed files: !`gh pr diff --name-only`

Permission Rules

# Allow specific skills
Skill(commit)
Skill(review-pr *)    # prefix match

# Deny specific skills
Skill(deploy *)       # prefix match

# Deny all skills
Skill

Common Patterns

Reference Skill (Inline Knowledge)

yaml
---
name: api-conventions
description: API design patterns for this codebase
---
When writing API endpoints...

Task Skill (Manual Trigger)

yaml
---
name: deploy
description: Deploy to production
disable-model-invocation: true
---
1. Run tests
2. Build
3. Push

Research Skill (Forked)

yaml
---
name: deep-research
description: Research a topic thoroughly
context: fork
agent: Explore
---
Research $ARGUMENTS...

Visual Output Skill

yaml
---
name: visualize
description: Generate interactive visualization
allowed-tools: Bash(python *)
---
Run the script...

Environment Variables

VariablePurpose
SLASH_COMMAND_TOOL_CHAR_BUDGETOverride skill description context budget
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MDSet to 1 to load CLAUDE.md from --add-dir

Useful Commands

bash
# Check what skills are available
"What skills are available?"

# Check context budget
/context

# Invoke with arguments
/my-skill arg1 arg2

# Add external skill directories
claude --add-dir /path/to/skills

Built with VitePress + Claude Code Skills RAG Chat