cybara
AGENTS.md38 starsChanged 5 months agoMITView on GitHub
Rules for any AI agent or contributor working in this repo. Follow them exactly; they override default habits. Deeper conventions live in CLAUDE.md. - Never use any — not in signatures, casts, generics, or as any. It is banned. - Model real shapes with interface/type. For genuinely unknown input use unknown and narrow it before use (type guards, discriminated unions). - Type every exported function's parameters and return value explicitly. Do not rely on inference across module boundaries. - Avoid…
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 31,439 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 repository76 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 1passwordSkill
- adversarial-ux-testSkill
- api-debugSkill
- apple-notesSkill
- apple-remindersSkill
- authorized-web-pentestSkill
- bear-notesSkill
- birdSkill
- blogwatcherSkill
- blucliSkill
- bluebubblesSkill
- camsnapSkill
- Canvas SkillSkill
- clawdhubSkill
- cloudflare-temporary-deploySkill
- code-reviewSkill
- code-wikiSkill
- coding-agentSkill
- comfyuiSkill
- diagram-makerSkill
- discordSkill
- docker-managementSkill
- domain-intelSkill
- eightctlSkill
- excalidrawSkill
- fal.aiSkill
- fastmcpSkill
- food-orderSkill
- geminiSkill
- gifgrepSkill
- githubSkill
- gogSkill
- goplacesSkill
- himalayaSkill
- imsgSkill
- local-placesSkill
- mactopSkill
- manim-videoSkill
- mcporterSkill
- model-usageSkill
- nano-banana-proSkill
- nano-pdfSkill
- notionSkill
- obsidianSkill
- openai-image-genSkill
- openai-whisper-apiSkill
- openai-whisperSkill
- openhueSkill
- oracleSkill
- ordercliSkill
- oss-forensicsSkill
- peekabooSkill
- phoneSkill
- planSkill
- sagSkill
- session-logsSkill
- sherpa-onnx-ttsSkill
- skill-creatorSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
21 rules. About 0 are common, 11 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Always use Bun commands:
- Very specific: line 16
Never use npm, npx, pnpm, yarn, or corepack.
- Very specific: line 17
Treat bun.lock as the canonical lockfile.
- Very specific: line 18
Prefer Bun-native APIs (Bun.spawn/Bun.spawnSync, Bun.file) over child_process/fs shell-outs.
- Distinctive: line 22
If docs or snippets mention npm-style commands, translate them to Bun equivalents before running.
- Distinctive: line 23
If a third-party instruction cannot run with Bun, stop and propose a Bun-compatible alternative.
- Very specific: line 27
Never use any — not in signatures, casts, generics, or as any.
- Very specific: line 32
Avoid non-null assertions (!).
- Very specific: line 34
If a third-party type is missing, declare a local interface for the slice you use.
- Distinctive: line 35
Keep functions and route handlers returning consistent, fully-typed API shapes (snake_case fields for HTTP responses — see CLAUDE.md).
- Distinctive: line 40
Write code with no comments.
- Very specific: line 41
Do not add header blocks, JSDoc, inline // notes, or commented-out code.
- Distinctive: line 42
Never reference other products, competitors, or external projects anywhere in code or comments.
- Distinctive: line 58
If an edit pushes a file over, extract a cohesive module instead.
- Very specific: line 59
Do not leave dead exports.
- Distinctive: line 63
Every behavior change or fix ships with tests.
- Very specific: line 65
Use bun:test (describe/test/expect) under tests/, mirroring the source path.
- Distinctive: line 66
Test the real contract: security fixes must prove the exploit is blocked (e.g.
- Distinctive: line 69
Prefer fast, dependency-free tests.
- Distinctive: line 71
Keep tests deterministic and isolated.
- Very specific: line 75
Run the full gate and make it green — no skips, no --no-verify:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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.
Files
Cybara Agent Rules
Rules for any AI agent or contributor working in this repo. Follow them exactly;
they override default habits. Deeper conventions live in CLAUDE.md.
Package Manager Policy (Strict)
- Bun is the only allowed JavaScript/TypeScript package manager and task runner.
- Always use Bun commands:
bun installbun add <pkg>bun remove <pkg>bun run <script>bun testbunx <tool>
- Never use
npm,npx,pnpm,yarn, orcorepack. - Treat
bun.lockas the canonical lockfile. - Prefer Bun-native APIs (
Bun.spawn/Bun.spawnSync,Bun.file) overchild_process/fsshell-outs.
Command Translation
- If docs or snippets mention npm-style commands, translate them to Bun equivalents before running.
- If a third-party instruction cannot run with Bun, stop and propose a Bun-compatible alternative.
TypeScript Type Safety
- Never use
any— not in signatures, casts, generics, oras any. It is banned. - Model real shapes with
interface/type. For genuinely unknown input useunknownand narrow it before use (type guards, discriminated unions). - Type every exported function's parameters and return value explicitly. Do not rely on inference across module boundaries.
- Avoid non-null assertions (
!). Handlenull/undefinedwith?.and??. - No
@ts-ignore/@ts-expect-errorto silence real errors — fix the type instead. If a third-party type is missing, declare a localinterfacefor the slice you use. - Keep functions and route handlers returning consistent, fully-typed API shapes
(snake_case fields for HTTP responses — see
CLAUDE.md).
No Comments
- Write code with no comments. Names and structure carry the meaning.
- Do not add header blocks, JSDoc, inline
//notes, or commented-out code. - Never reference other products, competitors, or external projects anywhere in code or comments.
- The rare exception is a short
/* ... */note only when logic is genuinely non-obvious and cannot be made clear by renaming or restructuring; default to none.
DRY & Code Quality
- Extract shared logic into a well-named helper or module; do not copy-paste blocks.
Adapters/handlers that repeat a pattern should share a single utility
(e.g.
channels/access-gate.ts,wallet-url-guard.ts,api/html-escape.ts). - One responsibility per function; keep them small and composable.
- Reuse existing helpers before writing new ones — search first.
- Match the surrounding code's style, naming, and idioms.
- Fail closed on security-sensitive paths (auth, path/URL validation, access control): when in doubt, deny.
- Validate and sanitize all external input (tool args, webhooks, request bodies) at the boundary.
- Hard file cap: no TypeScript file may exceed 5000 LOC (
bun run check:loc). If an edit pushes a file over, extract a cohesive module instead. - Do not leave dead exports;
bun run deadcode:reportsurfaces them.
Tests (Required)
- Every behavior change or fix ships with tests. Bug fixes get a regression test that fails on the old code and passes on the new.
- Use
bun:test(describe/test/expect) undertests/, mirroring the source path. - Test the real contract: security fixes must prove the exploit is blocked (e.g. feed the malicious input and assert it is rejected), not just that the happy path still works.
- Cover edge cases: empty/malformed input, boundaries,
null/undefined, and failure modes. - Prefer fast, dependency-free tests. For network/protocol code, stand up a local fake (e.g. an in-process server) rather than mocking away the logic under test.
- Keep tests deterministic and isolated; clean up any files/state they create.
Before You Finish
Run the full gate and make it green — no skips, no --no-verify:
bun run check:ciThis runs: typecheck + ui:typecheck (tsc --noEmit), lint + ui:lint (eslint),
check:loc (5000-LOC cap), mobile typecheck, test:smoke, and deadcode:report.
Report results honestly — if something fails or was skipped, say so.
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.

