quests / rules
Cursor rule464 starsChanged 10 months agoApache-2.0View on GitHub
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 repository7 other files it gives its agents.
- .cursor/rules/general.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/studio-client.mdcCursor rule
- .cursor/rules/tests.mdcCursor rule
- .cursor/rules/workspace.mdcCursor rule
- changelogSkill
- pre-push-reviewSkill
The file
Show its rules and text
We split this typescript.mdc into the rules it gives an agent
15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
NEVER use non-null assertions (!).
- Distinctive: line 7
Avoid casting types unless necessary.
- Very specific: line 8
Avoid any and NEVER use as any.
- Distinctive: line 9
Avoid redefining types and interfaces in every file, if possible, use an existing type or interface.
- Distinctive: line 10
Avoid making component props and object properties optional unless necessary.
- Very specific: line 13
NEVER add comments for sections of JSX like {/* Header */}<Header />
- Distinctive: line 15
Do not fix "Expected {thing} to come before {thing}" errors from perfectionist, they will be fixed automatically after your work is done.
- Distinctive: line 16
Prefer objects for functions with many parameters.
- Very specific: line 17
Don't run tsc to check for type errors, use your built-in diagnostics tool.
- Distinctive: line 20
Prefer inline type declarations when they are short and not exported.
- Very specific: line 21
Prefer object types for functions with identical parameters, e.g.
- Distinctive: line 23
Don't define return types unless necessary.
- Very specific: line 27
Use size- over w- and h- when width and height are the same.
- Very specific: line 28
Use gap-x- or gap-y- over space-x or space-y for gap.
- Very specific: line 32
Prefer z.output over z.infer for type inference.
≈ “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
---
globs: *.ts,*.tsx
alwaysApply: true
---
- NEVER use non-null assertions (`!`). This is forbidden. Always use proper type guards or optional chaining instead.
- Avoid casting types unless necessary. If you do cast, you must add a comment explaining why.
- Avoid `any` and NEVER use `as any`.
- Avoid redefining types and interfaces in every file, if possible, use an existing type or interface.
- Avoid making component props and object properties optional unless necessary.
- We use kebab case for filenames.
- We use non-default exports whenever possible.
- NEVER add comments for sections of JSX like `{/* Header */}<Header />`
- Objects, interfaces, types, and other sortable structures are automatically sorted by the perfectionist ESLint plugin
- Do not fix "Expected {thing} to come before {thing}" errors from perfectionist, they will be fixed automatically after your work is done.
- Prefer objects for functions with many parameters.
- Don't run `tsc` to check for type errors, use your built-in diagnostics tool.
- `"lib": ["es2023", "DOM", "DOM.Iterable"]` is set, so you can use modern features.
- The `radashi` import is installed. Use it for common lodash-style functions.
- Prefer inline type declarations when they are short and not exported.
- Prefer object types for functions with identical parameters, e.g. `({ a, b }: { a: number, b: number }) => number` instead of `(a: number, b: number) => number`.
- Array#reduce() usually results in hard-to-read and less performant code. Instead, prefer .map, .filter, or a for-of loop.
- Don't define return types unless necessary.
## Tailwind Rules
- Use `size-` over `w-` and `h-` when width and height are the same.
- Use `gap-x-` or `gap-y-` over `space-x` or `space-y` for gap.
## Zod Rules
- Prefer `z.output` over `z.infer` for type inference.
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.

