brain:export

brain:export is a skill for Claude Code, Codex from coco-research/coco. It costs 49 tokens per session (1,257 once invoked), scanned A, original, Apache-2.0.

A tool that creates a short CLAUDE.local.md file from a stored project knowledge base, including people, systems, decisions, and project status.

In plain words
What is it for?
Use it to create or refresh local context for an agent working on an ongoing project.
Why use it?
It brings important project context into the agent's working instructions without copying the entire knowledge base.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it to create or refresh local context for an agent working on an ongoing project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/coco-research/coco/brain-export
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 coco-research/coco --skill brain-export
Clone the repo
git clone --depth 1 https://github.com/coco-research/coco

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:export

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/coco-research/coco/brain-export"><img src="https://agentmods.dev/badge/skills/coco-research/coco/brain-export.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,257 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.00049 $0.01257
Opus 5.5 $0.00020 $0.00503
Sonnet 5.5 $0.00010 $0.00251
Haiku 4.5 $0.00005 $0.00126

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

Security

Grade A, and why

brain:export 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.

systems/brain/skills/brain-export/SKILL.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/brain-export — CLAUDE.local.md Auto-Generator

Generates or refreshes the <!-- AUTO-GENERATED: brain-export --> section in the project's CLAUDE.local.md file from the brain SQLite DB. Protects all manually written content above and below the sentinels.

Quick Reference

BRAIN="python3 ~/.claude/skills/brain/scripts/brain/brain_cli.py"

# Basic export (writes CLAUDE.local.md next to project_brain.db)
$BRAIN export <project-slug>

# Export with explicit output path
$BRAIN export <project-slug> --output /path/to/CLAUDE.local.md

# Export with explicit DB path
$BRAIN --db /path/to/project_brain.db export <project-slug>

Procedure

Step 1 — Verify brain DB exists

BRAIN="python3 ~/.claude/skills/brain/scripts/brain/brain_cli.py"
$BRAIN info

If the DB is missing, tell the user to run /brain-init first.

Step 2 — Run the export

$BRAIN export <project-slug>

The exporter will:

  1. Read any existing CLAUDE.local.md at the output path
  2. Preserve everything above <!-- AUTO-GENERATED: brain-export -->
  3. Preserve everything below <!-- END AUTO-GENERATED -->
  4. If no sentinels found, append the auto section at the bottom (safe first run)
  5. Regenerate the auto section from brain DB
  6. Write atomically (tmp file + rename)

Step 3 — Show the user what was generated

Parse the JSON output and display:

brain:export complete
─────────────────────────────────────────
Output:         /path/to/CLAUDE.local.md
Project slug:   <slug>
Auto section:   ~NNN tokens (within 1,200 token budget: YES/NO)
Total file:     ~NNN tokens
─────────────────────────────────────────
Sections generated:
  - Project Identity  (if ~/.mempalace/identity.txt exists)
  - Last Session      (most recent event + decision)
  - Key People        (up to 8 person entities)
  - Key Systems       (up to 8 system/module entities)
  - Recent Decisions  (last 4 decisions)
  - Project Status    (entity/decision/event counts + last sync date)

Step 4 — First-run: offer to migrate feedback memories

Read the full file on GitHub · 157 lines

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 · +2 tokens per session f02d3f75ee60
  2. 2mo ago First seen · 157 lines · 47 tokens per session scan A 6a235f842c7a

Subscribe to this mod's changes

brain:export is a skill published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 49 tokens to every session and 1,257 once invoked, about $0.0002 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-09-03.

Related

brain:export compared with skills from other repositories

brain:export next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
brain:exportcoco-research/cocoSkill323yesterdayApache-2.0A49Claude Code, Codex
session-handoffwanshuiyin/HERO-Anti-OverDefenseSkill92912d agoMITA34Claude Code, Codex
handoffChemaclass/agnostic-aiSkill31todayMITA14Claude Code, Codex
handoffdeepklarity/harness-kitSkill10820d agoMITA50Claude Code
memory-curatorChemaclass/agnostic-aiSkill31todayMITA20Claude Code, Codex
project-memoryqingye-lab/rootloomSkill10yesterdayMITA47Codex
shared-memoryChemaclass/agnostic-aiSkill31todayMITA16Claude Code, Codex