Commands vs Skills Complete Comparison
Claude Code.claude/commands/ vs .claude/skills/ โ When to Use Which
When creating custom automations in Claude Code, it's common to be confused about whether to use Commands or Skills. Here are the key differences.
Biggest Difference: Auto-execution
Commands only run when the user explicitly calls /name. Skills can also be called this way, but Claude can also auto-trigger them based on task context. For example, writing Rails code may auto-trigger the rspec-test-generator skill.
Second Difference: File Structure
Commands are just a single commands/name.md file. Skills are a skills/name/ directory containing SKILL.md (main instructions) + references/ (reference docs) + other support files.
Third Difference: Complexity
Commands suit simple "do this" prompts. Skills suit complex tasks needing multi-step workflows, reference documents, and template patterns.
Selection Criteria
Simple repetitive tasks (commit messages, blog style selection, etc.) โ Command
Complex workflows (app scaffolding, PR review, SEO audit, etc.) โ Skill
Commands vs Skills Comparison
| Criteria | .claude/commands/ | .claude/skills/ |
|---|---|---|
| Invocation | Manual only via /command-name | /skill-name or Claude auto-triggers based on context |
| Structure | Single .md file |
Directory (SKILL.md + references/ + support files) |
| Complexity | Simple prompt/instruction | Complex workflows + reference docs |
| Auto-trigger | No โ manual call only | Yes โ specify trigger conditions in description |
| Arguments | $ARGUMENTS |
$ARGUMENTS (same) |
| Reference Files | No โ everything in one .md file | Yes โ specs, guides, templates in references/ folder |
When to Use Which?
Use Command When
- ✓ Blog entry generation (/blog-comparison)
- ✓ Commit message generation (/commit)
- ✓ PR creation (/pr)
- ✓ Simple one-page instructions
Use Skill When
- ✓ SEO/GEO audit (needs scoring reference docs)
- ✓ Auth scaffolding (needs template code)
- ✓ Auto test generation (auto-trigger on code changes)
- ✓ Multi-step workflows with reference docs
How to Use
Simple repetitive task โ Create .claude/commands/name.md
Complex workflow โ Create .claude/skills/name/SKILL.md + references/
Need auto-trigger โ Specify trigger conditions in Skill description
Need arguments โ Use $ARGUMENTS variable (both Commands and Skills)
Tags
Source
Anthropic Docs