Blog / Basics
Agent Skills vs Cursor Rules vs Windsurf Rules
Agent Skills are folders with a SKILL.md; Cursor and Windsurf rules are single files with activation modes. Where each lives, what loads when, and which to use.

Rules are single markdown files that tell an editor's agent how to behave. Agent Skills are folders that can carry scripts and reference files. The two have started to overlap, and Cursor now reads skills too.
Table of contents
- The short answer
- What Agent Skills are
- What Cursor rules are
- What Windsurf rules are
- Fact table
- How loading differs
- Moving content between them
- Pick skills if, pick Cursor rules if, pick Windsurf rules if
- What Ragspaces adds
- Common mistakes
- FAQ
The short answer
If you only need a few always-on conventions for one repository, a rules file is enough, and it is the simplest option in both Cursor and Windsurf. If you want a reusable procedure that carries its own scripts and reference documents, and that you can move between tools, write an Agent Skill.
The reason this comparison is less clean than it was a year ago: the editors added skills support. Cursor's docs state that Cursor supports Agent Skills, with each skill being "a folder containing a SKILL.md file," and that it "also loads .claude/skills/ and .codex/skills/" (Cursor skills docs, checked 2026-11-23). Windsurf's documentation now lives on the Devin docs site and describes skills in similar terms, with the legacy .windsurf/skills/ folder still read (Devin skills docs). So the real question is no longer "rules or skills" as rival formats. It is "which job belongs in an always-on rule and which belongs in a skill".
I build AI agents full-time and I move the same instructions between Claude Code and editors regularly. My rule of thumb:
- A convention that should apply to every edit in a repository ("use pnpm, not npm") is a rule.
- A multi-step procedure with files that should load only when needed ("run the release checklist") is a skill.
- A convention that matters only when certain files are open is a rule with a glob, or a skill with
paths.
This article is built from the official documentation for each tool and from Ragspaces catalog pages, all read on 2026-11-23. Every row in the comparison comes from what the vendor itself documents. Where a doc is silent, the table says so.
What Agent Skills are
An Agent Skill is a folder with a SKILL.md file. Anthropic's overview says Skills follow a three-level loading model: the name and description are always loaded ("~100 tokens per Skill"), the body loads when the skill triggers ("under 5k tokens"), and bundled files load "as needed" (Agent Skills overview). Scripts are different again: Claude "runs them through bash and receives only the output (the script code itself never enters context)."
A minimal skill looks like this:
---
name: release-checklist
description: Run the release checklist for this repository. Use when the user asks to cut a release, bump the version or draft a changelog.
---
1. Run the test suite and stop on the first failure.
2. Bump the version in package.json.
3. Draft the changelog from merged pull requests. See references/changelog-style.md.
The format is an open standard. The Claude Code docs say "Claude Code skills follow the Agent Skills open standard, which works across multiple AI tools" (Claude Code skills docs), and OpenAI's Codex docs say skills "build on the open agent skills standard" with name and description required (Codex skills docs). Cursor and the Devin/Windsurf docs now describe the same folder layout. That portability is the main thing a skill has over a rule.
Locations differ by tool, and the table below lists them. For Claude Code, the personal folder is ~/.claude/skills/<skill-name>/SKILL.md and the project folder is .claude/skills/<skill-name>/SKILL.md. The post on how to install Claude Code skills walks through both.
What Cursor rules are
Cursor's rules are described in its docs as a way to give the agent persistent instructions. Project rules live in .cursor/rules and are "version-controlled and scoped to your codebase." Each rule is an .mdc file: "Project rules must use the .mdc extension," and a plain .md file in that folder is "ignored by the rules system because it has no frontmatter" (Cursor rules docs, checked 2026-11-23).
The frontmatter has three fields named in the docs: description, globs and alwaysApply. Those map to four rule types: "Always Apply," "Apply Intelligently," "Apply to Specific Files," and "Apply Manually." A rule might look like this:
---
description: Conventions for the React components in this repo
globs: src/components/**/*.tsx
alwaysApply: false
---
- Use function components and named exports.
- Keep one component per file.
- Put tests next to the component as Component.test.tsx.
Cursor also supports AGENTS.md: "Cursor supports AGENTS.md in the project root and subdirectories," and the docs call it "a simple markdown file for defining agent instructions." Its size advice is direct: "Keep rules under 500 lines" and split larger ones into composable rules.
The older .cursorrules file at the repository root is not mentioned on Cursor's rules page (checked 2026-11-26), which does not say whether it is deprecated. If you inherit a repository with one, check the current Cursor docs and your installed version before relying on it.
You can see how rules get written in practice in the Ragspaces catalog, where several authors have published skills that repackage Cursor rules. nextjs-react-redux-typescript-cursor-rules by @hannahlee is described as "Comprehensive Next.js, React, Redux, and TypeScript development guidelines covering SOLID principles, component architecture, and best practices." python-odoo-cursor-rules by @rosakowalski covers Python and Odoo development with ORM, XML views and module architecture. Both are rule sets that someone converted into a skill folder, which is the migration this article is about.
What Windsurf rules are
Windsurf's documentation has moved. The old docs.windsurf.com memories page redirects to docs.devin.ai/desktop/cascade/memories, and the current page tells you to "put one rule per file in .devin/rules/*.md." It also says ".devin/global_rules.md is a single always-on file," and that "the legacy .windsurf/rules/*.md, .windsurf/global_rules.md, and .windsurfrules files are imported by default" (Devin rules docs, checked 2026-11-23).
Rules there use a trigger: frontmatter value with four modes, each described in the docs:
trigger: value |
When the rule applies (docs wording) |
|---|---|
always_on |
"Every session" |
glob |
"When the agent works with files matching globs" |
model_decision |
"When the agent decides the rule's description is relevant" |
manual |
"Only when you invoke it" |
The page does not mention a character limit per rule file, so I will not state one. AGENTS.md, AGENTS.local.md and AGENT.md are all read as always-on rules, and AGENTS.local.md is intended for personal rules kept out of version control.
One caution about naming. The Devin skills page documents Devin Local, "which shares its harness with Devin CLI," and mentions Windsurf only for the legacy folder paths. I am therefore treating the Windsurf rules story as "legacy paths still imported, new paths under .devin/", and I would confirm in your own installed version which folder it actually reads.
Fact table
| Agent Skills (Claude Code) | Cursor rules | Windsurf / Devin rules | |
|---|---|---|---|
| Unit | Folder with SKILL.md (Claude Code docs) |
.mdc file (Cursor docs) |
One markdown file per rule (Devin docs) |
| Project location | .claude/skills/<name>/SKILL.md (Claude Code docs) |
.cursor/rules (Cursor docs) |
.devin/rules/*.md; legacy .windsurf/rules/*.md imported (Devin docs) |
| Global location | ~/.claude/skills/<name>/SKILL.md (Claude Code docs) |
No file; User Rules are set in Customize → Rules (Cursor docs) | .devin/global_rules.md, always on (Devin docs) |
| Frontmatter | name, description, optional fields; "Only description is recommended" (Claude Code docs) |
description, globs, alwaysApply (Cursor docs) |
trigger: plus globs and description (Devin docs) |
| Activation | Model reads the description and decides; or /name; disable-model-invocation: true for manual only (Claude Code docs) |
Always, intelligently, by file glob, or manually (Cursor docs) | always_on, glob, model_decision, manual (Devin docs) |
| Carries scripts and references | Yes, as files beside SKILL.md (Agent Skills overview) |
A single file per rule; skills are the folder format (Cursor skills docs) | A single file per rule; skills are a separate feature (Devin skills docs) |
| Size guidance | Body under 500 lines (best practices) | "Keep rules under 500 lines" (Cursor docs) | Not listed |
Reads AGENTS.md |
Reads it only when there is no CLAUDE.md (memory docs) | Yes, root and subdirectories (Cursor docs) | Yes, always-on (Devin docs) |
| Reads Agent Skills | Yes | Yes, including .claude/skills/ and .agents/skills/ (Cursor skills docs) |
Yes, .agents/skills/ and legacy .windsurf/skills/ (Devin skills docs) |
Two cells need a comment. The size row for skills and Cursor rules coincides at 500 lines, but they measure different things: Anthropic's figure is for the SKILL.md body, and Cursor's is for one rule file. And the "Reads AGENTS.md" row for Claude Code comes from the memory docs: "By default, Claude reads AGENTS.md only when you have no CLAUDE.md in your working directory or above it."
How loading differs
All three formats are trying to solve the same problem: put the right instructions in front of the model without paying for them on every turn. They do it differently.
An always-on rule costs context on every request, because that is what always-on means. Cursor's "Always Apply" type and Devin's always_on trigger both work that way, and so do AGENTS.md files in both tools. This is the right trade for short, universal conventions and the wrong one for anything long.
A glob rule narrows the cost to the files that matter. Cursor's "Apply to Specific Files" and Devin's glob trigger load the rule "when the agent works with files matching globs." If your convention only concerns React components, a glob stops it from appearing in an unrelated Python edit.
A description-triggered rule moves the decision to the model. Cursor's "Apply Intelligently" and Devin's model_decision use the rule's description, in the same way a skill does. The model sees a short description and pulls in the body when it looks relevant.
A skill goes one step further, because the body is only the second of three levels. The Claude Code docs say "In a regular session, skill descriptions are loaded into context so Claude knows what's available, but full skill content only loads when invoked." Then files under references/ load only if the body tells the model to read them, and scripts run without their source entering context. Cursor describes the same folders: scripts/ is "Executable code that agents can run," and references/ is "Additional documentation loaded on demand."
That last step is the practical difference. A rule file is one body. A skill is a body plus an arbitrary amount of material that costs nothing until it is read. If your instructions are short, there is no gain. If your instructions include a 40-page style guide, a skill lets you keep it out of context until the task needs it.
There is also a ceiling on how much description text a tool will show. Claude Code truncates the combined description and when_to_use text at 1,536 characters in the listing, and the listing budget "scales at 1% of the model's context window" (Claude Code skills docs). Codex's list "uses at most 2% of the model's context window" by default (Codex docs). The Cursor and Devin docs do not state a listing budget.
Moving content between them
Rules to skill
Most people moving from Cursor rules to skills have a folder of .mdc files that grew over time. A reasonable split:
- Keep short, universal conventions in
AGENTS.md. Both Cursor and Devin read it, and Claude Code reads it when there is noCLAUDE.md. If you use Claude Code with aCLAUDE.md, one line importing the file with@AGENTS.mdkeeps a single source of truth; the Claude Code memory docs describe the@path/to/importsyntax. - Turn each procedure into a skill. The rule's
descriptionfrontmatter becomes the skill'sdescription, rewritten to say what the skill does and when to use it. - Replace
globswith a description that names the file types, or with thepathsfield Cursor documents for skills. - Move long reference sections into
references/and link them from the body.
A converted rule:
---
name: react-components
description: Conventions for React components in this repository. Use when creating or editing files under src/components or when the user asks for a new component.
---
- Use function components and named exports.
- Keep one component per file.
- Put tests next to the component as Component.test.tsx.
Save it as .agents/skills/react-components/SKILL.md. Cursor reads .agents/skills/ and the Devin docs say the same folder is read, and Codex scans .agents/skills as well, so one copy serves several tools. Claude Code reads .claude/skills/ instead, and Cursor also loads that path. If you use Claude Code alongside another tool, check which folder each one reads on your installed versions, because my sources list only the paths above.
Skill to rules
Going the other way is lossy. A rule cannot carry a script, so a skill that depends on scripts/ has no direct rule equivalent. You can inline short commands into the rule body, or keep the skill. In my experience that is the signal to stay with skills: if the instruction needs a file next to it, it was never a rule.
The post on SKILL.md vs CLAUDE.md vs AGENTS.md covers the Claude Code side of the same question, and Claude Code skills in Codex covers the cross-tool path for the OpenAI side.
Pick skills if, pick Cursor rules if, pick Windsurf rules if
Pick Agent Skills if:
- the instructions are a procedure with steps, scripts or reference files;
- you use more than one tool (Claude Code, Codex, Cursor), and want one folder to serve all of them;
- the instructions are long, and you want them out of context until needed;
- you want to share or sell the instructions as a unit.
Pick Cursor rules if:
- the content is a short convention that should apply to a repository or a set of files;
- you live in Cursor and want
alwaysApplyorglobsto decide when it loads, with no model judgement involved; - you want the rule committed to
.cursor/rulesand reviewed in pull requests like code.
Pick Windsurf (Devin) rules if:
- you want one-rule-per-file conventions with an explicit
trigger:mode; - you have legacy
.windsurf/rules/files that are still imported and do not want to move them yet; - you need a personal, uncommitted rule file, which
AGENTS.local.mdcovers.
Pick AGENTS.md if you want one plain file that Cursor, Devin and Codex all read, and your instructions are short. The Codex docs say it reads global and project AGENTS.md files, stops at a project_doc_max_bytes limit of 32 KiB by default, and concatenates files "from the root down."
What Ragspaces adds
Ragspaces is an open catalog of 5,299 agent skills for Claude Code and Codex (home page count on 2026-11-23). It deals with the skill column of this comparison and nothing else: it does not store Cursor .mdc files or Windsurf rule files as such, and it does not manage AGENTS.md.
What it does that a repository folder does not: free skills install into your own Claude Code or Codex with one command, a hook uploads a skill when your agent saves it, and a background watcher on another computer downloads changes "within a minute." Visibility per skill is private, followers or public. Every skill page shows its description, README and reviews with no account (how it works).
If you only use Cursor and have a handful of rules, committing .cursor/rules to the repository is simpler than any catalog, and I would do that.
To see how people package guidance as skills, a few catalog pages (as of 2026-11-23):
- cursor-best-practices by @tarav: "Best practices for working with Cursor," written as a skill.
- agents-md by @mayaj: creates and maintains concise
AGENTS.mdandCLAUDE.mdproject instruction files. - creating-claude-md by @marcoy: bootstraps a
CLAUDE.mdfor a new repository. - claude-md-improver by @andrebrown29: audits and improves existing
CLAUDE.mdfiles. - skill-creator by @oscar_schmidt: a guide for creating new skills, useful when you convert a rule.
Each description above is quoted from the skill's catalog page.
Common mistakes
Saving a Cursor rule as .md. The docs say a plain .md file in .cursor/rules "is ignored by the rules system because it has no frontmatter." Use .mdc.
Putting a long procedure in an always-on rule. It costs context on every request. Put it in a skill, or make the rule description-triggered.
Writing a vague description. Rules with model_decision or "Apply Intelligently" and skills both depend on the description for activation. Anthropic's best practices give the example "Helps with documents" as a bad description, and a good one that names what the skill does and when to use it.
Assuming every tool reads the same folder. Paths differ, and the docs for each tool name different ones. Check before you copy.
Duplicating the same instructions in AGENTS.md, a rule and a skill. The tools may load more than one, and your context pays twice. Pick one home per instruction.
Frequently asked questions
Does Cursor support Agent Skills?
Yes. Cursor's docs say each skill is a folder with a SKILL.md file, in .cursor/skills/ or .agents/skills/ for a project, or ~/.cursor/skills/ or ~/.agents/skills/ for your user account. Cursor also loads .claude/skills/ and .codex/skills/.
What is the difference between Cursor rules and skills?
A Cursor rule is a single .mdc file in .cursor/rules with description, globs and alwaysApply frontmatter. A skill is a folder with SKILL.md, and it can include scripts/, references/ and assets/ folders that load only when needed.
Where do Windsurf rules live now?
The current docs, on the Devin site, say to put one rule per file in .devin/rules/*.md, with .devin/global_rules.md as an always-on file. The legacy .windsurf/rules/*.md, .windsurf/global_rules.md and .windsurfrules files are imported by default.
Can one SKILL.md work in Cursor, Claude Code and Codex?
The format is shared, so the file can be. Cursor reads .claude/skills/ and .agents/skills/, Codex scans .agents/skills, and Claude Code reads .claude/skills/. Check which folder each installed version reads, and note that optional frontmatter fields differ by tool.
Should I use AGENTS.md instead of rules?
For short conventions shared across tools, yes. Cursor and Devin both read AGENTS.md, and Codex concatenates AGENTS.md files from the root down. Claude Code reads it only when there is no CLAUDE.md. Keep long procedures in skills.
How long should a rule or skill be?
Cursor says to keep rules under 500 lines. Anthropic says to keep the SKILL.md body under 500 lines. The Devin docs give no limit.
Key takeaways
- Cursor and Windsurf (Devin) rules are single files with activation modes. Skills are folders that can carry scripts and references.
- Cursor and the Devin docs now read Agent Skills, so the formats overlap.
- Use rules or
AGENTS.mdfor short, universal conventions and skills for procedures and long reference material. - Check which folder each tool reads before copying a skill between them.
- Windsurf's docs moved to the Devin site; confirm the folder names in your installed version.
The bottom line
Keep short conventions in a rule or AGENTS.md, where they are simple and reviewable, and keep procedures in skills, where they can carry files and load on demand. Because Cursor and the Devin docs read skill folders now, the skill is the more portable of the two, and the rule is the more convenient one for a single editor.
If you want to read real SKILL.md files before converting your own rules, browse the Ragspaces catalog. Skill pages show the description, README and reviews with no account.
Related articles
- SKILL.md vs CLAUDE.md vs AGENTS.md: where instructions belong and what loads when.
- Claude skills vs MCP servers vs plugins: the other format split people confuse with this one.
- Claude Code skills in Codex: carrying the same folder to a different tool.
About this research
Dmitry Makarenko co-founded Zipy as VP R&D, leading 50+ engineers across five countries, and now builds AI agents full-time. (LinkedIn)
This article is based on the Cursor rules and skills documentation, the Devin (formerly Windsurf) rules and skills documentation, the Claude Code and Agent Skills documentation, OpenAI's Codex documentation and Ragspaces catalog pages, all read on 2026-11-23. Content reviewed and updated: 2026-11-26
Keep reading
GitHub Copilot vs Cursor vs Claude Code: Agent Skills (2026)
The same SKILL.md folder in GitHub Copilot, Cursor and Claude Code: where each looks, required frontmatter, how skills load, and what breaks when you move one.
Skill Pack vs Single Skills: Bundle or Pick One by One?
A pack installs many skills at once; single skills install one job at a time. What each costs in context, updates and trust, with live examples to check.
Claude Code Skill Not Working? Causes and Fixes
Skill not loading or never triggering in Claude Code? Work through 11 causes with a check and fix each: folder, frontmatter, name, description, budget, reload.