kb-capture
Skill3 starsChanged 3 months agoMITView on GitHub
Capture / ingest bridge for the LLM Knowledge Base. Sweeps Readwise HIGHLIGHTED sources (the operator highlights-then-archives, so highlights — not the inbox — are the signal) into the vault's raw/ queue for later /kb-compile; kb-tagged docs are captured unconditionally. A source is captured iff it has ≥1 highlight (notes count) AND is work-relevant, OR carries the kb tag; the work-relevance gate is host-scoped and opt-in (default: capture everything). Capture writes only under raw/ (never off-limits zones) and is idempotent. Use when ingesting highlighted reading into the knowledge base.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- paslavskyi/llm-wikitheir own version, first seen Oct 15, 2026
- Slava-code/college-kbtheir own version, first seen Oct 15, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- paslavskyi/llm-wiki★ 1same name
- Slava-code/college-kb★ 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 repository41 other files it gives its agents.
- cadence-goalsSkill
- ci-feedback-loopSkill
- compoundSkill
- decision-rights-doctrineSkill
- diataxisSkill
- dispatch-gateSkill
- drift-checkSkill
- family-checkSkill
- fix-then-re-review-ladderSkill
- github-projectsSkill
- gitSkill
- goal-treeSkill
- handoffSkill
- improvement-loopSkill
- kb-compileSkill
- kb-coreSkill
- kb-lessons-bridgeSkill
- kb-lintSkill
- l1-supervisorSkill
- l2-supervisorSkill
- lessons-learnedSkill
- lN-lifecycle-doctrineSkill
- lN-review-doctrineSkill
- medical-recordsSkill
- operator-interview-doctrineSkill
- operator-interviewSkill
- operator-reviewSkill
- planning-workflowSkill
- pr-review-fanoutSkill
- pull-taskSkill
- ralph-wiggumSkill
- reviewSkill
- root-cause-depthSkill
- scan-documentSkill
- self-improvementSkill
- self-verifySkill
- skillifySkill
- task-workflowSkill
- testing-without-mocksSkill
- vault-cloudSkill
- verify-inherited-premiseSkill
The file
Files
KB Capture
Implements the capture / ingest stage of the LLM Knowledge Base workflow (SPEC §2.1).
Eligible Readwise sources land in the vault's raw/ staging queue with their origin metadata
and highlights/notes intact, ready for /kb-compile.
Status: complete, plugin-hybrid. The deterministic core is implemented and unit-tested in
kb-core(is_eligible,source_key,highlights_fingerprint,new_highlights— AC-1.2/1.3/1.4/1.6/1.7) and, for Path A, inkb-capture's ownreadwise_folder(collect_sourcesand its primitives —book_id/highlight/metadata extraction, dated append-section aggregation, both backlink forms, gen1/gen2 duplicate handling). The vault reads/writes are agent-orchestrated peroperations/capture.md. Idempotency is content-aware, not existence-only: a source that gains highlights after its first capture is folded into the existingraw/<key>.mdon the next sweep instead of being skipped forever (operations/capture.md§ Re-sync vs. skip).
Plugin-hybrid (2026-07-18, operator-signed-off): Path A (the highlight sweep) no longer polls Readwise via MCP. The community "Readwise Official" Obsidian plugin is now the sole system that talks to Readwise; it syncs into the vault's local
Readwise/folder, and this skill reformats/filters from that folder intoraw/instead — closing the double-capture risk a live audit found (51/51raw/sources had duplicated into the plugin's folder).book_idstays the identity key throughout;kb-compileis unchanged. Path B (thekb-tag override) still uses a narrow Readwise MCP query, because Readwise never exports a zero-highlight source into the plugin's folder at all. Seeoperations/capture.md§ Second Readwise pipeline, andNotes/2026/07/2026-07-17-readwise-double-capture-audit-plugin-hybrid.mdfor the audit and design this implements.
What it sweeps
The operator's workflow is highlight → archive, so highlighted sources (not the inbox)
are the keeper signal. The default sweep enumerates every source in the Readwise Official
plugin's local Readwise/ vault folder — already pre-filtered to highlighted sources,
since Readwise's export only emits sources that have highlights — not location="new" and
not a live readwise_list_highlights poll. See operations/capture.md step 1.
Capture-eligibility predicate (SPEC §2.1)
A source is captured iff either:
- (A) Default path — has ≥1 highlight (notes count as highlights) AND is
work-relevant. The work-relevance gate is host-scoped and opt-in — default OFF. A
host only has the criterion below applied if it explicitly sets
KB_CAPTURE_WORK_RELEVANCE_GATE=on(environment, or in its own~/.claude/hosts/<hostname>.md— the same host-config opt-in conventiongoal-treeuses forGOAL_TREE_BACKEND, seeskills/goal-tree/lib/env-detection.md). On any unconfigured or gate-off host,work_relevantis alwaysTrue— every source with ≥1 highlight/note is eligible, topic irrelevant. This default-off shape is deliberate: an unconfigured or personal host must never silently start filtering out non-work reading just because this gate exists (seeoperations/capture.mdstep 2 for the resolution steps). Work-relevance criterion (applies only on gate-ON hosts — home vs. job/work reading): relevant when the source is about software engineering, AI/agent tooling, MCP, or infra/DevOps automation — the operator's standing professional domains. Not relevant when it's personal/home reading (health, hobbies, general news, fiction, etc.) with no tie to those domains. Judge against the source's own title/highlights, not the topic in the abstract — a general-audience article the operator highlighted for engineering reasons still counts. - (B) Tag override — carries the
kbtag → captured unconditionally (no highlight required, topic irrelevant, gate state irrelevant).
raw/ staging convention
raw/ is a subtree of the Obsidian vault (not this repo). Vault location is resolved
per-host via the obsidian-notes skill / host config — never hardcoded. Each captured
source is one raw artifact preserving URL, author, capture date, and highlights/notes
unmodified. Re-capturing an unchanged source is a no-op (keyed via kb_core.source_key,
compared via kb_core.highlights_fingerprint); a source whose highlights changed since its
last capture is updated in place (kb_core.new_highlights) rather than skipped.
Invocation
/kb-capture # sweep highlighted sources (bounded to a recent window)
/kb-capture <doc> # capture a specific Reader doc id/urlExecution
- Load the operation:
Read(${CLAUDE_PLUGIN_ROOT}/skills/kb-capture/operations/capture.md) - Execute it.
- Report which sources were staged into
raw/(and which were skipped, with the gate that skipped them).
Integration Points
- Readwise Official plugin
Readwise/folder — highlighted sources (primary, Path A); no MCP call, read viaobsidian-notes/Glob+Read. - Readwise MCP
reader_*tools —kb-tag override only (Path B — Readwise never exports a zero-highlight source into the plugin's folder, so this path can't move to the folder). - kb-capture's
readwise_folder—${CLAUDE_PLUGIN_ROOT}/skills/kb-capture/scripts/readwise_folder.py(collect_sourcesand its primitives) — parses the plugin folder for Path A. - kb-core —
${CLAUDE_PLUGIN_ROOT}/skills/kb-core/scripts/kb_core.py(CAPTURE_TAG,is_eligible,source_key,is_writable,highlights_fingerprint,new_highlights). - obsidian-notes skill / host config — resolves the vault path; performs vault writes.
- kb-compile — consumes the
raw/queue this skill fills; unchanged by this rearchitecture.
See Also
skills/kb-core/references/spec-v2-contract.md(AC-1.1–1.7 — capture contract and acceptance criteria).skills/kb-compile— the next stage.
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.

