gbrain-capture
Skill1 starsChanged 2 months agoMITView on GitHub
Capture durable knowledge into GBrain (a portable memory layer at ~/.gbrain, independent of any coding harness) via the `gbrain` CLI. Use when the user says "G-Brain Capture", "GBrain capture", "remember this in GBrain", "save this to my brain", "capture this lesson/decision/failure mode", or asks to preserve project memory in a substrate that plugs in anywhere.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bayesianSkill
- claudes-gambleSkill
- codebase-designSkill
- councilSkill
- elon-first-principlesSkill
- find-skillsSkill
- first-principlesSkill
- fleet-conductorSkill
- garciaSkill
- grill-meSkill
- karpathySkill
- kissingerSkill
- meta-conductorSkill
- outcome-lockSkill
- pre-kSkill
- release-managerSkill
- rumsfeldSkill
- setup-lennySkill
- ship-conductorSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Verify: export PATH="$HOME/.bun/bin:$PATH".
- Very specific: line 21
If the source does not exist, the CLI reports the available sources.
- Very specific: line 52
A correction the user gives twice: If the same preference or correction recurs across turns or runs, capture it when you notice the second …
≈ “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
GBrain Capture
GBrain is a portable memory layer at ~/.gbrain, independent of any coding harness and pluggable into any agent or tool. Capture durable knowledge here; it is a memory layer, not proof. Always verify live files and tests before acting on a recalled memory later.
Step 0: PATH
gbrain is a bun script and may not be on a coding harness's default PATH. Prefix every gbrain command with:
export PATH="$HOME/.bun/bin:$PATH"Verify: export PATH="$HOME/.bun/bin:$PATH"; which bun gbrain → both should resolve under ~/.bun/bin. If not, stop and tell the user GBrain/bun isn't on PATH.
Capture workflow
- Pick the source (a namespace):
--source example-projectfor a named project.- the source the user names; omit
--sourcefor global/non-project memory. - If the source does not exist, the CLI reports the available sources. Create it once with
gbrain sources add <name>; it is then searched only when named via--source.
- Capture a concise packet (
--json,--type note):
export PATH="$HOME/.bun/bin:$PATH"
gbrain capture --json --type note --source <source> --stdin <<'PKT'
Title: <short durable title>
Project: <repo/project if known>
Date: <YYYY-MM-DD>
Context:
<what happened>
Decision / Lesson:
<what should be remembered>
Failure Modes:
<what went wrong / what to watch for>
Verification:
<commands, files, tests, commits, evidence from this session>
PKT
echo "exit=$?"- Don't claim success until exit 0. Report the returned
slug/ JSON id.
What to capture (durable, not noise)
- Decisions + the reason they were made.
- Failure modes + how to detect/prevent them.
- Verification criteria and known data-quality risks.
- Shipping summaries with verification commands.
- Non-obvious project conventions; skill combinations that worked.
- A correction the user gives twice. If the same preference or correction recurs across turns or runs, capture it when you notice the second occurrence. Recurrence is the durable signal. This mirrors the
bayesianrepetition trigger; capture it here and draft the guard there. - Do NOT capture secrets/credentials, full private logs, or large raw dumps unless the user explicitly asks.
Retrieval (before work, treat as leads and verify afterward)
export PATH="$HOME/.bun/bin:$PATH"
gbrain query "<question>" --source-id <source> --adaptive-returnNotes
gbrain sources listshows registered namespaces (defaultis federated; named sources are searched only when specified).- Mirror major learnings here and in the relevant project skill so they persist both in-tool and in the portable layer.
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.

