Blog
Rules vs skills: Cursor, Claude Code, Copilot and Codex
Published: October 28, 2026
A rule is an instruction the agent gets without asking for it: in every session, or whenever it touches a matching file. A skill is a folder with a SKILL.md that the agent loads only when the task matches its description, or when you call it by name. Write short facts and constraints as rules, and procedures as skills. Cursor, Claude Code, GitHub Copilot and Codex all read SKILL.md under one open standard. Rules mostly do not travel between them, and AGENTS.md is the closest thing to a shared one.
Every fact below is from the vendors' docs, read on 28 October 2026 (Claude Code 2.1.312). All four changed this part in 2026, so check the linked page before you trust a row.
What is the difference between rules and skills?
When the text reaches the model. An instruction gets into a session in one of four ways:
- Always. Loaded at the start of every session. Rules only.
- By path. Loaded when the agent reads or edits a file that matches a glob. Rules, in every tool but Codex. Cursor and Claude Code skills can take a
pathsfilter too. - By description. Only the name and description sit in context, and the agent reads the rest when it decides the task needs it. This is what a skill is. Cursor and VS Code also let a rule work this way.
- By name. You call it with
/name,@nameor$name. Skills and Cursor's Apply Manually rules, plus the commands and prompt files that skills are taking over.
So the cost differs. Every always-on line is in every prompt. A skill costs its description on every turn and its body only when used. Claude Code's skills docs say every listed skill “adds to your context on every turn, whether or not Claude ever uses it,” and Codex caps its opening skill list at 2% of the context window.
Rules vs skills in Cursor, Claude Code, Copilot and Codex
| Loads | Cursor | Claude Code | GitHub Copilot | Codex |
|---|---|---|---|---|
| Always | Always Apply rules, AGENTS.md and User Rules | CLAUDE.md, and .claude/rules files without paths | .github/copilot-instructions.md, and AGENTS.md on the surfaces that read it | AGENTS.md, from the repo root down to your folder |
| By path | A rule with globs | A rule with paths, or a subfolder's CLAUDE.md | An .instructions.md with applyTo | None. A subfolder AGENTS.md loads only if you start Codex there |
| By description | Apply Intelligently rules, and skills | Skills only | Skills, and in VS Code an .instructions.md with a description | Skills |
| By name | @rule (Apply Manually), a skill or a subagent from the / menu | A skill as /skill-name; custom commands are now skills | A skill or a prompt file as /name | $skill or /skills; custom prompts are deprecated |
Sources: Cursor rules and skills, Claude Code memory and skills, GitHub's repository instructions, VS Code's custom instructions, Codex AGENTS.md and skills.
Cursor rules vs skills: which should you use?
Cursor's help page gives each one a line. Rules are “short coding guidelines and constraints,” included in every conversation or every matching one. Skills are “multi-step workflows and procedures,” used on demand. “Use a rule when a short instruction is enough.”
The overlap is the Apply Intelligently rule, which the agent picks by its description, exactly as it picks a skill. Since Cursor 2.4 (22 January 2026), the built-in /migrate-to-skills turns those rules and your slash commands into skills. It leaves Always Apply and glob rules alone, “as they have explicit triggering conditions that differ from skill behavior.”
Subagents are a third thing: a Cursor subagent runs in its own context window and hands a result back. For a simple, single-purpose task, its docs say, use a skill.
Are Cursor rules deprecated?
No. The rules docs carry no such notice, and only the old root .cursorrules file is legacy (see Cursor rules best practices). Commands are another story: Cursor's commands docs URL now redirects to the help page's “How do I migrate commands to skills?” section.
Does Claude Code have rules like Cursor?
Yes. Markdown files in .claude/rules/ load at launch, and a paths list in a file's frontmatter makes it load only when Claude works on a matching file. That is Cursor's globs under another name. Since 2.1.288 it includes files Claude writes or edits, and since 2.1.293 a single-file cat, head, tail, sed -n or grep in Bash (changelog). There is no rule that loads by description. In Claude Code, that job is a skill's.
Claude Code does not read .cursor/rules. Per its memory docs, /init reads .cursor/rules, .cursorrules and .github/copilot-instructions.md and works the relevant parts into the CLAUDE.md it writes, and /import appends a one-time copy of another agent's files. Both are copies, so they drift from the next edit.
On the skills side, “custom commands have been merged into skills”: a file in .claude/commands/ and a skill in .claude/skills/ make the same /name. The Claude-only comparison, with hooks and subagents, is in CLAUDE.md vs skills vs hooks.
Copilot instructions vs skills
.github/copilot-instructions.md goes with every request, and .github/instructions/*.instructions.md files with an applyTo glob join it for matching files. In VS Code an instructions file can also carry a description, and the agent “can also load an instructions file on demand when its description matches the current task.”
Copilot skills live in .github/skills, .claude/skills or .agents/skills, with personal ones in ~/.copilot/skills or ~/.agents/skills, for the CLI, the cloud agent, code review and IDE agent mode. Prompt files (.github/prompts/*.prompt.md) run only in VS Code's Local harness; elsewhere, VS Code says, write a skill. Which surface reads which instruction file is in copilot-instructions.md vs AGENTS.md.
Can Codex use skills? And what are Codex rules?
Yes. Codex has one instruction file, AGENTS.md, read from the project root down to your folder, and it reads skills from .agents/skills in every folder from where you start up to the repository root, and from ~/.agents/skills. It picks one by description, or you name it with $; allow_implicit_invocation: false in a skill's agents/openai.yaml stops the implicit pick. Custom prompts are deprecated in favour of skills.
“Rules” means something else in Codex. A .rules file, written in Starlark under a rules/ folder such as ~/.codex/rules/, decides which commands Codex may run outside the sandbox: allow, prompt or forbidden. Codex enforces it; the model does not read it. The docs call it experimental. More in Codex skills and why Codex ignores AGENTS.md.
AGENTS.md vs skills: what works in every tool?
Skills travel better than rules. The Agent Skills spec asks for a folder with a SKILL.md, a name (lowercase letters, numbers and hyphens, up to 64 characters, matching the folder) and a description of up to 1,024 characters. paths, disable-model-invocation and user-invocable are each tool's extras, not the standard, so do not count on them in another tool.
| File | Cursor | Claude Code | GitHub Copilot | Codex |
|---|---|---|---|---|
SKILL.md in .agents/skills | Yes | No | Yes | Yes |
SKILL.md in .claude/skills | Yes | Yes | Yes | No |
| AGENTS.md | Root and subfolders | Only with no CLAUDE.md, or through @AGENTS.md | Cloud agent, CLI, VS Code chat, code review on GitHub.com | Root down to your folder |
| Path-scoped rule | .cursor/rules with globs | .claude/rules with paths | .instructions.md with applyTo | None |
Claude Code is the gap for skills: the request to read .agents/skills, #31005, is still open. Keep one copy in .agents/skills and link each skill into .claude/skills (the recipe is in Codex skills); Cursor and Copilot read both folders, so check that each skill shows up once. For rules, keep the always-on ones in AGENTS.md and import it from CLAUDE.md (AGENTS.md vs CLAUDE.md). Path-scoped rules have to be written once per tool.
When should you write a rule, and when a skill?
- True for every task, in a line or two: an always-on rule. Keep the set short; it is in every prompt.
- True for one part of the code: a path-scoped rule, so it stays out of unrelated work.
- A procedure: steps, a script, a template, long reference. A skill. Claude Code's docs say to make one when “a section of CLAUDE.md has grown into a procedure rather than a fact.”
- Something you start on purpose, like a deploy or a release: a skill the model cannot pick on its own, with
disable-model-invocation: truein Claude Code, Cursor and VS Code, orallow_implicit_invocation: falsein Codex. - Something that must never happen: neither. Both are context. Claude Code's memory docs say to use a PreToolUse hook “to block an action regardless of what Claude decides,” and a forbidden Codex rule refuses the command. The free CLAUDE.md and AGENTS.md checker reads a rule file and writes the deny rules and hooks for the lines that must hold.
Where Harbor fits
Rules and skills are both files somebody writes after a decision was made somewhere else, and then writes again in each tool's format. Harbor is shared memory for AI coding agents. It learns from where your team decides (Slack, pull request reviews, docs and agent sessions), lets you set what waits for a person, and gives Claude Code, Cursor, Codex and GitHub Copilot the rules that apply to each task. To keep the same rules in every agent without it, see how to share memory and rules across tools.
Questions
What is the difference between Cursor rules and skills?
Rules are short guidelines Cursor adds to every chat, or to chats that touch matching files. Skills are SKILL.md folders the agent loads when their description fits the task, or when you pick one from the slash menu. Since Cursor 2.4, the built-in migrate-to-skills skill turns agent-decided rules and slash commands into skills; Always Apply and glob rules stay rules.
Does Claude Code read Cursor rules?
No. Claude Code reads CLAUDE.md, .claude/rules and, when there is no CLAUDE.md, AGENTS.md. Its init command reads .cursor/rules and .cursorrules once and works them into the CLAUDE.md it writes. The Claude Code equivalent of a glob rule is a file in .claude/rules with paths frontmatter.
Are Cursor rules deprecated?
No, as of 28 October 2026. Cursor's rules docs carry no deprecation notice; only the old root .cursorrules file is legacy. Cursor's commands docs page now redirects to its guide on migrating commands to skills.
Copilot instructions vs skills: which should I use?
Use .github/copilot-instructions.md for short rules every request needs, and .instructions.md files with applyTo for rules about some paths. Use a skill in .github/skills, .claude/skills or .agents/skills for a procedure Copilot should load only when the task calls for it.
Can one SKILL.md work in Cursor, Claude Code, Copilot and Codex?
Yes, if it keeps to the Agent Skills standard: a folder, a name and a description. No single folder reaches all four as of 28 October 2026. Claude Code reads .claude/skills, Codex reads .agents/skills, and Cursor and Copilot read both, so keep one copy and symlink it.