Skills vs Rules vs Commands: Which AI Tool When?
Claude Code gives you three ways to teach the agent something. They overlap. Picking the wrong one turns clean instructions into prompt soup.

Claude Code's instruction surface has three layers - Skills, Rules, and Commands - and the difference between them looks subtle until you've used them wrong for a few weeks. The fix is a clear mental model for what each one is for.
What is a Skill?
Lazy-loaded instructions for specific situations.
A Skill is a markdown file under .claude/skills/ (per-project) or ~/.claude/skills/ (user-wide) that Claude Code loads on demand when its name or description matches what the user is doing. The full spec is in the official Claude Code documentation.
Skills win when the instructions are long, specific, and only relevant some of the time. Examples that work well: 'how to deploy a Cloudflare Pages site', 'how to generate a hotel page from the scrape pipeline', 'how to run the daily SEO maintenance routine'. Each could be 5-10 pages of detailed steps. Loading all of them into every session would waste the context budget; loading 'deploy a Cloudflare Pages site' only when the user mentions deploying is the lazy-load that makes long skills practical.
What is a Rule?
Always-on guardrails that don't ask permission.
A Rule (the hard policy lines that always apply) lives in CLAUDE.md at the project root, in your global system prompt, or in a similar always-loaded location. Rules cost context every session, so they're for guidelines that matter every session.
Examples worth Rule treatment: 'never commit .env or credential files', 'never push to git without explicit user permission', 'always run tests before claiming a fix is complete', 'use British English for content on UK-targeted sites'. Each is short, each applies broadly, each prevents a costly mistake if missed.
The opposite of a Rule is an instruction that's only relevant in one workflow - that should be a Skill. Don't put 'how to deploy' in CLAUDE.md; you're paying for that context every session even when you're never going to deploy.
What is a Command?
User-triggered shortcuts to specific workflows.
A Command is something you type (the /name prefix) to trigger a workflow on demand. /release, /deploy, /seo-audit - each one runs a defined sequence of steps without you re-explaining the workflow every time.
Commands and Skills overlap in obvious ways - both can encapsulate a multi-step workflow. The split: Commands are TRIGGERED by you typing them; Skills are LOADED automatically when the model decides they're relevant. If the workflow is something you want explicit control over invoking ('don't run the deploy unless I say so'), make it a Command. If it's something the model should reach for when context warrants ('apply the dog-friendly-hotel page format when generating a hotel review'), make it a Skill.
Many workflows benefit from both - a Skill that documents how to do X, plus a Command that triggers running X with explicit user intent.
Bottom line
Three layers, three purposes.
Most working Claude Code setups end up with: CLAUDE.md as a thin file holding 5-15 hard rules (never commit X, always do Y, use British English), a Skills directory with 10-30 markdown files covering the repeatable workflows, and a handful of Commands for the workflows that should only fire on explicit intent.
The mistake most people make on day one is dumping everything into CLAUDE.md because it's the only file the docs introduce up front. The mistake some people make a few months in is putting genuinely-always-needed guardrails into Skills because 'Skills are the new thing'. The decision tree above keeps both errors away.