Skills vs Rules in Claude Code and Cursor: When to Use Each

August 2026 · Published by Amar Kumar

Developers setting up Claude Code or Cursor often ask: should this go in a rule or a skill? They paste a 40-step release checklist into CLAUDE.md, then wonder why Claude ignores half of it. Or they create a skill for "use 2-space indent" and it never loads.

Rules are persistent instructions — loaded every session or when matching files are read. They shape how Claude behaves while editing.

Skills are on-demand playbooks — loaded when you invoke them or when the task clearly matches. They shape how Claude completes a specific workflow.

Related: How to Use Claude Code Effectively · Skills vs MCP vs Subagents

One-line definitions

RulesSkills
What it isPersistent instruction fileOn-demand workflow playbook
AnalogyHouse rules on the wallRecipe card you pull out when cooking
LoadedEvery session, or when matching files are readWhen invoked (/skill-name) or task matches description
Best forConventions, constraints, "always do X"Multi-step procedures, checklists, domain workflows
Context costPaid upfront (or on file read)Paid only when used

Rules = always-on behavior. Skills = sometimes-on procedure.

Where rules and skills live

Claude Code

TypePathScope
Root rulesCLAUDE.md or .claude/CLAUDE.mdEvery session
Modular rules.claude/rules/*.mdEvery session, or on demand if path-scoped
Path-scoped rules.claude/rules/api.md with paths:When Claude reads matching files
Skills.claude/skills/{name}/SKILL.mdOn invoke or auto when relevant

Cursor

TypePathScope
Project rules.cursor/rules/*.mdcWhen rule's glob/trigger matches
Skills.cursor/skills/{name}/SKILL.mdOn invoke or auto when relevant

Cursor rules use .mdc with optional globs / alwaysApply. Claude Code rules use plain .md with optional paths: frontmatter. The concept is the same.

Side-by-side comparison

DimensionRulesSkills
Primary jobTell agent how to behaveTell agent how to complete a task
Typical contentStyle, conventions, boundariesStep-by-step checklist, scripts
LengthShort — bullets and constraintsCan be longer — procedures OK
TriggerSession start or file path match/release or description match
Good example"API handlers return { data, error }""Ship a release: bump version, changelog, tag, deploy"
Bad example30-step deploy checklist"Use TypeScript strict mode"

When to use rules

Put content in rules when:

Good rule topics

When to use skills

Put content in a skill when:

Good skill topics

Write the description field like a search query — vague descriptions mean the skill never auto-loads.

Example: a rule file

File: .claude/rules/testing.md

---
paths:
  - "**/*.test.ts"
  - "**/*.spec.ts"
  - "tests/**/*"
---

# Testing conventions

- Use Vitest, not Jest
- One `describe` block per exported function
- Mock external HTTP at the boundary, not internal helpers
- Run `pnpm test path/to/file.test.ts` after editing a test file
- Never skip tests without a comment explaining why

Why this is a rule: Constraints that apply whenever Claude edits test files — no multi-step workflow.

Cursor equivalent

---
globs: "**/*.{test,spec}.ts,tests/**"
---

# Testing conventions
(same bullets)

Example: a skill file

File: .claude/skills/ship-blog-post/SKILL.md

---
name: ship-blog-post
description: >-
  Publish a stackcone blog post — md source, HTML page, posts.json,
  sitemap.xml, syntax highlighting. Use when user asks to ship or
  publish a blog post.
---

# Ship a blog post

## Steps

1. Write `blog/md/{slug}.md` (markdown source, not public URL).
2. Write `blog/posts/{slug}/index.html` (canonical published page).
3. Download hero images to `blog/images/{slug}/` — no hotlinks.
4. Add entry to `blog/posts.json` with author "Amar Kumar".
5. Add URL to `sitemap.xml`.
6. Update static listing in `blog/index.html`.
7. Run `python3 _dev/apply_highlights.py blog/posts/{slug}/index.html`.

## Do not

- Create redirect stub files
- Generate AI hero images when real logos exist

Optional supporting files:

.claude/skills/ship-blog-post/
├── SKILL.md
├── template-snippet.md
└── scripts/check-sitemap.sh

Invoke manually: /ship-blog-post my-new-slug

Same task — wrong vs right

TaskWrongRight
Always run tests before committingSkill with one bulletRule in CLAUDE.md
How we deploy to production25-step deploy in CLAUDE.mdSkill deploy-production/SKILL.md
React components use named exportsSkill with vague descriptionPath-scoped rule for src/components/**
Fix GitHub issue #842Rule in CLAUDE.mdSkill with disable-model-invocation: true

How they compose with CLAUDE.md

CLAUDE.md          → facts true everywhere (build cmd, layout, git rules)
.claude/rules/     → conventions scoped by topic or file path
.claude/skills/    → procedures you run on demand

Example stack:

CLAUDE.md                    # pnpm test, never push main, project map
.claude/rules/
  ├── python-style.md        # no paths → loads every session
  ├── api-design.md          # paths: src/api/**
  └── database.md            # paths: src/db/**
.claude/skills/
  ├── add-endpoint/SKILL.md
  ├── run-migration/SKILL.md
  └── incident/SKILL.md

Run /context to see what's loaded. If the list is huge, move procedures to skills and narrow rules with paths.

Decision flowchart

Is this a multi-step procedure (5+ ordered steps)?
  YES → Skill
  NO  → Does it apply every session regardless of task?
          YES → CLAUDE.md or unconditional .claude/rules/*.md
          NO  → Does it apply only when editing certain files?
                  YES → Path-scoped rule (paths: or globs:)
                  NO  → CLAUDE.md if short; skill if rare workflow

Common mistakes

  1. Release checklist in CLAUDE.md — move to a skill.
  2. Style rules in a skill — belongs in a rule.
  3. Vague skill description — write like a search query.
  4. Duplicate content — same instruction in three places.
  5. Giant skill — split by trigger.
  6. Rules without paths in monorepos — frontend rules loading during backend work.
  7. Expecting rules to enforce — use settings.json or hooks for hard blocks.

FAQ

What is the difference between skills and rules in Claude Code?

Rules are persistent instructions for conventions and constraints. Skills are on-demand playbooks for multi-step workflows.

Should a release checklist be a rule or a skill?

A skill. Multi-step procedures belong in SKILL.md, not CLAUDE.md.

Can a skill reference a rule?

Yes. Rules set defaults; skills orchestrate workflows that respect them.

Rules vs CLAUDE.md?

CLAUDE.md is the root rules file. .claude/rules/ splits it into modules. Use paths: to defer loading.

Skills vs MCP?

Rules and skills are instructions. MCP is plumbing to external systems. See Skills vs MCP vs Subagents.

Bottom line

Sticky note on your monitor → rule. Runbook in a drawer → skill.