agentleFS
codegobrrrr9codegobrrrr9/seatbelt/AGENTS.md

seatbelt

AGENTS.md2 starsChanged 2 months agoMITView on GitHub

You are reading this because a user pasted something like: Install the seatbelt skill from https://github.com/codegobrrrr9/seatbelt, refer to the repo's AGENTS.md. Do the install for the agent you are, confirm in one line, and then follow the rules below for the rest of the session. Do not explain what seatbelt is unless asked. Pick the row that matches you. <repo> is a clone of this repository, or the raw files fetched from https://raw.githubusercontent.com/codegobrrrr9/seatbelt/main/. Any agent: npx skills add codegobrrrr9/seatbelt installs…

  • Reads credentials
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 33,398 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.

The file

We split this AGENTS.md into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 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.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do the install for the agent you are, confirm in one line, and then follow the rules below for the rest of the session.

    line 7
  2. Very specific:

    After installing, say: seatbelt on.

    line 27
  3. Distinctive:

    Follow these while writing any code.

    line 31
  4. Very specific:

    .env is ignored before the first commit: Add .env and .env.* to .gitignore, and keep a .env.example with placeholder values.

    line 36
  5. Very specific:

    service_role, admin and secret keys are server-only: Only anon or publishable keys go in browser code.

    line 40
  6. Distinctive:

    If a rule changes what the user asked for, say so in one line and keep going.

    line 47
  7. Very specific:

    When the user says ship, deploy, launch, publish, go live, is this safe, or /seatbelt, and before finishing any task that added secrets, …

    line 51
  8. Very specific:

    Run node <path-to>/scan.js .

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

seatbelt — instructions for coding agents

You are reading this because a user pasted something like:

Install the seatbelt skill from https://github.com/codegobrrrr9/seatbelt, refer to the repo's AGENTS.md.

Do the install for the agent you are, confirm in one line, and then follow the rules below for the rest of the session. Do not explain what seatbelt is unless asked.

Install

Pick the row that matches you. <repo> is a clone of this repository, or the raw files fetched from https://raw.githubusercontent.com/codegobrrrr9/seatbelt/main/.

AgentDo this
Claude CodeRun /plugin marketplace add codegobrrrr9/seatbelt then /plugin install seatbelt@seatbelt. If plugins are unavailable, copy <repo>/skills/seatbelt/ to ~/.claude/skills/seatbelt/ (all users) or .claude/skills/seatbelt/ (this project only).
CodexCopy <repo>/skills/seatbelt/ to ~/.codex/skills/seatbelt/, or run npx skills add codegobrrrr9/seatbelt. Also append the Rules section below to the project's AGENTS.md.
CursorCopy <repo>/.cursor/rules/seatbelt.mdc to .cursor/rules/seatbelt.mdc in the project. Copy <repo>/skills/seatbelt/scripts/scan.js to .cursor/seatbelt/scan.js.
Gemini CLIRun gemini extensions install https://github.com/codegobrrrr9/seatbelt.
GitHub CopilotCopy <repo>/.github/copilot-instructions.md into the project's .github/ (merge if one exists).
Windsurf, Cline, Roo, Kilo, Amp, OpenCode, Zed, anything elseAppend the Rules section below to the project's AGENTS.md (or .windsurfrules, .clinerules, whichever the agent reads) and copy scan.js somewhere in the project, for example scripts/seatbelt.js.

Any agent: npx skills add codegobrrrr9/seatbelt installs the skill directory for every agent the skills CLI supports.

After installing, say: seatbelt on. Say "ship it" or /seatbelt for the pre-ship check.

Rules

Follow these while writing any code. They apply without being asked.

  1. Secrets never touch the client or git. API keys, service keys, tokens, passwords and private keys live in environment variables on the server. If one is already in a source file, move it to .env and replace it with an environment read before doing anything else.
  2. .env is ignored before the first commit. Add .env and .env.* to .gitignore, and keep a .env.example with placeholder values.
  3. Every database table gets an ownership rule. Supabase: enable row level security on every table and write 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 go in browser code. Never put a private key 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, not *. Never combine * with credentials.
  7. Anything that costs money is rate-limited and verified. Webhooks verify signatures first.
  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 before finishing any task that added secrets, tables, routes, auth or payments:

  1. Run node <path-to>/scan.js . from the project root (--json for machine output).
  2. Fix every critical and high finding yourself. Ask before changing product behavior, such as adding auth to a route that was meant to be public. skills/seatbelt/references/checks.md has the fix for every check id.
  3. Re-run, then report in this shape, findings in severity order with the rest behind "and N more, ask to see them", no preamble:
NOT READY

1. Your Supabase service key is in src/lib/supabase.js line 8.
   Anyone who opens the site can download your whole database.
   Fixed: moved it to .env as SUPABASE_SERVICE_ROLE_KEY, only server code reads it.

2. /api/admin/users has no login check.
   Anyone who guesses the URL gets the user list.
   Needs you: should this require an admin role, or be removed?

Next step: answer number 2 and I will re-run the check.

or

READY

Checked 42 files. No secrets in code, .env ignored, 3/3 tables protected, 6/6 routes check auth.
This is a code check, not a full audit. Rotate any key that was ever committed.

Overrides

  • User says it is a local-only prototype that will never be deployed: say seatbelt is off for this session, once, and stop.
  • User says skip a specific finding: skip that one, keep the rest.
  • A committed key must be rotated by the user. Say so plainly and name where.

Rules 1 and 4 are never skipped silently. A leaked key cannot be un-leaked by a later commit.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.