/research-vault:capture-sourcefrom research-vault
Use when a person asks to capture, refresh, add, or compile a source in a research-vault vault, or to propagate a citation-key change
Ships in research-vault. 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.
None: SKILL.md is the whole skill.
Ingest is the process that gets a source from outside the vault into the vault: selection (the person's decision), add (the Zotero item), capture (the deterministic copy into the vault), compile (the adopted tool's pages). This skill runs the mechanical steps; the decision is never yours. If the person has not decided, stop and ask; nothing in inbox/ is citable, and no amount of capturing changes that.
No project is required. The flow is continuous and project-independent, so every step below runs on a vault with zero projects; only find-sources is project-scoped.
In every command, PATH is the vault and KEY is either the Zotero item key (eight upper-case characters, shown in Zotero's item pane) or the citation key — Zotero's own Citation Key field, which Better BibTeX fills and which shows in the item list's Citation Key column. Never invent or guess one. Every mechanical act below is a CLI verb call: you compose and explain, the CLI writes. literature/, fulltext/, system/bibliography.json, system/propagations/ and wiki/ are machine surfaces; never Write or Edit them.
addWhen the item is not in Zotero yet and the person has asked you to add it, write a Zotero item JSON file — itemType plus any of the snapshot fields (title, creators, date, DOI, PMID, PMCID, url, publicationTitle, volume, issue, pages, publisher, ISBN, language, abstractNote, extra, accessDate, tags) — and run:
python3 -m research_vault add --vault PATH --item ITEM.json [--collection COLLECTION_KEY]
The first run on a machine opens Zotero's own consent dialog (Allow, Always Allow, Deny); tell the person to answer it in Zotero. Never retry add in a loop: the dialog is rate-limited to five a minute. Better BibTeX fills the citation key a few seconds after creation; add waits up to ten seconds and then captures the new item. Capture writes the item's tags twice: zotero-tags as Zotero holds them and tags slugged for Obsidian (doi-fix:low-confidence has its colon replaced by a hyphen); type-specific field names fold to Zotero's base names in the note. In zotero-tags, a tag loses its leading and trailing whitespace, and any inner run of whitespace becomes one space. unkeyed means the key never arrived: report it, do not write a note by hand.
capturepython3 -m research_vault capture KEY [KEY ...] --vault PATH
python3 -m research_vault capture --all --vault PATH # refresh every captured note
Capture runs the lifecycle linter first, then for each item reads the item, its children and the indexed text, writes literature/<citation key>.md (frontmatter: Zotero's own fields verbatim, the provenance tuple, a body carrying only the attachment list and the item's Zotero child notes), writes fulltext/<attachment key>.md for every attachment with usable text, exports each rendered item's CSL entry before rendering, records its hash in the note (csl-sha256), and rewrites the entries of the items it rendered in system/bibliography.json — an entry moves only with its note. One line per outcome:
| Line | What happened |
|---|---|
MATCHED KEY — matched | The note was written or rewritten. |
MATCHED KEY — matched — NOOP | The projection is identical. Nothing was written. Report it as "already current", never as an error and never as a capture you performed. |
UNMATCHED KEY — not-admitted — … | The key is not in the library. |
UNMATCHED KEY — no-fulltext — … | The note was written, but no attachment has usable text (absent, partial past Zotero's page cap, or below the content floor), so there is no compile input. Read the reason back verbatim. |
SKIPPED KEY — no-fulltext — no attachment to read (…) | The item holds no file at all — a web page, a repository, a program. The note was written; the text checks do not apply, and nothing was filed. Getting text for such sources is out of scope for capture, not a capture failure. A source with no attachment reaches compile by attaching one in Zotero, letting Zotero index it, and capturing again; text the tool's defuddle or autoresearch skills produce lands where capture never looks. |
UNMATCHED KEY — re-keyed — old → new; run propagate | The citation key changed. Capture refuses while literature/old.md still exists, because writing new.md beside it would dead-end propagate; run propagate (§4), whose own recapture proceeds because the rename has already moved the old note away. |
UNMATCHED KEY — merged — … | Zotero merged the item into the survivor the reason names. Nothing was written; run propagate (§4), which maps this key to the survivor's: it renames this note, removes it, or, when the survivor kept this key, recaptures it in place; a refusal names its hand step. |
UNMATCHED KEY — trashed|deleted — … | The item left the library. Nothing was written; the note is kept. A trashed attachment is not this row: capture re-renders the note without it and the commit hook reports the attachment leaving the tuple (check id capture-monitor). |
UNMATCHED vault — database-changed — … | A different Zotero database answered. Nothing was written. Stop and tell the person which server id the notes record. |
UNMATCHED tags — drift — tags changed on: … | A recapture moved the tag fields of the named notes and no held value. One summary row per run, held under capture; it blocks nothing: no surface closes on it, and capture's exit 1 only reports the filed record, as for no-fulltext. |
UNREACHABLE … — outage — … | Zotero did not answer. Never a verdict on the source. Retry later. |
Capture also runs doctor's cold rows and files one review record per add-on or tool off its declared settings, under check ids plugins, advisory, bbt-git, compile-tool and obsidian. Each is an UNMATCHED <component> — mismatch — … line. A newly filed one makes the run exit 1 like any other record; one already open or acknowledged files nothing and leaves the exit alone. plugins, bbt-git, compile-tool and obsidian rows hold publish: fix the setting, then acknowledge the row. An advisory row is warn-only and holds nothing.
Every UNMATCHED and UNREACHABLE line already filed its own review record under check id capture; a SKIPPED line is never filed (the fourth state is automatic-only, never a finding). Never file one for a failed capture yourself. If stderr carries warning: review record refused:, say so out loud.
A recapture that changed a held value, an attachment or its md5 holds the next commit with one capture-monitor row per change: confirm each change in Zotero and acknowledge it through project-flow's ack. A note whose tag fields moved and no held value becomes the non-blocking summary row instead.
Run python3 -m research_vault verify --vault PATH with the network on after a capture: it runs the lifecycle linter over every note (check id lifecycle), the captured-set lint at the compile seam (captured-set) and the update-notice check. Route reading of that run to verify-citations.
propagateA re-keyed finding means the source's name changed while its identity (the item key) did not. Until propagation runs, the note's filename contradicts its recorded key and every [@old] citation and every link to literature/old.md dangles. Propagation is the one command here that rewrites what a person wrote, so it is planned, shown, and applied only against the plan you showed:
python3 -m research_vault propagate --vault PATH # plan: every re-keyed note the linter reports
python3 -m research_vault propagate --vault PATH --map OLD=NEW # plan from an explicit mapping, e.g. after a deliberate regenerate
python3 -m research_vault propagate --vault PATH --plan FILE --approved-plan-sha256 SHA # apply, exactly as printed
The plan lists the rename, the item key and every file it will rewrite, and ends with the apply line carrying the plan's hash; show it to the person and run that line unchanged. If anything the plan named moved in between, apply refuses with mismatch — plan changed: plan again. Apply renames the note, rewrites [@key] citations and the links that name the note in drafts and wiki pages, re-captures the item, and keeps the applied plan under system/propagations/ — the record a reader follows an old key forward through. The review queue is never rewritten; acknowledgments on the renamed note lapse by scope, as they do for any content change. The propagation check fails a commit while any surface still names a key an applied plan mapped away. A merged finding is propagated the same way: the plan maps the loser's key to the survivor's and prints a merge line, which ends removes literature/<loser>.md when the survivor already has a note or another loser's note becomes it. Apply renames the loser's note when the survivor has none, re-captures the survivor, and removes the loser's note only once that re-capture matched; otherwise it keeps the note and says so.
compileCompile is the adopted tool's job (claude-obsidian; see setup-vault). The wrapper registers the captured sources in the tool's ledger and never writes under wiki/:
python3 -m research_vault compile KEY [KEY ...] --vault PATH # prints the tool's plan and approval hash
python3 -m research_vault compile --all --vault PATH # the whole captured set; a note without text is a SKIPPED row
python3 -m research_vault compile --vault PATH --bundle BUNDLE --approved-plan-sha256 SHA
Show the person the plan before applying. Two hash-approved bundles gate compile: the wrapper's ledger record (this approval hash) and wiki-ingest's page bundle (the tool's own transaction gate); the tool's model reads fulltext/<attachment key>.md, which is not on wiki-ingest's own input list — the wrapper registers it. Then run the tool's wiki-ingest skill on the registered fulltext/<attachment key>.md files; the pages it writes under wiki/ cite the literature note with the wikilink [[<citation key>]], which the commit hook's fixer leaves as written. Then run the tool's wiki-lint skill over wiki/ — orphans, dead links, frontmatter — then verify. Then python3 -m research_vault seal --vault PATH: it records the hash of every page the tool wrote and normalises their links; a page left unsealed is reported by compiled-layer and holds the commit until sealed or acknowledged. Then run capture KEY again (or capture --all): the note now embeds the compiled page, , from the ledger's pages[]. Until that second capture the embed is absent — expected, not an error. A note whose text changed after compile is reported recompile-needed by verify.
| Result | Meaning at capture |
|---|---|
| MATCHED | The step ran and agreed. Only the CLI's deterministic checks mint a verified event; nothing in this skill ever does. |
| UNMATCHED | The step ran and disagreed. Already in the review queue — do not file it again. |
| UNREACHABLE | The step could not run — Zotero or the network is down. Never a verdict on the source. Retry later. |
| SKIPPED | The step does not apply. Automatic only. |
The same honesty covers your own reading. A source you read only in part is reported partial, with the range you did not read named — pages the text layer stops at, sections you never reached. That is SKIPPED applied to reading: an unread stretch must never read as read.
| Need | Route to |
|---|---|
| Find sources to add | find-sources |
| Rules for the compiled layer | synthesis-conventions |
| Run the deterministic checks | verify-citations |
| Acknowledge a finding capture filed or the commit hook raised | project-flow or publish (the ack verb) |
| Install Zotero add-ons or the compile tool | setup-vault |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub eranroseman/research-vault --plugin research-vault10 skills in this plugin
/evidence-conventionsUse when writing or editing claims, citing sources, or drafting in a research-vault vault — also for claim or quote syntax questions/factcheck-draftUse when a person asks to factcheck a draft, sanity-check claims against their sources, or run factored verification before review/find-sourcesUse when a person asks to find, search, or look up literature, papers, citations, DOIs, PMIDs, arXiv IDs, or open-access sources for a research-vault project, before anything is added to ZoteroOther plugins' skills for the same job