project-brain

project-brain is a skill for Claude Code, Codex from OoneBreath/claude-code-project-brain. It costs 138 tokens per session (8,498 once invoked), scanned B, original, MIT.

A set of instructions that gives Claude Code a persistent project memory stored in a .project-brain folder. It uses a small index to point to detailed notes about projects, topics, people, and past work.

In plain words
What is it for?
Use it when setting up project memory, recalling earlier solutions, checking what has already been done, or documenting project details and agreements with people.
Why use it?
It helps Claude Code continue work across sessions without relying on chat history or loading large documents every time. It also keeps information from different projects separated.

Skill for Claude CodeCodex

Part of the project-brain plugin — 1 skill, 3 hooks shipped together

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.

agentmods
npx agentmods add skills/oonebreath/claude-code-project-brain/project-brain
Any agent
npx skills add OoneBreath/claude-code-project-brain --skill project-brain
Clone the repo
git clone --depth 1 https://github.com/OoneBreath/claude-code-project-brain

Made for: Claude Code, Codex.

Or install project-brain, the plugin that ships this one along with the rest of its 1 skill, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/oonebreath/claude-code-project-brain/project-brain.svg)](https://agentmods.dev/skills/oonebreath/claude-code-project-brain/project-brain)
Your own site
<a href="https://agentmods.dev/skills/oonebreath/claude-code-project-brain/project-brain"><img src="https://agentmods.dev/badge/skills/oonebreath/claude-code-project-brain/project-brain.svg" alt="Measured on agentmods" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,498 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00138 $0.08498
Opus 5 $0.00069 $0.04249
Sonnet 5 $0.00028 $0.01700
Haiku 4.5 $0.00014 $0.00850

Measured 5d ago against content hash e8730c1e6a55, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

project-brain 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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (_compact.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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.claude/settings.json` (keeping your existing settings, idempotent, with a backup). If you ever
skills/project-brain/SKILL.md · 537 lines

How it starts

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

Project Brain

Persistent project memory you (Claude) navigate through a small index instead of re-reading large docs every session. Only the index is ever loaded eagerly; detail lives in topic files read on demand. The index is your token budget — keep it small.

Where the brain lives

A .project-brain/ directory at the workspace (or repo) root:

.project-brain/
  index.md                  # THE MAP. Small. Read this FIRST. Projects -> topics -> status + pointer
  projects/
    <project>/
      <topic>.md            # Detail: problem, solution, status, version, tags
  people/
    <slug>.md               # Agreements with humans (client/partner/vendor): who, context, status

One brain can catalog many projects (a server hosting several repos) or just one (a single repo). Multi-project is the default shape — each project is a section in index.md.

How to behave every session

If the brain exists, read its index first — it is small by design and tells you what each project is, its stack, and what has already been done. Prefer .project-brain/index.compact (a token-cheap, generated view); if it is missing or older than index.md, read index.md instead — they carry the same information, so the fallback never loses anything. Drill into a topic file only when you actually need that detail.

When this skill is invoked, choose the mode that matches the request:

Mode: init — create the brain

Use when no .project-brain/ exists, or the user says "set up / init project brain".

Default is a LIGHT init — keep it cheap. Do NOT read the codebase.

  1. Create .project-brain/ and .project-brain/projects/.
  2. Detect projects from cheap signals only: top-level dirs, git repos, package.json, pyproject.toml, go.mod, Cargo.toml, composer.json. Infer name + stack from those files — do not read source to do this. Skip non-project directoriesnode_modules, venv, .venv, target, dist, build, .cache, snap, android-sdk, flutter, .git — and anything that is clearly a toolchain or data dump, not a codebase. When unsure, ask rather than adding noise.
  3. Write index.md from templates/index.md, one section per project with the stack filled in and the topic list empty. Topics get filled as real work happens (via save).
  4. Append a tiny pointer to the workspace CLAUDE.md (create it if missing) using templates/CLAUDE-snippet.md — this is what makes future sessions read the map first. Keep the pointer to a few lines; never duplicate the map into it.
  5. Defer this workspace's native memory to the brain (optional, non-destructive). Claude Code's own per-project memory (MEMORY.md) competes with the brain and roughly doubles the per-session token cost. With the user's ok, seed a small conditional redirect into THIS workspace's native MEMORY.md so it points at the brain instead of duplicating facts. Same contract as the brain-bootstrap tool:
    • Idempotency marker <!-- project-brain-redirect v1 -->.
    • Native memory empty/absent → write just the redirect stub.
    • Marker already present → leave it untouched.
    • It holds the user's own notes → back them up (.bak-<timestamp>) and prepend the redirect; never delete or reorder their text. Keep the stub generic ("if this workspace has a .project-brain/, it is the source of truth") so it carries no absolute path and stays correct on any machine. To migrate native memory across other existing projects on the machine, point the user at the on-demand brain-bootstrap script — it only touches projects you ask it to, never silently.
  6. Tell the user what you created, and that the brain fills in as you work.

Read the full file on GitHub · 537 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. 5d ago First seen · 537 lines · 138 tokens per session scan B e8730c1e6a55

Subscribe to this mod's changes

project-brain is a skill published in the GitHub repository OoneBreath/claude-code-project-brain (10 stars, last pushed 19d ago), licensed MIT. It adds 138 tokens to every session and 8,498 once invoked, about $0.0007 per session on Opus 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.

Related

Other skills, from other repositories

context-manager

Context management skill providing discovery, fetching, harvesting, extraction, compression, organization, cleanup, and guided workflows for project context.

darrenhinde/OpenAgentsControl · 27 tokens

project-wiki

组织和维护 Vibe Coding 项目的 wiki 文档体系。当用户要求初始化/重构 wiki 结构、进入新项目且 wiki/ 不存在、需要诊断和修复文档腐化、或需要管理 specs/refs/reviews 子目录的生命周期时触发。.

GeminiLight/MindOS · 63 tokens

mindos-zh

MindOS 是用户的本地知识助手,也是跨会话、跨 Agent 共享的知识库。它保存决策记录、会议纪要、SOP、 排错经验、架构选型、调研结论和偏好设置。 仅 mindRoot 知识库内任务。不用于:改代码仓库、项目源码、KB 外路径。 核心概念:空间、指令(INSTRUCTION.md)、技能(SKILL.md);笔记可承载指令与技能。 触发场景:保存或记录任何内容、搜索历史笔记或上下文、更新或编辑文件、整理或重组文件结构、 执行SOP或工作流、捕获对话中的决策、复盘或总结经验、追加表格或CSV数据、跨Agent交接上下文、 提炼经验教训、同步关联文档、查找之前是否讨论过某事、查询历史决策、查找模板或SOP、…

GeminiLight/MindOS · 490 tokens

mindos

MindOS: local knowledge assistant & shared KB. Keeps decisions, notes, SOPs, debugging lessons, research findings, preferences across sessions/agents. Core: save notes, search KB, organize files, run workflows, review, append CSV, hand off context, distill lessons. NOT for app source or paths outside KB. Triggers…

GeminiLight/MindOS · 136 tokens

mindos-max

MindOS: local knowledge assistant & global memory layer. Keeps decisions, notes, SOPs, debugging lessons, architecture choices, research findings, preferences, conversation summaries for all connected agents. PROACTIVE: (1) search MindOS first for past context, (2) offer to save after valuable work, (3) persist key…

GeminiLight/MindOS · 145 tokens

mindos

Operate a MindOS knowledge base: update notes, search, organize files, execute SOPs/workflows, retrospective, append CSV, cross-agent handoff, route unstructured input to the right files, distill experience, sync related docs. Use when the task targets files inside the user's MindOS KB (mindRoot). NOT for editing app…

GeminiLight/MindOS · 157 tokens