brain-load
Skill18 starsChanged 2 months agoMITView on GitHub
Load project context from the Claude Brain Logseq graph into the current session. Triggers: "load brain", "load <project>", "resume <project>", "continue work on <project>", "what do we know about <topic>". Don't fire for write operations (use brain-save), generic questions about Logseq itself, or "open <file>" / "switch to <branch>" requests that mean opening files or switching git branches rather than loading project memory.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- evalSkill
- releaseSkill
- brain-doctorSkill
- brain-initSkill
- brain-saveSkill
- brain-statusSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Put text arguments in single quotes.
- Very specific: line 33
Stop reading: Don't pre-load sections, linked pages or task pages.
- Very specific: line 57
Read pages/Index.md and pages/Meta.md (both small).
- Very specific: line 61
Follow references/search.md, then brain activity 'searched "X" · N hits'.
- Distinctive: line 63
Never Read a whole page.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Brain Load
Running the helper
- Bash:
sh "<this skill's base directory>/../_shared/bin/brain" <command> … - PowerShell-only Windows:
& "$(Split-Path (Split-Path (Get-Command git).Source))\bin\bash.exe" "<base>/../_shared/bin/brain" <command> … - Neither works: stop and say "logseq-brain needs Git for Windows (Git Bash) — https://git-scm.com/download/win".
- In Cowork, always pass
--graph <connected folder>. Elsewhere pass--graphonly when the graph is not configured. It may go anywhere on the line. On exit 2 withgraph not resolved, followskills/_shared/path-resolution.md, then pass--graph. - Put text arguments in single quotes; a
'inside becomes'\''. In double quotes the shell runs backticks and expands$. - Exit 0 clean, 1 findings (act on them), 2 error (act on its reason; don't retry blindly). Quote every
coverage:line. Never recompute a figure it printed. Itsgraph:line is the folder for your own Read, Edit and Write calls.
Loading a project
- One call:
brain load <name>. Pass the user's words as-is. Don't list the graph first. Onpage not found, offer itsdid you mean:lines. Only when there are none, followreferences/matching.md. - Read its blocks:
map: staleormissing: say so, and state coverage fromcomputed:. Read-only: suggest a save, never write.drift:over 30 days: suggest a rebuild (skills/_shared/digest.md), never unprompted.staleness:aging: "Note: last updated N days ago."stale: "⚠ This project hasn't been updated in N days. Context may be outdated — verify before acting on it."abandoned: "This project is marked active but hasn't been touched in N days. Want to update it or mark it paused?"(no valid last-updated): suggest a brain-save to set one.freshandexempt: say nothing.== journal: today's notes on the page. Quote its coverage line.digest: missing: take the fallback.digest: not applicable: not a project page; read it with boundedbrain read/brain tail.== activity: already logged; don't log again.
- Stop reading. Don't pre-load sections, linked pages or task pages. Fetch more only on request, one level at a time, per
skills/_shared/escalation.md. - Active tasks: name the task IDs the digest mentions. Never read a task page's body.
- Continuity hint: "Picking up where you left off — focus: [focus]. Next: [next]. Open: [open]."
Present, with what was not read. Give the name, status, staleness, the digest bullets and the hint. Then paraphrase the Map's
label | figureclauses:Loaded digest for Unicorn-Globus (active, updated 2026-09-07). Focus: … Next: … Not read: Session Log 151 KB (62 entries), Decisions 3 KB (3), Current Plan 3 KB, 7 smaller sections. Ask and I'll search any of it.
Mandatory: a digest shown without what it omits reads as the whole history.
Fallback: no digest
brain load printed the section table. Read, bounded, with coverage:
- Overview's first 5 bullets:
Read<graph:>/pages/Projects___<Name>.mdwithoffset= its line in the table,limit 6. brain read <page> 'Current Plan'; over its cap,brain tail <page> 'Current Plan' --max 8192.brain tail <page> 'Session Log' --entries 3 --max 4096.
Build the hint from the newest entry. Then list every section you didn't fetch, with its bytes from the table (mandatory). Log it: brain activity 'loaded [[Projects/<Name>]] (brief)'. End with this question, with the bytes read: "This page has no digest yet — this load read ~X KB; a digest brings loads to about 2 KB. Build one?" Build only on yes, via Rebuild in skills/_shared/digest.md.
Full mode ("load <project> full")
brain load <name> --mode full prints the section table and full-budget:. Over 24 KB, state it and ask first. Then run brain read on Overview, Current Plan, Implementation and Decisions, and brain tail <page> 'Session Log' --entries 10 --max 8192. Report any section refused by its cap. For each task the page references, run brain digest Tasks/<ID>, skipping status:: done. Linked [[Projects/…]] pages: brain digest only, never the body. Then log it: brain activity 'loaded [[Projects/<Name>]] (full)' ([[Tasks/<ID>]] for a task page).
"load brain"
Read pages/Index.md and pages/Meta.md (both small). Present active projects, cross-project decisions, preferences. brain activity 'loaded brain overview'.
"what do we know about X"
Follow references/search.md, then brain activity 'searched "X" · N hits'.
Never Read a whole page.
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.

