brain

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

A project knowledge tracker backed by a local SQLite database. It records tasks, decisions, relationships, events, and other information about a project.

In plain words
What is it for?
Use it to query or update project knowledge, review open tasks, and find recent decisions.
Why use it?
It keeps important project context in one searchable place instead of leaving it scattered across conversations and files.

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 query or update project knowledge, review open tasks, and find recent decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/coco-research/coco/brain
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
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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/coco-research/coco/brain"><img src="https://agentmods.dev/badge/skills/coco-research/coco/brain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,443 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.00053 $0.01443
Opus 5.5 $0.00021 $0.00577
Sonnet 5.5 $0.00011 $0.00289
Haiku 4.5 $0.00005 $0.00144

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 12 executable files (scripts/brain/__init__.py, scripts/brain/brain_cli.py, scripts/brain/chroma_worker.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/SKILL.md · 152 lines

How it starts

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

/brain --- Project Knowledge Tracker

A structured SQLite database (project_brain.db) that lives in each project folder, replacing flat markdown memory files with queryable, relational knowledge.

Quick Reference

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

# Initialize in current project folder
$BRAIN init

# Create a project
$BRAIN add-project "My Project" --slug my-project --desc "Example project description"

# Add entities (upsert --- safe to run repeatedly)
$BRAIN add-entity my-project person "Alice Example" --external-id 2882
$BRAIN add-entity my-project team "Engineering" --external-id 33
$BRAIN add-entity my-project module "PlatformHub"

# Add relationships
$BRAIN add-rel 1 2 member_of
$BRAIN add-rel 1 3 administers

# Tasks
$BRAIN add-task my-project "Configure external reviewer access" --priority 1
$BRAIN update-task 1 --status in_progress
$BRAIN tasks my-project --status open

# Threads (group related work)
$BRAIN add-thread my-project "External User Access" --category request
$BRAIN link-thread 1 task 1
$BRAIN link-thread 1 decision 1

# Decisions
$BRAIN add-decision my-project 2026-04-08 "Use Stakeholder role for external users" \
  --context "No license consumed, view-only" --decided-by You

# Events
$BRAIN add-event my-project 2026-04-08 call "Charlie Customer Call" \
  --summary "Priorities deck shared" --participants "Alice,Bob,Charlie,You"

# CoCo context (session start)
$BRAIN context my-project

# Search across everything
$BRAIN context my-project --search "Morgan"

# Entity graph (show all connections)
$BRAIN graph 1

# Thread detail (show all linked items)
$BRAIN thread-detail 1

/brain:update --- End-of-Session Flush

This is the most important command. When the user runs /brain:update, Claude MUST do a thorough review of the entire conversation and write everything learned to the brain DB. This is a forcing function --- do not skip anything.

Procedure

  1. Scan the full conversation from top to bottom. For each project in the brain DB, extract:

Read the full file on GitHub · 152 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 · -11 tokens per session dbc1e1590c9b
  2. 2mo ago First seen · 152 lines · 64 tokens per session scan A eedea9f90d7c

Subscribe to this mod's changes

brain is a skill published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 53 tokens to every session and 1,443 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 compared with skills from other repositories

brain next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
braincoco-research/cocoSkill323yesterdayApache-2.0A53Claude 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