agentinit / rules
Cursor rule1 starsChanged 12 days agoMITView on GitHub
Authoring rules for registry fragments (rules and workflows bundled with the CLI)
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,144 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 repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/agentinit-vitest.mdcCursor rule
- .cursor/rules/git-commits.mdcCursor rule
- .cursor/rules/io-safety.mdcCursor rule
- .cursor/rules/pure-modules.mdcCursor rule
- .cursor/rules/tests.mdcCursor rule
- commit-changesSkill
- implement-taskSkill
- new-featureSkill
- pr-summarySkill
- refactorSkill
- review-archSkill
- review-taskSkill
- write-fragmentSkill
- write-testsSkill
The file
We split this registry-content.mdc into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
ALWAYS follow PRD §4.4: valid frontmatter, file name = <id>.md, folder matches category.
- Very specific: line 12
ALWAYS verify every directive against the current official docs for the appliesTo version before writing it.
- Very specific: line 13
ALWAYS use the 3-part formula for rules: Boundary → Directives (ALWAYS / NEVER / PREFER / FORBID / DEFAULT) → Good vs.
- Distinctive: line 15
Keep bodies ≤ 120 lines (workflows ≤ 60).
- Very specific: line 17
Use placeholders for commands ({{scripts.test}}, {{pm}}).
- Distinctive: line 18
NEVER instruct agents to move or restructure existing files, run network commands, install packages, read secrets, or disable safeguards.
- Very specific: line 20
Run pnpm registry:check before finishing.
≈ “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: Authoring rules for registry fragments (rules and workflows bundled with the CLI)
globs: registry/**/*.md
alwaysApply: false
---
# Registry Fragments
Fragments are instructions that users' AI agents follow literally. Accuracy matters more than coverage.
- ALWAYS follow PRD §4.4: valid frontmatter, file name = `<id>.md`, folder matches `category`.
- ALWAYS verify every directive against the **current official docs** for the `appliesTo` version before writing it; put those URLs in `sources` and today's date in `verifiedAt`. NEVER rely on memory for API details.
- ALWAYS use the 3-part formula for rules: Boundary → Directives (`ALWAYS` / `NEVER` / `PREFER` / `FORBID` / `DEFAULT`) → Good vs. Anti-Pattern code block.
- Architecture fragments: `## Summary` (≤ 10 lines, copied into users' `AGENTS.md`) and `## Map`. Workflows: `## Purpose`, `## Input`, `## Steps`, `## Output`, `## Guardrails`.
- Keep bodies ≤ 120 lines (workflows ≤ 60). One concern per fragment; no generic advice ("write clean code").
- Globs: one pattern per extension, no braces (`{ts,tsx}`), no commas, use `{{src}}` for the source root.
- Use placeholders for commands (`{{scripts.test}}`, `{{pm}}`); NEVER hard-code `npm`.
- NEVER instruct agents to move or restructure existing files, run network commands, install packages, read secrets, or disable safeguards.
- Workflows are agent-neutral: no tool-specific syntax such as `$ARGUMENTS`.
- Run `pnpm registry:check` before finishing; a human reviews content before merge.
```markdown
<!-- ✅ Good: specific, verifiable, scoped -->
- **NEVER** store server data in Zustand; use TanStack Query for anything fetched from an API.
<!-- ❌ Bad: vague, unverifiable -->
- Try to manage state carefully and keep things organized.
```
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.

