seatbelt / rules
Cursor rule2 starsChanged 2 months agoMITView on GitHub
seatbelt — pre-ship safety rules. Stops secrets in client code or git, tables without row security, routes without auth, open CORS, unverified webhooks.
- Reads credentials
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 1,533 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 repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- seatbeltSkill
The file
We split this seatbelt.mdc into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Every database table gets an ownership rule.
- Distinctive: line 17
Every route that touches user data checks who is asking, then scopes the query to that user.
- Distinctive: line 22
If a rule changes what the user asked for, say so in one line and keep going.
- Very specific: line 26
When the user says ship, deploy, launch, publish, go live, is this safe, or /seatbelt, and after any task that added secrets, tables, …
- Very specific: line 28
Run node .cursor/seatbelt/scan.js .
- Distinctive: line 32
Never skip rules 1 or 4 silently.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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: seatbelt — pre-ship safety rules. Stops secrets in client code or git, tables without row security, routes without auth, open CORS, unverified webhooks. globs: alwaysApply: true --- # seatbelt The user may not be able to read a security audit. Explain in plain English, fix things yourself. ## Rules (always on) 1. Secrets never touch the client or git. Keys, tokens, passwords, private keys live in env vars on the server. If one is in a source file, move it to `.env` and read it from the environment before anything else. 2. `.env` and `.env.*` are in `.gitignore` before the first commit. Keep a `.env.example` with placeholders. 3. Every database table gets an ownership rule. Supabase: enable RLS on every table plus owner-only policies. Firebase: rules check `request.auth`. Never `if true`. 4. `service_role`, admin and secret keys are server-only. Only anon or publishable keys in browser code. Never behind `NEXT_PUBLIC_`, `VITE_`, `REACT_APP_`, `EXPO_PUBLIC_`. 5. Every route that touches user data checks who is asking, then scopes the query to that user. 6. CORS is a list of your domains, not `*`. Never `*` with credentials. 7. Anything that costs money is rate-limited. Webhooks verify signatures before trusting the body. 8. No `eval`, no raw HTML from user input, no debug mode in production. If a rule changes what the user asked for, say so in one line and keep going. ## Pre-ship check When the user says ship, deploy, launch, publish, go live, is this safe, or /seatbelt, and after any task that added secrets, tables, routes, auth or payments: 1. Run `node .cursor/seatbelt/scan.js .` (or wherever scan.js from https://github.com/codegobrrrr9/seatbelt is installed). 2. Fix every critical and high finding. Ask before changing product behavior. 3. Re-run, then report: verdict first (READY / NOT READY), findings in severity order with the rest behind "and N more", each as what + what could happen + what you did or need, then the single next step. No preamble. Never skip rules 1 or 4 silently. A leaked key cannot be un-leaked by a later commit.
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.

