Claude Code has two extension concepts:
| Concept | Structure | Invocation | Metadata |
|---|---|---|---|
| Command | Single .md file |
/command |
Minimal (description) |
| Skill | Directory with SKILL.md |
/skillname or keywords |
Rich (allowed-tools, depends-on, triggers) |
Skills get slash-hint discovery via trigger keywords in their description and load on-demand, making them more efficient for complex functionality.
Most functionality lives in skills, not commands. Only session management and experimental features remain as commands.
commands/ # Minimal (3 files)
sync.md # Session bootstrap
save.md # Session persistence
canvas.md # Experimental TUI
skills/ # Everything else (38 directories)
explain/
SKILL.md # Core logic + expert routing
testgen/
SKILL.md # Core logic
frameworks.md # Language-specific examples
review/
SKILL.md # Core logic
spawn/
SKILL.md # Agent generation
atomise/
SKILL.md # AoT reasoning
setperms/
SKILL.md # Tool permissions
introspect/
SKILL.md # Session log analysis
...
---
name: explain
description: "Deep explanation of complex code. Triggers on: explain, deep dive, how does X work, architecture."
allowed-tools: "Read Glob Grep Bash Task"
compatibility: "Uses ast-grep, tokei if available."
depends-on: []
related-skills: ["structural-search", "code-stats"]
---
# Skill Name
[Core logic, execution steps, patterns]
skills/testgen/
SKILL.md # Core logic
frameworks.md # Go, Rust, Python, TS examples (loaded on demand)
visual-testing.md # Chrome DevTools integration (loaded on demand)
allowed-tools, depends-on, related-skills/skillname hints| Scenario | Use |
|---|---|
| Session management | Command (sync, save) |
| Experimental/WIP | Command (canvas) |
| Everything else | Skill |
| Scenario | Use |
|---|---|
| Needs trigger-based discovery | Skill |
| Needs explicit tool permissions | Skill |
| Needs reference files | Skill |
| Needs dependency tracking | Skill |
| Complex multi-step workflow | Skill |
Skills can be invoked multiple ways:
/explain, /testgen, /reviewSkill tool invocation with args| Skill | Purpose | Trigger Keywords |
|---|---|---|
explain |
Deep code explanation | explain, deep dive, how does X work |
spawn |
Agent generation | spawn agent, create agent, new expert |
atomise |
AoT reasoning | atomise, complex reasoning, decompose |
setperms |
Tool permissions | setperms, init tools, setup project |
introspect |
Session log analysis | introspect, session history, what did we do |
review |
Code review | code review, review changes, check code |
testgen |
Test generation | generate tests, write tests, add coverage |
skills/{name}/ directorySKILL.md with proper frontmatter:
name: kebab-case, matches directorydescription: Include trigger keywordsallowed-tools: Space-separated listplugin.json under components.skillsIf you have a command that should be a skill:
skills/{name}/SKILL.mdcommands/{name}.mdplugin.json:
components.commandscomponents.skills