config / rules
Cursor rule1 starsChanged 8 days agoApache-2.0View on GitHub
Writing Instruction Files Instructions
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,181 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .apm/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- .cursor/rules/agent-skills.mdcCursor rule
- .cursor/rules/bats.mdcCursor rule
- .cursor/rules/github-actions-workflow.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/go-test.mdcCursor rule
- .cursor/rules/markdown.mdcCursor rule
- .cursor/rules/shell-script.mdcCursor rule
- .cursor/rules/terraform.mdcCursor rule
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- go-validationSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-reviewSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- go-validationSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-reviewSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
The file
We split this instructions.mdc into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Document non-obvious, project- or distribution-specific rules only.
- Distinctive: line 80
TEST-01 (MUST): No Always-Run Lint Mandates
- Distinctive: line 81
TEST-02 (SHOULD): On-Demand Skill Pointer
- Distinctive: line 82
TEST-03 (SHOULD): Domain-Only Operational Notes
- Distinctive: line 86
Keep applyTo precise to distributed rule paths.
- Distinctive: line 87
Do not embed always-run lint/validate recipes or "hooks handle it" skip explanations in always-on instructions.
- Distinctive: line 88
When instruction files are updated, re-evaluate instruction quality against this file's STRUCT/TEST rules.
- Distinctive: line 97
Do not include real secrets (tokens, keys, credentials) in instruction files.
- Distinctive: line 98
Do not make destructive operations the default in command examples.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Writing Instruction Files Instructions globs: **/instructions/*.instructions.md, **/.cursor/rules/*.mdc, **/.kiro/steering/*.md, **/.claude/rules/*.md --- # Instruction Files Instructions ## Scope - Scope covers creating and updating instruction and rule files for agent consumption. ## Standards Document **non-obvious, project- or distribution-specific** rules only. Omit language or ecosystem defaults, generic style guides, and other practices models already know. ### Naming Conventions | Component | Rule | Example | | ----------------------- | ------------------------------------------------- | -------------------------------------------- | | Package source file | `<stem>.instructions.md` | `go.instructions.md`, `bats.instructions.md` | | Cursor (distributed) | `.cursor/rules/<stem>.mdc` | `go.mdc`, `bats.mdc` | | Claude (distributed) | `.claude/rules/<stem>.md` | `go.md`, `bats.md` | | Kiro (distributed) | `.kiro/steering/<stem>.md` | `go.md` | | Title | `# <target> Instructions` | `# Go Instructions` | | Agent-facing cross-link | Companion wording with stem — not source filename | companion Bats rules (stem `bats`) | ## Guidelines ### General (G) - G-01 (MUST): Front Matter - G-02 (MUST): Title - G-03 (MUST): applyTo Target Precision - G-04 (MUST): Portable Cross-References - G-05 (MUST): Companion applyTo Coverage ### Structure (STRUCT) - STRUCT-01 (MUST): Five Required Chapters Exist - STRUCT-02 (MUST): Chapter Order Unified - STRUCT-03 (MUST): Heading Levels Appropriate - STRUCT-04 (SHOULD): Standards Chapter Subsections - STRUCT-05 (MUST): Guidelines Chapter Subsections - STRUCT-06 (MUST): H3 Heading Format - STRUCT-07 (MUST): Concise Testing and Validation Chapter - STRUCT-08 (SHOULD): Critical MUST in Scope ### Guidelines Chapter (GUIDE) - GUIDE-01 (SHOULD): Code Modification Guidelines - GUIDE-02 (SHOULD): Tool Usage - GUIDE-03 (SHOULD): Anti-Patterns - GUIDE-04 (SHOULD): No ID-less Bullet Rules in Guidelines ### Content Quality (QUAL) - QUAL-01 (SHOULD): Practical Examples - QUAL-02 (SHOULD): No Redundancy - QUAL-03 (SHOULD): Token Efficiency ### Consistency (CONS) - CONS-01 (SHOULD): Section Names - CONS-02 (SHOULD): Format - CONS-03 (SHOULD): Internal Consistency ### Completeness (COMP) - COMP-01 (SHOULD): Validation Ownership Clear - COMP-02 (SHOULD): Real Pointers ### Security Guidelines Chapter (SEC) - SEC-01 (MUST): Tool-Undetectable Risks Documented - SEC-02 (MUST): Secrets Management - SEC-03 (MUST): Scope Limited to Document Safety - SEC-04 (SHOULD): Examples ### Standards Chapter (STD) - STD-01 (MUST): Standards Chapter Non-Obvious Content - STD-02 (SHOULD): Tool Standards - STD-03 (MUST): Consistency - STD-04 (MUST): Distribution Naming Documented - STD-05 (MUST): No Guidelines Checklist Duplication in Standards ### Testing and Validation Chapter (TEST) - TEST-01 (MUST): No Always-Run Lint Mandates - TEST-02 (SHOULD): On-Demand Skill Pointer - TEST-03 (SHOULD): Domain-Only Operational Notes ### Code Modification Guidelines - Keep applyTo precise to distributed rule paths; use stem-based companion cross-links (G-03, G-04, G-05). - Do not embed always-run lint/validate recipes or "hooks handle it" skip explanations in always-on instructions. - When instruction files are updated, re-evaluate instruction quality against this file's STRUCT/TEST rules. ## Testing and Validation On-demand validation: see instructions-review skill SKILL.md. ## Security Guidelines - Do not include real secrets (tokens, keys, credentials) in instruction files. - Do not make destructive operations the default in command examples; add explicit warnings when needed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

