Auto-generate a slim CLAUDE.local.md from brain DB. Preserves manual behavior rules. Produces ~1,200 token auto-generated context section with key people, systems, decisions, and project status.
npx skills add https://github.com/coco-research/coco --skill brain:export
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.
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>
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.
$BRAIN export <project-slug>
The exporter will:
CLAUDE.local.md at the output path<!-- AUTO-GENERATED: brain-export --><!-- END AUTO-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)
If this is the first export AND the project memory directory contains files with type: feedback frontmatter, offer to migrate them into behavior rules:
Found N feedback memory files that could become behavior rules in CLAUDE.local.md:
- feedback_html_docs_with_tailwind.md → "Documents as Tailwind HTML not Markdown"
Add these as a ## Behavior Rules section below the auto-generated block? [y/N]
To migrate programmatically:
from brain.exporter import migrate_feedback_memories
from pathlib import Path
memory_dir = Path("~/.claude/projects/<project-slug-hash>/memory").expanduser()
rules = migrate_feedback_memories(memory_dir)
for rule in rules:
print(rule)
Then append the rules as a ## Behavior Rules section below <!-- END AUTO-GENERATED --> in CLAUDE.local.md.
<!-- AUTO-GENERATED: brain-export -->
<!-- Generated: 2026-04-09T12:00:00Z | Brain DB: 42 entities | MemPalace: 7 drawers -->
## Project Identity
<contents of ~/.mempalace/identity.txt if it exists>
## Last Session
- Most recent event title (YYYY-MM-DD)
- Most recent decision text (YYYY-MM-DD)
## Key People
| Name | Role | Email |
|------|------|-------|
| Alice Smith | Product Manager | [email protected] |
## Key Systems
- **SystemA** — Description from metadata
- **ModuleB**
## Recent Decisions
- [2026-04-08] Decision text (truncated to 120 chars)
## Project Status
- Entities: 42 | Decisions: 12 | Events: 8
- Last brain sync: 2026-04-09
- Query: `/coco brain` or `/brain context {slug}` for full context
<!-- END AUTO-GENERATED -->
| Sentinel | Position | Meaning |
|----------|----------|---------|
| <!-- AUTO-GENERATED: brain-export --> | Start of auto block | Everything below is managed by exporter |
| <!-- END AUTO-GENERATED --> | End of auto block | Everything below is protected manual content |
Never manually edit between the sentinels — changes will be overwritten on next export.
Safe to edit anything above START or below END at any time.
The auto section is capped at 1,200 tokens (~4,800 characters). If the generated content exceeds this, the body is truncated. The header comment and sentinels are always preserved intact.
/brain-update session flush (brain DB has new data)/brain-init (first time setup)/brain-rescan (bulk entity import)Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.
Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Take coco-research/brain:export from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.