agentleFS
QuarktexQuarktex/qcobrain/.claude/skills/wiki-doctor/SKILL.md

wiki-doctor

Skill4 starsChanged 4 months agoMITView on GitHub

Standing integrity check + regenerator for your co-brain. Re-resolves every `src` quote against `sources/`, detects drift/stale quotes/orphans/broken-links/circular-provenance, regenerates `INDEX.md` and the four `digests/` deterministically, and burns down `inbox/` drafts older than 14 days. Read-only except the derived files. Triggers - "check my brain", "wiki health", "wiki-doctor", or run weekly as a Cadence ritual.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. suwonleee/llmwiki★ 17same 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 repository16 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run it weekly (pair with /curator).

    line 10
  2. Very specific:

    Never leave INDEX.md or digests/ diverged from disk.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Inherits references/kernel.md (the provenance contract). Reads references/wiki-spec.md for schema.

This is the Cadence layer for knowledge: it turns provenance from per-run discipline into a standing guarantee. Run it weekly (pair with /curator).

Execution

1 — Source integrity (drift detection)

  • For every file in sources/, recompute shasum -a 256 <f> | cut -c1-12 and compare to sources/_sources.md. Hash changed → the source was edited; mark its last_verified stale and check dependent notes.
  • For every src block in every wiki/ note, re-resolve source → path and confirm the quote is still a verbatim (whitespace-normalized) substring. List any that no longer resolve as STALE with the note id, the source-key, and the failing quote.
  • Flag any source-key referenced by a note but missing from _sources.md (broken registry), and any source file on disk not registered (unindexed source).

2 — Graph integrity

  • Orphans: notes with no inbound or outbound [[wikilinks]] (links: [] and not referenced). List them as candidates for linking or merging.
  • Broken links: [[wikilinks]] / links: ids that don't resolve to a wiki/ file.
  • Circular provenance: any src block whose source is actually a wiki/ id (forbidden). Flag loudly.
  • Near-duplicates: notes with near-identical titles/tags — candidates to merge (leave the merge to /curator).

3 — Inbox burn-down

  • List inbox/ drafts with age. Anything older than 14 days → flag for resolution (source it → wiki/, or archive it to archives/). The inbox is a quarantine, not a graveyard.

4 — Regenerate the derived files (deterministic)

  • INDEX.md — rebuild from wiki/ frontmatter. Sections in order, each fenced:
    • ## NOTES — id | type | tags | gloss | verified (one row per active note; gloss ≤~90 chars).
    • ## ALIASES — natural-language query -> note-id. Preserve hand-curated aliases across regen; append obvious new ones only.
    • ## SUPERSEDED — old-id -> new-id (from superseded_by).
    • ## HEALTH — notes: N (active/superseded) | sources: S | inbox: M | orphans: | stale: | broken-links: | last wiki-doctor: <date>.
  • digests/ — regenerate the four preflight files from context/ + decisions/ + wiki/ (each ≤~40 lines, every line ending in its provenance pointer (→ note-id)):
    • product.md ← context/about-business.md (+ sourced product notes)
    • goals.md ← context/priorities.md
    • recent-decisions.md ← last ~10 of decisions/log.md, newest first
    • user-profile.md ← context/about-you.md + references/voice.md
  • Never leave INDEX.md or digests/ diverged from disk.

5 — Report

Print a health summary:

# Wiki health — <date>
Notes: N   Sources: S   Inbox: M (oldest: Xd)
Stale citations: …      Orphans: …      Broken links: …
Drifted sources: …      Duplicates: …
Top fixes: 1) …  2) …  3) …

Offer to apply the safe fixes (regen INDEX.md + digests/, update last_verified, update source_verified_on on notes that re-resolved clean). Leave judgment calls (merges, archives, supersessions) to /curator or the user.

Rules

  • Read-only except the derived files: INDEX.md, digests/, the last_verified/hash columns of _sources.md, and the source_verified_on field of notes that re-resolved clean.
  • Never delete a note or a source. Supersede/archive only — the archives-not-deletes ethos.
  • Never "fix" a stale quote by editing the source to match the note — that destroys provenance. Fix the note.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.