Borrowing it
Nothing to install: this file belongs to EtanHey/brainlayer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/EtanHey/brainlayer/main/AGENTS.mdgit clone --depth 1 https://github.com/EtanHey/brainlayerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/etanhey/brainlayer/agents-md)<a href="https://agentmods.dev/instructions/etanhey/brainlayer/agents-md"><img src="https://agentmods.dev/badge/instructions/etanhey/brainlayer/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/etanhey/brainlayer/agents-md"><img src="https://agentmods.dev/badge/instructions/etanhey/brainlayer/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.08786 | $0.08786 |
| Opus 5.5 | $0.03514 | $0.03514 |
| Sonnet 5.5 | $0.01757 | $0.01757 |
| Haiku 4.5 | $0.00879 | $0.00879 |
Grade B, and why
brainlayer AGENTS.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
`python -m brainlayer.hook_python ~/.claude/settings.json` lints a settings file for bare How it starts
The opening of the file, as written. The whole thing — 458 lines — stays where its author put it; the contents beside it link to each section on GitHub.
BrainLayer — a letter from Etan
Ratified row-by-row by voice, 2026-08-07. Record:
docs.local/GRILL-RATIFIED-2026-08-06.md.
BrainLayer is the fleet's memory — both sides of it. My prompts, intent, and corrections on one side; what you all tried, what worked, what eroded and why on the other — the fleet's accumulated experience, so agents learn from each other's experience instead of re-deriving what the fleet already paid to learn. More than storage: it should give agents the understanding of WHY to go one way and not the other.
Everything traces to its origin. From any memory you can walk back to the conversation it came from. Prefer pointers to the source of truth over hoarding copies.
Every indexed source carries its class. CLI coding agents (Claude Code, Codex, antigravity),
desktop apps (Claude Desktop, Gemini, ChatGPT), and subagents — normal subagents versus
brain-workers. The class is labeled at ingest and decides default-search visibility and importance.
Desktop apps: indexed, hidden from default search, opt-in only — and the opt-in switch stays
unadvertised so benchmark lanes can't trip it. Normal subagents: indexed, labeled, expandable as a
subagent thread. Brain-workers: always saved, never in default searches, never demoting other
results — [OPEN] whether they index at all, and they should ship with BrainLayer itself. All
transcripts get saved, so every memory can trace back. A new source enters only by deliberate
wiring; nothing is auto-detected.
Store discipline. Verify, then store. Do the thing, then store it — never store-before-work as
ritual. When something you stored turns out wrong, UPDATE it, don't store again beside it. If it's
my intent you corrected, come back and ask me if you got it right — and make sure your question
actually reached me: a question buried under recon output was never asked. Standing rules carry
their date and expiry — a stale truth must not masquerade as current. [NOT A FEATURE YET — this is where I'm driving this]
Eventually BrainLayer should be able to sleep like a human brain does: during the night or
hibernation periods it runs local or large-context models to figure out what the current truths
still are, and learns. That's what a brain does when it sleeps.
Never silently degrade. Never auto-delete personal data. Transcripts move to the archive only after they're embedded, and only if the usage readers still see everything. Test data changes against a copy of the real database before merging. Merged is not deployed — verify the thing that executes. Never ship my database inside a package.
This letter is for agents building BrainLayer. The rules for agents USING it live in the tool descriptions — keep those true.
— Etan
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago Changed · +6 lines · +125 tokens per session 6c70bffa009a
- 10d ago Changed · -3 lines · -99 tokens per session 21722c4c120a
- 13d ago Changed · -1 lines · -185 tokens per session 0fc5127c82e6
- 14d ago Changed · -5 tokens per session 1c67345362a8
- 15d ago Changed · +1 lines · +29 tokens per session 44cedc321951
- 20d ago Changed · +6 lines · +152 tokens per session 633329a694dd
- 26d ago Changed · +6 lines · +151 tokens per session 87c9273b438e
- 27d ago Changed · +5 lines · +94 tokens per session f35b794af34b
- 28d ago Changed · +66 tokens per session 7a3d00131eae
- 1mo ago First seen · 438 lines · 8,458 tokens per session scan B 180a2745934d
brainlayer AGENTS.md is an instructions file published in the GitHub repository EtanHey/brainlayer (9 stars, last pushed today), licensed Apache-2.0. It adds 8,786 tokens to every session, about $0.0351 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.