skill
optimal-brain
Extended agent skills stack for research and long-term knowledge work. Adds loop engineering and a personal Obsidian knowledge vault on top of mattpocock/skills, with external research ingestion.
Set up
Skills are installed by placing their folder where your agent loads skills.
The download comes from github.com/ChidiOkoene/optimal-brain itself, not from our server, so what you get is exactly what its author published.
Install instructions come from the README
README
synced Oct 26, 2026optimal-brain
Give your coding agent a long-term memory: every research session becomes linked, sourced Obsidian notes it reads back next time.
optimal-brain is a skills stack for research and long-term knowledge work. It adds three layers on top of a solid engineering skill set:
- Vault memory: an Obsidian vault becomes the agent's durable memory. Research is captured as sourced notes with confidence levels and supersession rules, and read back in later sessions.
- Loops: goal-based agent loops (Plan → Act → Observe → Verify → Stop) with explicit, per-repo stop rules.
- Architect: a system-architecture orchestrator that works across 10 competence roles and produces a session hub, ADRs, and a delivery handoff.
flowchart LR
subgraph External[External Research Layer]
D["davidondrej research-and-web\n(browser, YT, APIs, web)"]
end
subgraph Memory[Personal Memory / Vault]
V["Obsidian Vault\n(PDFs, notes, sources)"]
LRV["Vault Learning Records\n(wikilinked)"]
KV["docs/agents/knowledge-vault.md"]
end
subgraph Synthesis["Synthesis & Capture"]
RV["research-from-vault (model)"]
T["/teach (user)"]
end
subgraph Execution["Engineering Execution + Loops"]
AL["agent-loop + /until-done"]
ENG["grill-with-docs, domain-modeling,\ntdd, implement, ..."]
ASK["/ask-brain (router)"]
end
D -->|"pull fresh\nmaterial"| V
V --> RV
RV --> LRV
T --> LRV
AL -->|"knowledge gap"| RV
ENG -->|"ground terms/decisions"| RV
ASK --> T
ASK --> RV
ASK -->|"install + use davidondrej\nthen synthesize"| D
Layered architecture (details in docs/OPTIMAL-BRAIN.md).
Credits
optimal-brain is an MIT-licensed fork of mattpocock/skills by Matt Pocock. The engineering fundamentals (grilling, domain modeling, TDD, PRDs/issues, codebase design, teach, and the overall skill model) come from there. External research ingestion is designed to work with davidondrej/skills by David Ondrej (research-and-web). See LICENSE for both copyright notices.
What's new vs mattpocock/skills
| Layer | mattpocock/skills | optimal-brain adds |
|---|---|---|
| Memory / second brain | None; learning stays in teach workspaces or chat | Obsidian vault as the durable store: setup-knowledge-vault, research-from-vault with RESEARCH-CAPTURE-FORMAT.md, project-notes, vault-context-canvas, decision-mapping |
| External sensing | None explicit | Recipes to ingest davidondrej/skills research into the vault and synthesize it |
| Autonomous iteration | No loop discipline | setup-agent-loops, agent-loop + STOP-RULES.md, /until-done, loop recipes |
| Synthesis | teach (local workspace) | teach bridges learning records into the vault and can use vault sources |
| Architecture | Implicit | system-architect with 10 role briefs, engagement types, and recipes |
| Routing | ask-matt | /ask-brain with a Knowledge, Research & Learning section |
| Review & writing | Unfinished drafts | two-axis-review (two axes, severities, loop gate) and write-from-vault (vault → sourced article with a claim ledger) |
Quick start (Lite: vault memory only)
-
Install:
npx skills@latest add chidiokoene/optimal-brainSelect at least
setup-knowledge-vaultandresearch-from-vault(addproject-notesandvault-context-canvasif you like). -
In your agent, run
/setup-knowledge-vaultand point it at your Obsidian vault. -
Ask the agent to research something using your vault, e.g. "research X using my vault".
research-from-vaultwrites linked, sourced notes back into the vault, and later sessions read them back.
Optional layers:
- Loops: install
setup-agent-loops,agent-loop,until-done; run/setup-agent-loopsonce per repo, then/until-done <goal>. - Architect: install
system-architect, then/system-architectfor discovery, as-is review, target design, or migration. - Engineering base: run
/setup-optimal-brainonce per repo beforeto-prd,to-issues,triage. - External research:
npx skills@latest add davidondrej/skillsand pickresearch-and-webto feed fresh material into the vault. - Git: the setup skills gitignore your personal vault config (
.agent/context/knowledge-vault.md,project-context.md,.scratch/) and tell you what to commit. Teams can share aknowledge-vault.example.mdtemplate. See AGENT-CONTEXT-PATH.md. - Also using gstack? See docs/WITH-GSTACK.md.
- Not sure where to start? Use
/ask-brain. For a full walkthrough see docs/PLAYBOOK.md.
Skill index
Vault memory layer
- setup-knowledge-vault (user): configure vault location, learning records, PDFs, context graph, and recipes for ingestion.
- seed-vault-from-repo (user): seed the vault from an existing repo: per-unit Findings, Decision Traces, Plans, and a Shared contracts layer, all citing paths and commit; re-sync updates only stale notes.
- research-from-vault (model): research and synthesize with the vault as the primary source; captures findings per
RESEARCH-CAPTURE-FORMAT.md. - project-notes (user): capture personal notes under
{ProjectFolder}/Personal Notes/. - vault-context-canvas (user): create or refresh an Obsidian JSON Canvas context graph.
- decision-mapping (user): turn a loose idea into a sequenced map of investigation tickets and drive them to resolution.
- teach (user): multi-session teaching workspace, bridged to the vault.
- write-from-vault (user): turn vault research into a sourced article (fragments → shape → beats) with a claim ledger; every claim traced to a note, superseded notes never cited.
- vault-sync (model): keep the vault current: diff git since the last sync, update or flag stale notes, capture missed decisions and review findings, append a session note.
Loops layer
- setup-agent-loops (user): verification commands, stop rules, scope, starter recipes. Run once per repo. Also has a design-a-custom-workflow path for specifying your own recurring workflows.
- agent-loop (model): Plan → Act → Observe → Verify → Stop discipline.
- until-done (user): run a goal-based loop until verification passes or a stop rule fires.
- implement (user): implement a PRD or issue using agent-loop discipline, gated by
/two-axis-review. - two-axis-review (model): two-axis review (Standards vs Spec) plus correctness, security, and tests; conventional-comments findings with severities and a PASS/FAIL verdict that loops use as a gate.
Architect layer
- system-architect (user): orchestrate architecture across up to 6 of 10 role briefs into a session hub, ADRs, and a
/to-prdhandoff.
Router and setup
- ask-brain (user + model): routes any task to the best skill or chain of skills across the whole pack.
- setup-optimal-brain (user): issue tracker, triage labels, domain doc layout.
Engineering base (from mattpocock/skills)
- User-invoked: grill-with-docs, triage, improve-codebase-architecture, to-issues, to-prd, prototype, grill-me, handoff, writing-great-skills
- Model-invoked: diagnosing-bugs, tdd, domain-modeling, codebase-design, resolving-merge-conflicts, grilling
Misc (not in the plugin manifest)
- git-guardrails-claude-code: Claude Code hooks that block dangerous git commands.
- setup-pre-commit: Husky + lint-staged pre-commit hooks.
User-invoked skills run when you type them (e.g. /until-done); model-invoked skills can also be picked up automatically by the agent when the task fits.
Agent compatibility
Skills are plain SKILL.md folders (the Agent Skills format), so any agent that reads that format should be able to load them. What the repo actually backs up:
| Agent | Status | Evidence |
|---|---|---|
| Cursor | Used during development | Development notes in .cursor/plans/; some skills mention Cursor features (e.g. /until-done, babysit) |
| Claude Code | Supported, not separately tested | .claude-plugin/plugin.json manifest; scripts/link-skills.sh links into ~/.claude/skills |
| OpenCode 1.19.0 | Tested 2026-10-13 (headless, anthropic/claude-sonnet-5.5 via OpenRouter) on the Agensi zips: discovery, research trigger, vault setup, seed-vault-from-repo, two-axis-review, write-from-vault export | docs/AGENSI.md; other skills not exercised |
Other Agent-Skills harnesses (~/.agents/skills) | Untested | scripts/link-skills.sh links there; install via npx skills add |
| Codex, GitHub Copilot, others | Untested | No specific docs yet |
Reports for untested agents are welcome via issues.
Local development
./scripts/list-skills.sh # list every SKILL.md
./scripts/link-skills.sh # symlink skills into ~/.claude/skills and ~/.agents/skills
Contributing
Agensi listing and zip build: docs/AGENSI.md. See CONTRIBUTING.md for how skills are organized and what a PR needs, and docs/ROADMAP.md for where the project is going. This project follows the Contributor Covenant.
License
MIT. See LICENSE.