project-brain
Skill173 starsChanged 25 days agoMITView on GitHub
Triggers (all require explicit user request — do NOT activate just because a brain/ folder exists): (1) The user wants to set up project-level memory ("set up project brain", "scaffold project context", "init project brain", "建项目脑"). (2) The user is in a directory containing brain/ AND explicitly asks to resume / continue / load the project / check status / "what's the state of this project" / "继续这个项目". (3) The user signals window switch / context compaction / a handoff ("switch windows", "context's getting full", "I'll head out", "hand off", "shift change", "压缩了", "切窗口", "交接", "换班", "接班", "交班") — write a HANDOFF before they leave. (4) The user says "update the project brain" / "let's record this" / "更新项目脑" — propose a list with reasons; user approves per item. (5) The user mentions multiple parallel workstreams / concurrent windows / 多线程项目 / 多任务并行 / 几个窗口同时做 — enable Multi-workstream Mode (METHODOLOGY §3.5; §3.6 when windows run concurrently). (6) In a multi-workstream project, the user asks to hand work to another workstream / "tell the X window" / 交给另一条线 / 告诉 X 窗口 — record a cross-workstream request (METHODOLOGY §3.6.3). (7) The user asks for a handoff / 交接 in a project that has **no brain/** — say so, offer the §1.4b decomposition, otherwise write the handoff in brain shape at the project root (METHODOLOGY §1.4c). A progress file is not a trigger; the user's handoff request is. Do NOT auto-activate from casual conversation — explicit user request required. See METHODOLOGY.md.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- dahshanlabs/klypix-plugintheir own version, first seen Oct 25, 2026
- jscraik/Agent-Skillstheir own version, first seen Sep 27, 2026
- HuaKaiBuChangWu/project-braintheir own version, first seen Jul 31, 2026
- Nollis/Skillstheir own version, first seen Apr 10, 2026
- madeinlowcode/skills-claude-codetheir own version, first seen Apr 3, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- jscraik/Agent-Skills★ 9same name
- madeinlowcode/skills-claude-code★ 7same name
- dahshanlabs/klypix-plugin★ 0same name
- HuaKaiBuChangWu/project-brain★ 0same name
- Nollis/Skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- templates-zh/CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 12 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
DECISIONS gentle inquiry: when something feels decided, ask "does this count as decided?" — don't assert "we decided X."
- Very specific: line 40
Multi-workstream: if brain/ has multiple STATUS_<workstream>.md files, don't guess this window's workstream — use explicit signals only …
- Distinctive: line 45
When the user wants to scaffold:
- Very specific: line 60
If brain/HANDOFF.md exists, read it
- Very specific: line 64
Read shared files: brain/MAP.md + brain/PROJECT.md
- Very specific: line 66
Read corresponding brain/STATUS_<workstream>.md + brain/HANDOFF_<workstream>.md
- Very specific: line 71
Universal discipline: if cwd switches to another project mid-session, re-read the new project's files.
- Distinctive: line 77
When the user says they're switching windows / context is getting full / heading out / 交接 / 换班:
- Distinctive: line 86
This shift: when, why (context limit / break / refocus), what landed (commits)
- Very specific: line 98
If the user asks for a handoff in a project that has no brain/:
- Very specific: line 101
If the user says not now: write HANDOFF.md at the project root in the six-section shape anyway.
- Distinctive: line 103
Don't scaffold without a yes.
- Distinctive: line 107
When the user says "update the project brain":
- Distinctive: line 109
Look back at what happened in this session
- Distinctive: line 118
Write only the approved updates
- Distinctive: line 120
Never reverse this: don't ask the user "which files do you want to update?" That hands the wrong layer of judgment to the wrong person.
- Distinctive: line 124
When this window's workstream needs something from another one — or the user says "hand this to the X workstream":
- Distinctive: line 129
On the receiving side: when you accept a request, record it in *your* STATUS under "From other workstreams" — what, from which workstream, …
- Distinctive: line 130
Close the loop: when it ships, tell the requester.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
project-brain
A folder structure + collaboration protocol for persistent project context across AI sessions. Use it to scaffold a brain/ folder in the user's project, resume work from an existing one, or update entries when work happens.
When to invoke this skill
| User signal | Workflow |
| "set up project brain" / "scaffold project" / "建项目脑" / "init project context" | Kick-off — see §1 |
User is in a directory containing brain/ AND explicitly says "load" / "resume" / "what's the status" / "继续这个项目" | Startup — see §2 |
| User says "switch windows" / "context's getting full" / "I'll head out" / "hand off" / "shift change" / "压缩了" / "切窗口" / "交接" / "换班" / "接班" / "交班" | Handoff — see §3 |
A handoff / window-switch request as above, but the project has no brain/ | Handoff first, brain later — see §3b |
| User says "update the project brain" / "let's record this" / "更新项目脑" | Update — see §4 |
| Multi-workstream project, user says "hand this to the X workstream" / "tell the X window" / "交给 X 线" | Cross-workstream request — see §5 |
Activation boundary (important): Do not activate just because a brain/ folder exists in the current directory. Casual conversation that happens to occur inside a project does not require this skill — only explicit user requests do. This is intentional: the methodology refuses to auto-monitor or auto-trigger; user judgment decides when to engage.
Core principles (always honored)
brain/is written for the next window, not for the user (v2.9.1, METHODOLOGY §4.1): writeSTATUS/HANDOFF/MAPregistrations /RUNBOOKappends when the work lands — don't ask, don't report; commit with a message that says what changed. Ask the user exactly one thing, and only when you can't tell: is this decided?DECISIONS/PROJECTfollow the answer; what the user said plainly, write without asking.- HANDOFF is a shift report (v2.9, METHODOLOGY §3.2): six sections, empty ones deleted; the test is "could the next window look this up?", not length. Archives are history — what's still valid moves to STATUS / RUNBOOK / DECISIONS before archiving (Trap 21). Project-level traps and procedures live in
brain/topics/operations/RUNBOOK.md, numbered; handoffs cite the numbers. - Neighbour projects (v2.9, METHODOLOGY §3.6.6): sibling repos are reached through their MAP §6 roster — never copy a session id or window name into this brain. Requests across the boundary use the same two STATUS ledgers, keyed by project name.
- Judgment Division: the user decides "should we record now"; the AI decides "what specifically to record"; the user reviews. Don't push specialized judgments back to the user ("which files do you want me to update?").
- DECISIONS gentle inquiry: when something feels decided, ask "does this count as decided?" — don't assert "we decided X."
- Multi-workstream: if
brain/has multipleSTATUS_<workstream>.mdfiles, don't guess this window's workstream — use explicit signals only (the window is named for the workstream, e.g.web-6, or the user said so when opening it), otherwise ask. - Concurrent windows (v2.8, METHODOLOGY §3.6): workstreams are durable, windows are disposable — name workstreams, never window names, outside the MAP §6 roster (Trap 18). One checkout means one shared staging area: stage by name, check
git diff --cached --statbefore every commit (Trap 19); edit shared brain files in place, never rewrite them whole (Trap 20).
§1 New project kick-off
When the user wants to scaffold:
- Confirm applicability: multi-module / long-lived / cross-session work? If a one-off script — say "this might be over-engineering for this project" and let the user override.
- Confirm single or multi-workstream: most projects are single-workstream (default). If the project has parallel independent workstreams (dev + ops + outreach kind of project), ask the user to list workstream names.
- Run scaffold:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/scaffold.sh" <user-project-root>(defaults to all four AI adapters: Claude, Cursor, Copilot, AGENTS.md). Add--lang zhif the project will be documented in Chinese — gives Chinesebrain/templates + ChineseCLAUDE.md(other adapters stay English regardless, since they're consumed by AI tools, not humans). The scaffold includesbrain/topics/operations/RUNBOOK.md(v2.9), pre-registered in MAP §5 — fill its commands with the user on day one, or leave one line saying there's nothing to operate yet. - Walk the user through
brain/PROJECT.mdon day one — fill the one-line definition + "what we explicitly DON'T do." Don't let this drift into the future. - Scan placeholders:
grep -rn "⚠️ TODO ⚠️" <user-project>/brain/— go through with the user. Empty fields should be intentional. - First DECISIONS entry: append "establishing project-brain" with rejected alternatives, so this file is used from day one.
- Write the auto-memory pointer (Claude Code only, METHODOLOGY §3.4 v2.7): in the memory directory your system prompt names, create
project-brain-pointer.md(typeproject) + oneMEMORY.mdindex line saying state lives inbrain/. If no memory directory is announced, skip.
§2 Startup (entering a project that already has brain/)
Single-workstream (only STATUS.md):
- Read
brain/MAP.md - Read
brain/STATUS.md - If
brain/HANDOFF.mdexists, read it - Brief report: project recognized + current progress + last blocker
Multi-workstream (multiple STATUS_<workstream>.md):
- Read shared files:
brain/MAP.md+brain/PROJECT.md - Identify the workstream, don't guess: explicit signals only — this window is named for a workstream (its name plus a number, e.g.
web-6), or the user said which one when opening it. Otherwise ask: "I see this is a multi-workstream project with [list workstreams]. Which one does this window work on?" - Read corresponding
brain/STATUS_<workstream>.md+brain/HANDOFF_<workstream>.md - Concurrent windows (MAP §6 has a "Who's on it now" roster): skim the other workstreams' STATUS "Handed to other workstreams" for rows addressed to yours that are still
sent - Brief report — name the workstream; mention open requests ("From other workstreams" + unaccepted
sentrows) - Concurrent windows, once the user confirms and work begins: claim your roster row — this window's name + date in your workstream's cell only, committed alone (stage just that hunk of
brain/MAP.md, after checking nothing else is staged in it). Ad-hoc windows never claim
Universal discipline: if cwd switches to another project mid-session, re-read the new project's files; if the user switches workstreams in the same window, re-read the new workstream's files. Don't carry over memory.
Auto-memory pointer (v2.7): if Claude Code's memory index surfaced a project-brain pointer, it's a signpost only — still read the files above; never report state from it (Trap 17).
§3 Handoff (user signaling window switch / hand off / shift change)
When the user says they're switching windows / context is getting full / heading out / 交接 / 换班:
- Settle first (v2.9, METHODOLOGY §4.3 step 0): read the existing
brain/HANDOFF.md. Move what is still valid out before archiving — open waits into STATUS's ledgers, procedures and traps intobrain/topics/operations/RUNBOOK.md(numbered), anything decided into DECISIONS (ask only if you can't tell it was decided). This shift's own new traps and procedures go into RUNBOOK the same way; the handoff cites the numbers. Write and commit. - Archive the existing HANDOFF:
(For multi-workstream:git mv brain/HANDOFF.md brain/handoffs/$(date +%Y-%m-%d-%H%M).mdbrain/HANDOFF_<current>.md→brain/handoffs/<current>/.... Concurrent windows: touch only your own workstream's files, and leave your roster row as is — the next window claims it.) - Write a fresh
brain/HANDOFF.mdas a shift report — the template's six sections, empty ones deleted:- This shift: when, why (context limit / break / refocus), what landed (commits)
- First thing for the next window: one item; point at STATUS "Next steps", don't repeat it
- Procedures found this shift: one-line pointers into RUNBOOK
- Waiting on others: what the STATUS ledgers don't already carry — the user's pending answers, a neighbour project's reply
- New traps: RUNBOOK trap numbers
- Still warm: hunches, half-tried approaches, odd observations — the genuinely unwritten Name workstreams and neighbour projects, never window names or session ids (Trap 18).
- The test is not length — it's whether the next window could have looked it up. Restated STATUS, retold procedures, copied rationale: cut. Never write "see the previous handoff, it still applies" (Trap 21) — that content was moved in step 0.
- Refresh the auto-memory pointer (Claude Code only, METHODOLOGY §3.4 v2.7): in the memory directory your system prompt names, rewrite
project-brain-pointer.mdwith the new HANDOFF timestamp (+ workstream) and replace its one line inMEMORY.mdin place — never append. If no memory directory is announced, skip.
§3b No brain/ yet (METHODOLOGY §1.4c)
If the user asks for a handoff in a project that has no brain/:
- Say so in one sentence: no
brain/here, and a handoff patched into a progress file goes stale shift by shift. - Offer the §1.4b decomposition now: the progress file's handoff section →
HANDOFF.md, its state →STATUS.md, its "we decided" lines → DECISIONS (ask for the rejected alternatives), its runbook →topics/operations/RUNBOOK.md. - If the user says not now: write
HANDOFF.mdat the project root in the six-section shape anyway. Never patch an existing "handoff" section in place. Whenbrain/arrives, the file moves in unchanged.
Don't scaffold without a yes; a progress file is not a trigger — the user's handoff request is.
§4 Update workflow
When the user says "update the project brain":
- Look back at what happened in this session
- Propose a list with reasons — for each candidate file, say what to write and why:
- STATUS overwrite: now at [X], next [Y]. Reason: you said "that's it" - DECISIONS: about to append? Reason: that section felt like it landed — does this count as decided? - MAP §5 register: new file at brain/topics/systems/[X].md. Reason: doc we just wrote - HANDOFF: not needed — you didn't say switch windows - Wait for user's approval per item — they may say "OK, all of them" / "skip DECISIONS, that's still discussion" / "today, just STATUS"
- Write only the approved updates
Never reverse this: don't ask the user "which files do you want to update?" That hands the wrong layer of judgment to the wrong person.
§5 Cross-workstream request (concurrent multi-workstream, METHODOLOGY §3.6.3)
When this window's workstream needs something from another one — or the user says "hand this to the X workstream":
- Check ownership in MAP §6 (the registry's Owns column). If the area belongs to another workstream, don't edit it — hand it over.
- Record it in your own STATUS under "Handed to other workstreams": what, to which workstream, state
sent. Write and commit. - Deliver it live: find the workstream's current window in the MAP §6 roster. If your tool can message other sessions, send it there; otherwise tell the user what to carry across. Window gone and no live window named after the workstream → the
sentrow waits; the next window on that workstream finds it on wake (§2 step 4). - On the receiving side: when you accept a request, record it in your STATUS under "From other workstreams" — what, from which workstream, what done means, who to tell when it ships. Never edit the requester's STATUS.
- Close the loop: when it ships, tell the requester; the requester ticks its own list. A deploy / release that affects other workstreams gets announced to them before and after (who to tell lives in MAP §6 "Interface dependencies & who to tell").
- Ledgers survive STATUS overwrites: carry open rows forward; drop a row only once it's done.
- Neighbour project instead of a workstream (v2.9): same ledgers, keyed by the project's name; find its current window through its MAP §6 roster (the Neighbour projects table in ours says where its brain is). Never write its session id into our files.
Reference
- Full methodology (the why, all 21 traps, evolution story):
${CLAUDE_PLUGIN_ROOT}/METHODOLOGY.md - Templates (what
scaffold.shcopies):${CLAUDE_PLUGIN_ROOT}/templates/ - Doctor (structural health check):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/doctor.sh" <user-project-root> - Public repo: https://github.com/Ethan-YS/project-brain
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

