Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wiki-update

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 under reference/, and dependency-free helper scripts under assets/.

What it does

  • 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).

Requirements

  • 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.

Install

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-update

Then, 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.)

Usage

Run it from the root of a knowledge base (the folder holding CLAUDE.md, raw/, and wiki/):

  • New knowledge base/wiki-update scaffolds the structure (folders, a starter CLAUDE.md with the config block, the helper scripts) and you fill in the subject.
  • Existing knowledge base/wiki-update compiles any new raw/ 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.

How it works

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

Two adoption paths

  • Fresh init (a brand-new KB): /wiki-update scaffolds folders + a starter CLAUDE.md and 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 into tools/, and run wiki_migrate.py once to backfill identity fields onto existing notes — so the first compile recognises existing sources as done rather than recompiling everything.

A note on duplicate detection

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.

Repo layout

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

License

MIT © 2026 Bryan Cutsinger

About

A portable Claude Code skill: compile a raw/ folder into an interlinked Obsidian wiki, with web-clip refresh and duplicate guarding.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages