/chidi-optimal-brain:write-from-vault A topic or question, a session hub, or an existing Drafts/ folder to resumefrom chidi-optimal-brain
Turn vault research notes into a sourced article, one stage at a time (mine fragments, shape a pyramid, write beat by beat), with every claim traced to a note, saved back into the vault, and exported to publish-ready Markdown. Use when the user wants a blog post, article, memo, or newsletter from their research, or says write this up from my notes. Reads and writes only this repo and the vault path you configured.
Ships in chidi-optimal-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Inspired by Matt Pocock's draft writing-fragments, writing-shape, and writing-beats skills in mattpocock/skills.
Your notes are the quarry. The article is the building. Every claim keeps its receipt.
Writing from a vault is not summarising it. Notes are atomic and written for you; an article is one argument written for a reader. This skill moves between the two in three stages, and the claim ledger carries the evidence across so nothing in the final piece is unsourced, superseded, or stronger than its source.
Read .agent/context/knowledge-vault.md first (fallback: docs/agents/knowledge-vault.md). If missing, run /setup-knowledge-vault before continuing. If missing and .agent/context/knowledge-vault.example.md exists, ask the user to copy it and fill in their own path; never use the placeholder. Also read vault Indexes/Context Index.md when present.
Settle three things with the user, one question at a time, each with your recommended answer:
Create the draft workspace (see DRAFT-WORKSPACE.md):
{Vault}/Drafts/<Article Title>/
Brief.md question, reader, form, grounded concepts, status
Fragments.md stage 1 output
Claim Ledger.md every claim → evidence (the spine of the whole skill)
Outline.md stage 2 output
<Article Title>.md stage 3 output
export/ stage 5 output (publishable copy + report)
Resuming? Read Brief.md status and continue from the next stage. Re-read files from disk before every write; the user may have edited them.
Goal: a pile of raw material, each piece with a pointer back to where it came from. Detail: FRAGMENTS.md.
Findings/, synthesis notes, source companions. Follow [[wikilinks]] one or two hops.superseded_by set → don't use; follow the link to the replacement.confidence: exploratory → may appear only as a flagged hypothesis ("early evidence suggests…").valid_until in the past → treat as stale; ask the user before using.superseded_by says otherwise.Fragments.md: one idea, its source [[Note]], and type (claim, evidence, example, quote, counterpoint, question).[[Brief]] as author's view. One question at a time.research-from-vault, which captures findings back into the vault), soften it to opinion, or cut it.Exit when the user agrees the pile is enough. Set status: fragments-done.
Goal: an outline where the top is one claim and everything below supports it. Detail: SHAPE.md.
Write Outline.md. Set status: shaped.
Goal: the article, written one beat at a time in the reader's order. Detail: BEATS.md.
Brief.md: concepts the reader has. A beat may only lean on grounded concepts; when it introduces one, add it.[[Finding Note]] in vault drafts, or a footnote/link in the export. Match hedging to strength: strong states plainly, moderate hedges, weak/exploratory is framed as hypothesis or cut.Set status: drafted.
Run this before calling the draft done, and again after any big edit:
superseded_by set or an expired valid_until.exploratory evidence is visibly hedged.must-address is addressed in the text.Fix and re-run until all pass. On failure in a loop (/until-done), treat this checklist as the verifier.
Indexes/Context Index.md under drafts (or the index the vault config names).Findings/ per research-from-vault's capture format, not only into the article.
Set status: verified when the gate passes.Detail: EXPORT.md. Ask the destination, pick the style (footnotes for GitHub/dev.to/blogs, links for Substack/Medium/email, pandoc for PDF/academic), then run:
python3 scripts/export.py "<vault root>" "Drafts/<Article Title>" --style <style>
It writes Drafts/<Article Title>/export/<slug>.md (wikilinks → citations, embeds resolved, vault metadata stripped) and EXPORT-REPORT.md (unresolved links, superseded/exploratory/expired sources, ledger rows to re-check, notes without public URLs). Clear every flag with the user; superseded or missing evidence sends you back to Stage 4. Set status: exported. Publishing is the user's call; never post anywhere.
Worked example: examples/. Research behind the design: REFERENCES.md.
BEATS.md (opens in a new tab)CLAIM-LEDGER.md (opens in a new tab)DRAFT-WORKSPACE.md (opens in a new tab)EXPORT.md (opens in a new tab)FRAGMENTS.md (opens in a new tab)README.md (opens in a new tab)REFERENCES.md (opens in a new tab)SHAPE.md (opens in a new tab)examples/README.md (opens in a new tab)examples/expected-export/EXPORT-REPORT.links.md (opens in a new tab)examples/expected-export/EXPORT-REPORT.pandoc.md (opens in a new tab)examples/expected-export/why-agents-forget.links.md (opens in a new tab)examples/expected-export/why-agents-forget.pandoc.md (opens in a new tab)examples/sample-vault/Drafts/Why Agents Forget/Brief.md (opens in a new tab)examples/sample-vault/Drafts/Why Agents Forget/Claim Ledger.md (opens in a new tab)examples/sample-vault/Drafts/Why Agents Forget/Why Agents Forget.md (opens in a new tab)examples/sample-vault/Drafts/Why Agents Forget/export/EXPORT-REPORT.md (opens in a new tab)examples/sample-vault/Drafts/Why Agents Forget/export/why-agents-forget.md (opens in a new tab)examples/sample-vault/Findings/Agents Remember Via Chat History.md (opens in a new tab)examples/sample-vault/Findings/Context Windows Reset Per Session.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (chidiokoene/optimal-brain) — no native marketplace selected
npx claudepluginhub p/chidiokoene-mattpocock-skills36 skills in this plugin
/agent-loopAgentic loop discipline. Use when the user wants to loop until done, iterate until tests pass, keep fixing until green, run until verification passes, or mentions red-green-refactor in an iterative fix context./ask-brainRouter for the whole optimal-brain pack: given a task, picks the single best skill or an ordered chain of skills, says why, and says what to skip. Use when the user is unsure which skill to use, asks what to do next or where to start, or describes a task without naming a skill./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.