About

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

1

Simple repetitive task → Create .claude/commands/name.md

2

Complex workflow → Create .claude/skills/name/SKILL.md + references/

3

Need auto-trigger → Specify trigger conditions in Skill description

4

Need arguments → Use $ARGUMENTS variable (both Commands and Skills)

Tags

#command #skill #comparison #automation #workflow #claude-code

Source

Anthropic Docs

← CLAUDE.md Writing Guide — Order Optimization & Best Practices Context · Memory · Handoff Complete Guide →