brain-bootstrap
Skill594 starsChanged 3 months agoApache-2.0View on GitHub
Seed a freshly-scaffolded brain with real project knowledge — on an existing (brownfield) project read the code, docs, and git log, then draft only the root pages that have meaningful content and capture key historical decisions; on a near-empty (greenfield) project interview the user. Every write goes through the `brain` CLI. Run it after brain-setup.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- VGBRO/claude-skillsedited, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- VGBRO/claude-skills★ 185% same
Wrote their own version · 0
None found.
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.
- brain-ingestSkill
- brain-pageSkill
- brain-setupSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
When it is genuinely mixed (a little code, a little history), prefer Brownfield for whatever *can* be inferred, and fall back to interview …
- Very specific: line 37
Write each with echo "<body>" | brain update-root <slug> (body on stdin).
- Very specific: line 39
Consider architecture for layers, modules, boundaries, and a mermaid graph when this is useful and inferable from code.
- Very specific: line 40
Consider stack for a domain / choice / rationale table when real decisions are evident from dependencies and usage.
- Very specific: line 41
Consider flow for an end-to-end path and mindmap for feature structure only where there is enough evidence to explain them.
- Very specific: line 42
Consider background and roadmap only with grounded user intent.
- Distinctive: line 66
Prefer less but accurate: Only sediment knowledge that (a) will still matter in six months and (b) is hard to reconstruct from the code …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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-bootstrap
brain-setup scaffolds an empty brain — no root pages and an empty pages/. This skill fills it with real, durable project knowledge for the first time. It is the bridge between "a brain exists" and "the brain is worth reading".
You gather information by reasoning over the project itself — reading code, docs, and git log, or interviewing the user — but you never write the brain by hand. Every landing of knowledge is a brain CLI subcommand.
NEVER hand-edit any file under the brain directory. All reads and writes MUST go through the
brainCLI. Manual edits are unsupported and illegitimate. There is no validator and nothing at the file layer can catch a bad manual edit; correctness is guaranteed only by going through the CLI, so a hand edit silently breaks the brain's invariants.
The exact command surface (update-root / create-page / update-truth / reindex / ls …) and the page-category taxonomy live in the brain-page skill — read it before creating or modifying any page. Resolve <brain-page-bundle> to wherever that skill is installed (in the brain.md source repo, skills/brain-page/); define the shell function brain() { node <brain-page-bundle>/bin/brain.mjs "$@"; } (a function is portable across bash and zsh, unlike BRAIN="node …"; $BRAIN …, which only word-splits in bash) and run everything from the project root.
Step 0 — Pick the mode
Inspect the project to decide which path you are on:
- Brownfield — there is substantial source code, and/or real
git loghistory. There is something to read; go to Brownfield. - Greenfield — a near-empty repo: no meaningful source, little or no history. There is nothing to read; go to Greenfield.
When it is genuinely mixed (a little code, a little history), prefer Brownfield for whatever can be inferred, and fall back to interview questions for the parts the code can't tell you.
Brownfield — synthesize from code, docs, and history
Gather from three sources, then synthesize (do not transcribe):
- Existing code — directory structure, module boundaries, entry points, the tech stack and dependencies (manifest files:
package.json,pyproject.toml,go.mod,Cargo.toml, …). This is your strongest evidence forarchitectureandstack. - Existing docs —
README,docs/,CONTRIBUTING, design notes. Good for stated intent, goals, and naming. git log— read the commit messages (git log --oneline -n 200and spot-read full messages for the interesting ones). Mine them for the real decisions that were made over time.
Draft only the needed root pages
Write each with echo "<body>" | brain update-root <slug> (body on stdin). Lean on ```mermaid blocks (graph / sequenceDiagram / mindmap / gantt) to keep them visual.
- Consider
architecturefor layers, modules, boundaries, and a mermaidgraphwhen this is useful and inferable from code. - Consider
stackfor a domain / choice / rationale table when real decisions are evident from dependencies and usage. - Consider
flowfor an end-to-end path andmindmapfor feature structure only where there is enough evidence to explain them. - Consider
backgroundandroadmaponly with grounded user intent; do not invent goals or plans.
Capture key historical decisions as pages
For each genuine decision you can see in the history or the code (e.g. "switched from X to Y", "adopted pattern Z", a deliberate constraint), create a decision page and fill in its understanding:
brain create-page --id <kebab-id> --category decision \
--title "<one-line decision>" \
--summary "<why this page was created, in the user's working language>" \
--source "<where this came from>"
echo "<what was decided, the alternatives, the rationale, the blast radius>" | \
brain update-truth --id <kebab-id> \
--summary "<what was captured, in the user's working language>" \
--source "<where this came from>"Link related pages and the relevant root area with [[page-id]].
Quality guardrails (mandatory)
- Synthesize, don't copy. Combine the three sources into a coherent picture; never paste a README section or a directory listing verbatim.
git log→ real decisions only. Distill the commits that represent actual choices or turning points. Do not produce a commit-by-commit changelog; routine "fix typo / bump dep" commits are noise.- Infer only what the evidence supports.
architectureandstackcan be inferred from code and dependencies.backgroundandroadmapusually cannot — for anything you can't ground in evidence, mark it low-confidence and ask the user to confirm, or leave it as an explicit open question. Never fabricate goals, history, or plans. - Prefer less but accurate. Only sediment knowledge that (a) will still matter in six months and (b) is hard to reconstruct from the code itself. If the code already says it plainly, leave it in the code.
Greenfield — interview the user
There is nothing to read, so switch to an interview. Ask open-ended questions and let the answers drive what you seed. Cover at least:
- Goal — what is this project for? What problem does it solve?
- Target users — who is it for?
- Non-goals — what is explicitly out of scope?
- Rough shape — the rough form/architecture/stack the user has in mind (may still be loose).
From the answers:
- Seed
background(goal / target users / non-goals) withupdate-root background— this is the primary greenfield deliverable. - If the user already has a sense of the tech choices or milestones, draft
stackand/orroadmapas early sketches withupdate-root. Mark them as provisional. Leave other slots absent until there is something real to say — don't inventarchitecture/flow/mindmapfor code that doesn't exist yet.
Wrap up (both modes)
Rebuild the index and review what you seeded:
brain reindex brain list-pages- Report back to the user: which root pages you drafted, which decision pages you created, and anything you marked low-confidence / needs confirmation.
- Remind the user of the standing rule: all reads and writes go through the
brainCLI — never hand-edit a brain file. From here, ongoing knowledge capture flows through the brain-page and brain-ingest skills.
Write the body of root pages, compiled_truth, and timelines in the user's working language, including every --summary. Keep technical identifiers (ids, slugs, field names, paths) verbatim. The CLI does not invent an English timeline sentence: pass --summary, or accept the title (create-page) / first line of the new compiled_truth (update-truth) as the entry.
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.

