project-brain
Skill0 starsChanged 7 months agoMITView on GitHub
Use when Codex needs to create, maintain, ingest into, compile, lint, or query a self-contained ProjectBrain markdown memory system via the bundled `scripts/memory_os.py` runtime. Trigger for requests about project memory, persistent coding learnings, architecture knowledge, best practices, mistakes, experiments, decisions, or grounded answers from the local Memory OS instead of ad hoc rediscovery. Also trigger when current work produces a durable project lesson worth preserving, even if the user did not explicitly ask to update memory.
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
- Ethan-YS/project-braintheir own version, first seen Oct 18, 2026
- jscraik/Agent-Skillstheir own version, first seen Sep 27, 2026
- HuaKaiBuChangWu/project-braintheir own version, first seen Jul 31, 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
- Ethan-YS/project-brain★ 173same name
- jscraik/Agent-Skills★ 9same name
- madeinlowcode/skills-claude-code★ 7same name
- dahshanlabs/klypix-plugin★ 0same name
- HuaKaiBuChangWu/project-brain★ 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 repository2 other files it gives its agents.
- himalaya-emailSkill
- llm-wikiSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
53 rules. 0 are common, 36 are distinctive, and 17 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
36
Distinctive
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to operate the bundled ProjectBrain Memory OS.
- Very specific: line 13
Default memory root: repo-local .\.project-brain
- Distinctive: line 18
Treat ProjectBrain as a compiled, local-first memory layer for project work.
- Distinctive: line 29
Do not use it as a chatbot.
- Distinctive: line 35
When working inside a repo, prefer this default behavior:
- Distinctive: line 37
read from ProjectBrain whenever project memory is relevant
- Distinctive: line 38
write to ProjectBrain only when the outcome is durable and likely to matter again
- Distinctive: line 58
If you auto-capture, say so explicitly in the response and list the files that changed.
- Distinctive: line 84
prefer updating an existing file over creating a new one
- Distinctive: line 86
keep related items linked
- Distinctive: line 87
keep markdown human-readable and debuggable
- Very specific: line 88
treat topics/project-memory-overview.md as the high-level synthesis page
- Very specific: line 89
treat tasks/ as the durable planning layer for next work
- Distinctive: line 93
Before making substantive changes:
- Very specific: line 99
Read <memory-root>\system\AGENTS.md if it exists
- Very specific: line 101
If present, read topics/memory-retrieval-contract.md to learn the repo's preferred memory read order
- Very specific: line 102
Prefer reading topics/project-memory-overview.md and relevant tasks/ files before adding new memory
- Very specific: line 103
If the request depends on the current graph state, run lint or query first
- Distinctive: line 105
Always keep the resolved root explicit in your working notes and final response.
- Distinctive: line 111
Run the bundled script from any working directory.
- Very specific: line 126
If the user wants a different memory root, pass --root <path>.
- Distinctive: line 142
When you emit or run shell commands for ProjectBrain work on Windows:
- Distinctive: line 144
Always prefer single-line PowerShell-compatible commands.
- Distinctive: line 145
Never split a path argument across lines.
- Very specific: line 147
Prefer single-quoted regex patterns when using rg from PowerShell.
- Very specific: line 156
If rg is unavailable, blocked, or fails to launch, fall back to PowerShell-native search instead of retrying the same command shape:
- Distinctive: line 162
Do not assume a wrapped command shown in the UI is safe to copy back into PowerShell unchanged.
- Distinctive: line 168
Use when the memory tree does not exist yet or the user asks to recreate the baseline structure.
- Distinctive: line 176
Use when the user gives you:
- Very specific: line 192
Update entities/, topics/, decisions/, and experiments/
- Distinctive: line 200
Prefer merging into existing entities/topics
- Distinctive: line 201
If many related lessons arrive together, cluster them before writing so memory grows by synthesis instead of fragmentation
- Very specific: line 202
If the ingest is broad, run compile afterward
- Distinctive: line 203
If the result is not durable enough, skip ingest instead of forcing memory growth
- Distinctive: line 207
Use after multiple ingests or when the graph looks fragmented.
- Distinctive: line 218
Use compile when you need the memory system to become cleaner and more connected, not just larger.
- Distinctive: line 222
Use when the user asks for:
- Very specific: line 236
If needed, follow with /compile
- Distinctive: line 240
Use when the user asks a project-memory question.
- Distinctive: line 245
Read the returned grounded answer
- Distinctive: line 246
If the answer looks too thin, inspect the referenced files and ingest missing context
- Very specific: line 247
If the answer is durable and likely to matter again, file it back into topics/, decisions/, experiments/, or tasks/
- Distinctive: line 251
Use when the user asks:
- Very specific: line 261
Read relevant decisions/, experiments/, tasks/, and recent logs/
- Very specific: line 263
Update an existing task file when the workstream already exists.
- Very specific: line 269
Do not create a parallel planning system outside tasks/
- Distinctive: line 270
Prefer a small number of durable workstreams over many throwaway task files
- Distinctive: line 275
When you act on ProjectBrain:
- Distinctive: line 281
call out contradictions or low-confidence areas
- Distinctive: line 292
Do not add a database
- Distinctive: line 293
Do not add embeddings unless the user explicitly changes the architecture
- Distinctive: line 294
Do not bypass the markdown memory system with ad hoc notes elsewhere
- Distinctive: line 295
Do not create duplicate concept files when an update would do
“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
Use this skill to operate the bundled ProjectBrain Memory OS.
The bundled implementation is:
- CLI:
<skill-dir>\scripts\memory_os.py - Default memory root: repo-local
.\.project-brain - Rules file:
<memory-root>\system\AGENTS.md
What This Skill Does
Treat ProjectBrain as a compiled, local-first memory layer for project work.
Use it to:
- bootstrap the memory tree
- ingest raw lessons, notes, logs, or files
- compile memory so relationships improve over time
- lint the graph for structural drift
- answer questions from grounded project memory
- plan the next durable work from the current memory graph
Do not use it as a chatbot. Use it to maintain a filesystem-backed knowledge layer.
Implicit Capture Policy
You do not need an explicit $project-brain request to update memory.
When working inside a repo, prefer this default behavior:
- read from ProjectBrain whenever project memory is relevant
- write to ProjectBrain only when the outcome is durable and likely to matter again
Automatically capture new memory when the current task yields:
- a reusable fix
- a root cause
- a project-specific gotcha
- a stable best practice
- a decision with rationale
- an experiment and its result
- a workflow improvement that will likely recur
Do not auto-capture:
- casual Q and A
- speculative guesses that are not yet validated
- trivial lookups
- one-off conversational advice
- content with no likely future reuse
If you auto-capture, say so explicitly in the response and list the files that changed.
Core Model
ProjectBrain uses this fixed structure under the resolved memory root:
memory-os/
|-- raw/
|-- sources/
|-- entities/
|-- topics/
|-- decisions/
|-- experiments/
|-- logs/
|-- tasks/
`-- system/Workflow order is mandatory:
RAW -> SOURCES -> ENTITIES -> TOPICS -> LOGS
Rules that must hold:
raw/is immutable after capture- prefer updating an existing file over creating a new one
- preserve contradictions instead of deleting them
- keep related items linked
- keep markdown human-readable and debuggable
- treat
topics/project-memory-overview.mdas the high-level synthesis page - treat
tasks/as the durable planning layer for next work
First Step In Every Session
Before making substantive changes:
- Resolve the active memory root:
- nearest repo root +
.\.project-brain - otherwise current working directory +
.\.project-brain - override with
--rootwhen needed
- nearest repo root +
- Read
<memory-root>\system\AGENTS.mdif it exists - Inspect the relevant memory files under the active memory root
- If present, read
topics/memory-retrieval-contract.mdto learn the repo's preferred memory read order - Prefer reading
topics/project-memory-overview.mdand relevanttasks/files before adding new memory - If the request depends on the current graph state, run
lintorqueryfirst
Always keep the resolved root explicit in your working notes and final response.
The skill is self-contained. Do not depend on C:\ProjectBrain during normal use.
Commands
Run the bundled script from any working directory.
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py bootstrap
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py /ingest "Decision: adopt feature flags for safer releases."
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py /ingest --file C:\path\to\postmortem.md --label "Release Postmortem"
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py /compile
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py /lint
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py /query "What do we know about release safety?"
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py /plan
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py /plan "release safety and rollout risk"By default, the CLI uses .\.project-brain at the current repo root.
If the user wants a different memory root, pass --root <path>.
Example from inside a repo:
py -3 C:\Users\niklasb\.codex\skills\project-brain\scripts\memory_os.py bootstrapThat should initialize:
<repo>\.project-brain\Shell Command Hygiene
When you emit or run shell commands for ProjectBrain work on Windows:
- Always prefer single-line PowerShell-compatible commands.
- Never split a path argument across lines.
- Quote full paths when they may contain spaces.
- Prefer single-quoted regex patterns when using
rgfrom PowerShell. - Pass each target path as its own argument instead of relying on shell expansion tricks.
Preferred search shape:
rg -n '(decision|experiment|incident|gotcha|rollback|validation)' .\ .project-brainIf rg is unavailable, blocked, or fails to launch, fall back to PowerShell-native search instead of retrying the same command shape:
Get-ChildItem -Path .\.project-brain -Recurse -File | Select-String -Pattern 'decision|experiment|incident|gotcha|rollback|validation'Do not assume a wrapped command shown in the UI is safe to copy back into PowerShell unchanged.
Task Workflow
Bootstrap
Use when the memory tree does not exist yet or the user asks to recreate the baseline structure.
- Run
bootstrap - Confirm the folder tree exists
- Inspect seeded examples if they matter to the task
Ingest
Use when the user gives you:
- pasted notes
- postmortems
- architecture docs
- logs
- local files
- lessons learned
- best practices or mistakes worth preserving
Also use implicitly when the current task itself produced a durable lesson that should be preserved.
Behavior:
- Capture the raw input into
raw/ - Let the CLI write a
sources/summary - Update
entities/,topics/,decisions/, andexperiments/ - Refresh
topics/project-memory-overview.mdwhen the new material changes the project-level picture - Let the log capture the action
- Report the concrete files created or updated
Guardrails:
- Never edit
raw/ - Prefer merging into existing entities/topics
- If many related lessons arrive together, cluster them before writing so memory grows by synthesis instead of fragmentation
- If the ingest is broad, run
compileafterward - If the result is not durable enough, skip ingest instead of forcing memory growth
Compile
Use after multiple ingests or when the graph looks fragmented.
Behavior:
- Normalize document paths from titles
- Prune generic junk entities
- Merge exact duplicates
- Rewrite stale references
- Strengthen relationships
- Refresh
topics/project-memory-overview.md
Use compile when you need the memory system to become cleaner and more connected, not just larger.
Lint
Use when the user asks for:
- audit
- health check
- contradiction scan
- duplicate detection
- orphan detection
- improvement suggestions
Behavior:
- Run
/lint - Prioritize hard problems first
- Summarize findings with file references
- If needed, follow with
/compile
Query
Use when the user asks a project-memory question.
Behavior:
- Run
/query - Read the returned grounded answer
- If the answer looks too thin, inspect the referenced files and ingest missing context
- If the answer is durable and likely to matter again, file it back into
topics/,decisions/,experiments/, ortasks/
Plan
Use when the user asks:
- what should we do next
- what gaps exist in project knowledge
- what should be remembered as follow-up work
- where the current risks or weak spots are
Behavior:
- Read
topics/project-memory-overview.md - Read relevant
decisions/,experiments/,tasks/, and recentlogs/ - Identify missing synthesis, repeated failures, weak coverage, or unresolved follow-up work
- Update an existing task file when the workstream already exists; otherwise create a focused new task file under
tasks/ - Link the task file back to the relevant memory pages
- Log the planning activity
Guardrails:
- Do not create a parallel planning system outside
tasks/ - Prefer a small number of durable workstreams over many throwaway task files
- Planning should reflect compiled memory, not just the last chat turn
How To Respond
When you act on ProjectBrain:
- state the active memory root first
- report the command you ran in plain language
- name the files created or updated
- state whether memory was updated or intentionally skipped
- call out contradictions or low-confidence areas
- suggest the next best operation when useful, usually
compile,lint,plan, or anotheringest
Preferred phrasing:
Active memory root: C:\path\to\repo\.project-brainUpdated under C:\path\to\repo\.project-brain: ...Memory update skipped: no durable lesson was produced by this task.
Constraints
- Do not add a database
- Do not add embeddings unless the user explicitly changes the architecture
- Do not bypass the markdown memory system with ad hoc notes elsewhere
- Do not create duplicate concept files when an update would do
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.

