Commands Cheatsheet
FreshSkill 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>.mdPriority 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
| Syntax | Expands To | Example |
|---|---|---|
$ARGUMENTS | All args | /skill foo bar -> foo bar |
$ARGUMENTS[0] | First arg | /skill foo bar -> foo |
$ARGUMENTS[1] | Second arg | /skill foo bar -> bar |
$0 | Shorthand for $ARGUMENTS[0] | Same as above |
$1 | Shorthand for $ARGUMENTS[1] | Same as above |
${CLAUDE_SESSION_ID} | Session ID | sess_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
SkillCommon 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. PushResearch 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
| Variable | Purpose |
|---|---|
SLASH_COMMAND_TOOL_CHAR_BUDGET | Override skill description context budget |
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD | Set 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