Skip to content
AI agents · Workflow

Cursor rules that load

How to decide between AGENTS.md, Cursor .mdc rules, skills and hooks, write front matter that loads, and check that a rule is really attached.

Verified install Not agent-tested v1.0.0 MIT updated any
Equips
  • 2 2 Rules
  • 1 1 Skills
  • – 0 MCP

Most ignored rules are not ignored: they never loaded. Common causes are globs written as a YAML list, alwaysApply set alongside globs, descriptions that do not say when to use the rule, and legacy .cursorrules files. This loadout gives your agent a decision table for where an instruction belongs, the four Cursor rule types with correct front matter, Copilot applyTo equivalents, and a skill that writes a rule and checks it attaches.

What's in it

  • Decision table: AGENTS.md vs scoped rule vs skill vs hook
  • The four .mdc rule types with front matter that works
  • Fix list for rules that never attach
  • Copilot .instructions.md applyTo equivalent
  • Auto-attached meta-rule for editing rules
Level 1 · automated

Verification

Verified install

Checked at commit 316f4bc · 8 passed, 0 failed, 2 not applicable

CheckResultWhat we found
Listinglisting.yaml matches the schema and declares every file in the folder. Pass
Schema valid; 6 files declared, none missing or extra
  • tested.status: untested (agent tests are separate from Level 1)
Files parseJSON parses; SKILL.md and .mdc front matter is valid YAML with the fields each agent needs; code fences are closed. Pass All 6 files parse; front matter valid
AdaptersCLAUDE.md imports @AGENTS.md, GEMINI.md imports @./AGENTS.md, and both match the generator. Pass
CLAUDE.md and GEMINI.md import AGENTS.md and are up to date
  • CLAUDE.md: matches the generator
  • GEMINI.md: matches the generator
Install pathsEvery file lands where each agent documents it, with no collisions, and the laid-out project is re-discovered correctly. Pass
Correct paths for all 6 agents; layouts re-discovered
  • Claude Code: 4 files, 1 skill in .claude/skills/
  • Codex CLI: 3 files, 1 skill in .agents/skills/
  • Cursor: 4 files, 1 skill in .agents/skills/, 1 rule
  • Gemini CLI: 4 files, 1 skill in .agents/skills/
  • Antigravity CLI: 3 files, 1 skill in .agents/skills/
  • GitHub Copilot: 3 files, 1 skill in .agents/skills/
MCP configmcp.json is structurally valid, converts to each agent's format, declares no literal secrets, and referenced packages exist on npm/PyPI. Not applicable No MCP servers in this loadout
Safety scanThe intake scanner finds no credentials, risky shell, hidden Unicode or prompt-injection wording, and the listing's network flag is honest. Pass
Clean: no credentials, risky shell or hidden text
  • Scanner intake-precheck/1: verdict clean; network no (listing says no)
ReferencesLinks and file paths between the loadout's files resolve, including for each agent's installed layout. Pass 4 references between files resolve for every agent
Size limitsFile count and sizes are within the submission limits; SKILL.md bodies stay under 500 lines. Pass
6 files, 5.8 KB total; largest AGENTS.md 1.8 KB
  • Limits: 30 files, 32 KB per file, 128 KB total, 500 lines per skill or rule
LicenceA recognised SPDX licence, with the licence text available. Pass MIT, by Agent Loadout; text in the repository LICENSE
Starter buildA minimal fixture project with the loadout applied installs and builds or type-checks, and the loadout's own code examples compile. Not applicable
Not applicable: rule-writing guidance with no project or code to build
  • The loadout is guidance, one auto-attached .mdc rule and examples; whether a rule attaches can only be observed inside Cursor.
  • The .mdc front matter is still checked for valid keys.
  • Every other Level 1 check still runs on this loadout.

What this means: a script checked the files themselves: they parse, they install where each agent looks, any MCP config is sound, the safety scan is clean, references between files resolve, and, where a free and repeatable fixture exists, a small starter project builds with the loadout applied. No AI agent was run. Per-agent results ("tested with agent") are separate and stay untested until an agent actually runs.

Install

Choose your agent. Run the commands from your project root, or download a zip already laid out in the right folders.

Claude Code reads CLAUDE.md (imports AGENTS.md with @AGENTS.md) and skills from .claude/skills/.

Download zip
curl -fsSL --create-dirs -o AGENTS.md https://loadout.jnw-it.com/raw/cursor-rules-that-load/1.0.0/AGENTS.md
curl -fsSL --create-dirs -o CLAUDE.md https://loadout.jnw-it.com/raw/cursor-rules-that-load/1.0.0/CLAUDE.md
curl -fsSL --create-dirs -o .claude/skills/write-cursor-rule/SKILL.md https://loadout.jnw-it.com/raw/cursor-rules-that-load/1.0.0/skills/write-cursor-rule/SKILL.md
curl -fsSL --create-dirs -o .claude/skills/write-cursor-rule/references/examples.md https://loadout.jnw-it.com/raw/cursor-rules-that-load/1.0.0/skills/write-cursor-rule/references/examples.md
FileGoes to
AGENTS.mdAGENTS.md
CLAUDE.mdCLAUDE.md
skills/write-cursor-rule/SKILL.md.claude/skills/write-cursor-rule/SKILL.md
skills/write-cursor-rule/references/examples.md.claude/skills/write-cursor-rule/references/examples.md

Already have an AGENTS.md or CLAUDE.md? The commands above overwrite it — download the file instead and merge the sections you want.

Files

Rules AGENTS.md Where instructions belong and how Cursor rule types load. 29 lines
Download Raw
# AGENTS.md: writing agent rules that actually load

Rules only help if the agent loads them at the right moment. Decide where each instruction goes before writing it.

## Pick the container
| Instruction | Put it in |
|---|---|
| Applies to every task (build/test commands, hard constraints) | `AGENTS.md` |
| Applies to some files (`*.tsx`, `migrations/**`) | Cursor rule with `globs`; Copilot `.instructions.md` with `applyTo`; or a nested `AGENTS.md` |
| A procedure used sometimes (release, migration, triage) | A skill: `.agents/skills/<name>/SKILL.md` |
| Must never happen (force-push, reading `.env`) | A hook or permission deny rule. Text rules are advice; hooks enforce |

## Cursor rule types (`.cursor/rules/*.mdc`)
Front matter has three keys only: `description`, `globs`, `alwaysApply`.
- Always: `alwaysApply: true`. Use for very few rules; each costs context in every chat.
- Auto-attached: `globs: src/**/*.tsx` and `alwaysApply: false`. Loads when a matching file is in context.
- Agent-requested: `description` set, no `globs`, `alwaysApply: false`. The agent reads the description and decides; write the description as "Use when …".
- Manual: no description, no globs. Loads only when someone types `@rule-name`.

## Writing rules
- One topic per rule file, under ~60 lines. Imperative sentences. Show the exact command or code shape.
- Say what to do, not only what to avoid. Pair each "never" with the alternative.
- Do not restate defaults the agent follows anyway.
- `.cursorrules` is legacy. Move its content into `.cursor/rules/` or `AGENTS.md` and delete it.
- `.cursor/rules` does not apply to Bugbot code review; review rules go in `.cursor/BUGBOT.md`.
- Long rules that are really procedures become skills. Cursor's `/migrate-to-skills` converts agent-requested rules.

Use the `write-cursor-rule` skill to add or fix a rule, and test that it loads.
Adapter CLAUDE.md Imports AGENTS.md for Claude Code. 10 lines
Download Raw
# CLAUDE.md

@AGENTS.md

## Claude Code notes
- Skills from this loadout live in `.claude/skills/`: `write-cursor-rule`. Use them when their description matches the task.
- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.

<!-- From the Agent Loadout "Cursor rules that load" v1.0.0 — https://loadout.jnw-it.com/loadouts/cursor-rules-that-load/ -->
Adapter GEMINI.md Imports AGENTS.md for Gemini CLI. 10 lines
Download Raw
# GEMINI.md

@./AGENTS.md

## Gemini CLI notes
- Skills from this loadout live in `.agents/skills/`: `write-cursor-rule`. Use them when their description matches the task.
- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.

<!-- From the Agent Loadout "Cursor rules that load" v1.0.0 — https://loadout.jnw-it.com/loadouts/cursor-rules-that-load/ -->
Cursor rule .cursor/rules/rule-authoring.mdc Auto-attached rule for editing .mdc files. 12 lines
Download Raw
---
description: Use when creating or editing Cursor rules, AGENTS.md files or skills in this repository.
globs: .cursor/rules/**/*.mdc
alwaysApply: false
---

- Front matter keys: `description`, `globs`, `alwaysApply`. Nothing else is read.
- Write `globs` as a comma-separated string of patterns (the documented form). If a rule never attaches, check for a YAML list first.
- Auto-attached rules need `alwaysApply: false`; with `true` the globs are ignored.
- Keep each rule to one topic and under ~60 lines. Move procedures into `.agents/skills/<name>/SKILL.md`.
- After editing, check it loads: open a matching file, start a new chat and ask which rules are active.
Skill skills/write-cursor-rule/SKILL.md Write or fix a rule and check it attaches. 21 lines
Download Raw
---
name: write-cursor-rule
description: Add, split or fix a Cursor rule (.mdc) so it loads at the right time, and check it loads. Use when asked to write a rule, when a rule is ignored, or when converting .cursorrules.
---

# Write a Cursor rule

1. **Decide the container** with the table in AGENTS.md. If it belongs in `AGENTS.md`, a skill or a hook, do that instead and stop.
2. **Pick the type**: always, auto-attached (globs), agent-requested (description) or manual. Default to auto-attached.
3. **Write the file** at `.cursor/rules/<topic>.mdc`, using `references/examples.md` as the pattern. Topic names are kebab-case.
4. **Check the front matter**: only `description`, `globs`, `alwaysApply`; globs as a comma-separated string.
5. **Test it loads**: tell the human to open a file the globs match, start a new chat and ask "Which rules are attached?".
   For agent-requested rules, ask a question the description covers and check the rule is pulled in.
6. **Remove duplicates**: delete the same instruction from `AGENTS.md`, `.cursorrules` or other rules.

## Fixing an ignored rule
- `alwaysApply: true` with globs: globs do nothing. Pick one.
- Globs written as a YAML list: rewrite as one string, `src/**/*.ts, src/**/*.tsx`.
- Description that says what the rule is ("TypeScript rules") instead of when to use it ("Use when editing API handlers").
- Rule too long or contradicting `AGENTS.md`: shorten, and make `AGENTS.md` the single source.
Skill file skills/write-cursor-rule/references/examples.md Example rules for each type, plus a Copilot equivalent. 48 lines
Download Raw
# Example rules

Auto-attached, scoped to React components:

```markdown
---
description: React component conventions.
globs: src/components/**/*.tsx
alwaysApply: false
---

- Function components only; props typed with an exported `type <Name>Props`.
- Data fetching lives in hooks under `src/hooks/`, never inside components.
- Every new component gets a story in the same folder: `<Name>.stories.tsx`.
```

Agent-requested, no globs:

```markdown
---
description: Use when writing or changing a database migration.
alwaysApply: false
---

- Create migrations with `npm run db:new -- <name>`; never edit an applied migration.
- Every migration is reversible: write the down step and run `npm run db:rollback` locally before committing.
```

Always on (keep these rare and short):

```markdown
---
alwaysApply: true
---

- Package manager is pnpm. Never run npm or yarn install.
```

Copilot equivalent of the first example, at `.github/instructions/components.instructions.md`:

```markdown
---
applyTo: "src/components/**/*.tsx"
---

- Function components only; props typed with an exported `type <Name>Props`.
```

All files: source zip · Licence MIT · By Agent Loadout · First listed

Credits

Public work that inspired this loadout. The wording here is our own; follow the links for the originals.

Installing and testing

How do I install Cursor rules that load in Claude Code?

From your project root, put AGENTS.md, CLAUDE.md, skills/write-cursor-rule/SKILL.md at .claude/skills/write-cursor-rule/SKILL.md, skills/write-cursor-rule/references/examples.md at .claude/skills/write-cursor-rule/references/examples.md. The "Claude Code" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/cursor-rules-that-load/claude-code.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Cursor rules that load in Codex CLI?

From your project root, put AGENTS.md, skills/write-cursor-rule/SKILL.md at .agents/skills/write-cursor-rule/SKILL.md, skills/write-cursor-rule/references/examples.md at .agents/skills/write-cursor-rule/references/examples.md. The "Codex CLI" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/cursor-rules-that-load/codex.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Cursor rules that load in Cursor?

From your project root, put AGENTS.md, .cursor/rules/rule-authoring.mdc, skills/write-cursor-rule/SKILL.md at .agents/skills/write-cursor-rule/SKILL.md, skills/write-cursor-rule/references/examples.md at .agents/skills/write-cursor-rule/references/examples.md. The "Cursor" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/cursor-rules-that-load/cursor.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Cursor rules that load in Gemini CLI?

From your project root, put AGENTS.md, GEMINI.md, skills/write-cursor-rule/SKILL.md at .agents/skills/write-cursor-rule/SKILL.md, skills/write-cursor-rule/references/examples.md at .agents/skills/write-cursor-rule/references/examples.md. The "Gemini CLI" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/cursor-rules-that-load/gemini-cli.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Cursor rules that load in Antigravity CLI?

From your project root, put AGENTS.md, skills/write-cursor-rule/SKILL.md at .agents/skills/write-cursor-rule/SKILL.md, skills/write-cursor-rule/references/examples.md at .agents/skills/write-cursor-rule/references/examples.md. The "Antigravity CLI" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/cursor-rules-that-load/antigravity-cli.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Cursor rules that load in GitHub Copilot?

From your project root, put AGENTS.md, skills/write-cursor-rule/SKILL.md at .agents/skills/write-cursor-rule/SKILL.md, skills/write-cursor-rule/references/examples.md at .agents/skills/write-cursor-rule/references/examples.md. The "GitHub Copilot" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/cursor-rules-that-load/copilot.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

Has Cursor rules that load been tested?

It passed the Level 1 automated install checks on 2026-10-17: the files parse, install to each agent's documented paths, and pass the safety scan. No AI agent has run it yet, so no agent pass or fail is claimed.

More for Claude Code, Codex, Cursor, Gemini CLI, Antigravity CLI and GitHub Copilot.