A Claude Code skill that compiles raw source material into an interlinked Obsidian wiki — one command, portable across any number of knowledge bases.
You drop source material (PDFs, web clippings, notes) into a raw/ folder; running
/wiki-update reads it and compiles a clean, interlinked wiki/ of source summaries
and concept articles. It also keeps web-clipped sources current by re-checking their
URLs, and guards against duplicates — all autonomously, writing to your working tree
for you to review with git diff.
This repo doubles as a worked example of how to build a non-trivial Claude Code skill: a lean
SKILL.md, deeper docs underreference/, and dependency-free helper scripts underassets/.
- Compiles
raw/→wiki/as interlinked Markdown (source summaries + concept / reference articles + an index), in Obsidian[[wikilink]]style. - Web-refresh: web clippings carry their article URL; each run re-checks sources due for a look (throttled per-URL) and refreshes the clip if the article changed online — archiving the prior version first.
- Duplicate guard: detects exact duplicates (byte and same-run extracted-text) and flags near-duplicates for review instead of silently dropping them.
- Health check: a structural integrity check (links resolve, every page reachable from the index, counts match) you can run any time.
- Autonomous, but safe: it never commits; you review and commit. Raw file contents are treated as read-only (the one exception — refreshing a web clip from its own URL — archives the prior version first).
- Claude Code.
- System Python 3 (the helper scripts use only the standard library — no
pip install). - Optional:
pdftotext(from poppler) improves duplicate detection across PDF vs. Markdown copies of the same article. Without it, PDF text comparison degrades gracefully.
Clone into your user-level skills directory; the folder name matches the skill name, so the command works immediately:
git clone https://github.com/bryanpcutsinger/wiki-update ~/.claude/skills/wiki-updateThen, in any Claude Code session, run /wiki-update. (If you want to hack on the skill,
clone it elsewhere and symlink it into ~/.claude/skills/ so your edits stay live.)
Run it from the root of a knowledge base (the folder holding CLAUDE.md, raw/, and
wiki/):
- New knowledge base →
/wiki-updatescaffolds the structure (folders, a starterCLAUDE.mdwith the config block, the helper scripts) and you fill in the subject. - Existing knowledge base →
/wiki-updatecompiles any newraw/material and runs the web-refresh pass.
That's the whole interface: one command. Review the result with git diff and commit
when you're happy.
Method vs. subject. The skill owns the method (the generic raw → wiki pipeline);
each knowledge base owns its subject (topic, audience, folder taxonomy, voice) plus a
small config contract — a JSON block in that KB's CLAUDE.md declaring paths,
schema, and settings. The same skill therefore serves every knowledge base: the method
is constant, only the subject changes.
Progressive disclosure. SKILL.md stays short. Detailed algorithm and house-style
docs live in reference/ and are read on demand; reusable scripts and templates live in
assets/. Nothing loads until it's needed.
Helper scripts (all dependency-free, scaffolded into each KB's tools/):
| Script | Role |
|---|---|
wiki_health_check.py |
structural integrity checks; PASS/FAIL with exit code |
wiki_dupscan.py |
duplicate scanner (byte + extracted-text hashing, near-dup similarity) |
wiki_webcheck.py |
conditional-GET checker for web-clipped sources (classifies changed / unchanged / moved / gone) |
wiki_migrate.py |
one-time backfill when adopting the skill on a pre-existing wiki |
- Fresh init (a brand-new KB):
/wiki-updatescaffolds folders + a starterCLAUDE.mdand installs the three runtime helpers (wiki_health_check,wiki_dupscan,wiki_webcheck). - Retrofit onto an existing wiki: add the config-contract block to the KB's
CLAUDE.md, copy the helper scripts intotools/, and runwiki_migrate.pyonce to backfill identity fields onto existing notes — so the first compile recognises existing sources as done rather than recompiling everything.
The duplicate guard reliably catches exact duplicates (identical bytes, or identical normalized text within a single scan) and flags near-duplicates for review. Detecting that a re-saved, different-format copy (e.g. a PDF and a Markdown clip of the same article) matches an already-compiled source is best-effort — recorded content hashes are byte-based — so treat cross-format dedup as a helpful heuristic, not a guarantee.
wiki-update/
SKILL.md # the skill: frontmatter + lean method
reference/
methodology.md # the full compile algorithm
formatting-standard.md # article house style + front-matter schema
assets/
wiki_health_check.py # the four dependency-free helper scripts
wiki_dupscan.py
wiki_webcheck.py
wiki_migrate.py
starter-CLAUDE.md # subject + config-contract template for a new KB
MIT © 2026 Bryan Cutsinger