brain-compiler

brain-compiler is a skill for Claude Code, Codex from sandeep84397/agent-brain. It costs 17 tokens per session (436 once invoked), scanned A, original, MIT.

A skill for generating or updating SAN files using a defined contract and Agent Brain tools. SAN is not explained in the supplied information.

In plain words
What is it for?
Use it to check a roadmap, find missing or outdated source files, refresh SAN data, validate it, publish it, and report the results.
Why use it?
It applies required checks and records decisions and outcomes before publishing generated files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to check a roadmap, find missing or outdated source files, refresh SAN data, validate it, publish it, and report the results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sandeep84397/agent-brain/brain-compiler
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sandeep84397/agent-brain --skill brain-compiler
Clone the repo
git clone --depth 1 https://github.com/sandeep84397/agent-brain

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for brain-compiler

README.md
[![agentmods](https://agentmods.dev/badge/skills/sandeep84397/agent-brain/brain-compiler/github.svg)](https://agentmods.dev/skills/sandeep84397/agent-brain/brain-compiler)
Your own site
<a href="https://agentmods.dev/skills/sandeep84397/agent-brain/brain-compiler"><img src="https://agentmods.dev/badge/skills/sandeep84397/agent-brain/brain-compiler/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.

agentmods 80×15 button for brain-compiler

Your own site · 80×15
<a href="https://agentmods.dev/skills/sandeep84397/agent-brain/brain-compiler"><img src="https://agentmods.dev/badge/skills/sandeep84397/agent-brain/brain-compiler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 436 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00436
Opus 5.5 $0.00007 $0.00174
Sonnet 5.5 $0.00003 $0.00087
Haiku 4.5 $0.00002 $0.00044

Measured 2mo ago against content hash 01cf3e93456a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

brain-compiler scanned grade A with 0 findings 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 2mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

san/adapters/codex/brain-compiler/SKILL.md · 36 lines

What it actually says

Brain compiler

Read {{CONTRACT_PATH}} completely before generation. With a task-end lease, retrieve it via san_refresh(action="contract", refresh_token=..., repo=...) instead of filesystem/shell commands. Treat it as normative; do not redefine SAN semantics in this skill.

Use only Agent Brain MCP tools inherited from the current host:

  1. Reuse current repo context or call get_roadmap(repo=...); call pre_check(repo=..., provider="openai", ...) and log_decision(repo=..., ...) for one bounded batch. Routing advice does not prove which model is running.
  2. For a task-end lease, use the supplied refresh_token and file batch; read each source with san_refresh(action="read", refresh_token=..., source_path=...). Do not re-plan, use shell commands, edit source, or add files to this batch. Otherwise call plan_san_refresh; read only missing, stale or malformed sources.
  3. Apply all contract parity checks before publication.
  4. Call publish_san(provider="codex", ...) once per validated source and never write .san directly. Publication uses host identifier codex; the openai identifier above is for routing advice only. Supply the configured model and reasoning effort exactly; do not infer execution settings from routing advice.
  5. With a lease, pass refresh_token on every publication. Stop on the first read/publication error; no retry in this continuation. Return its status to the parent, which calls san_refresh(action="finish", ...) exactly once.
  6. Call log_outcome; report paths, counts, and validation metadata only.

If the configured model is unavailable, stop before generation and report no fallback. Do not invoke Claude, Anthropic APIs, another host, or any external provider subprocess. Never send source or SAN content outside inherited Agent Brain publication tools.

Changes

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.

  1. 2mo ago Changed · +13 lines 01cf3e93456a
  2. 3mo ago First seen · 23 lines · 17 tokens per session scan A c85fae34371c

Subscribe to this mod's changes

brain-compiler is a skill published in the GitHub repository sandeep84397/agent-brain (12 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 436 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

brain-compiler compared with skills from other repositories

brain-compiler next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
brain-compilersandeep84397/agent-brainSkill122mo agoMITA17Claude Code, Codex
playwright-human-modeLogicLabsAI/ultramemory-mcpSkill14mo agoApache-2.0A157Claude Code
atomic-level-checklist-md-confirm-approval-neededLogicLabsAI/ultramemory-mcpSkill14mo agoApache-2.0A17Claude Code
ultramemory-snapshotLogicLabsAI/ultramemory-mcpSkill14mo agoApache-2.0A97Claude Code, Codex
swarmLogicLabsAI/ultramemory-mcpSkill14mo agoApache-2.0A90Claude Code
setupLogicLabsAI/ultramemory-mcpSkill14mo agoApache-2.0A32Claude Code
checklist-bound-executionLogicLabsAI/ultramemory-mcpSkill14mo agoApache-2.0A154Claude Code