/research-superpowers:wiki-lintfrom research-superpowers
Validates a knowledge wiki by checking frontmatter completeness, broken wikilinks, orphaned pages, and status consistency. Wraps scripts/lint-wiki.py from a research project template. Required before drafting and finishing.
Ships in research-superpowers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run the wiki linter and act on its findings. Mandatory gate before drafting-manuscript and finishing-a-research-project; useful after bulk ingest or whenever the wiki has grown.
Announce at start: "Using wiki-lint to validate the knowledge tree."
Before transitioning to `drafting-manuscript` or `finishing-a-research-project`: (1) `scripts/lint-wiki.py` exits 0If not met: tell the user which classes of issues remain (errors / warnings /
orphans), ask for a short reason to proceed anyway (e.g. "orphan is intentional
— it's the index page"), and write the reason into
knowledge/_meta/gate-overrides.log. Errors should as a rule be fixed rather
than overridden — the override is an audit trail, not a substitute.
drafting-manuscript (soft gate)finishing-a-research-project (soft gate)ingest-source batch runs (≥ 3 new sources)scripts/lint-wiki.py in the project root (from template)python scripts/lint-wiki.py. If Python or PyYAML or the script itself is missing, take the Python-free fallback path below.type values)=== Research chronology === section — CHRONO-ORDER (a responds-to / supersedes / revises edge pointing from an earlier source to a later one) fails the run: move the edge to the later page, or set orig_year if a date is wrong. ANACHRONISM and SUPERSEDED-CITED are advisory: the first is fixed by moving the edge, the second is a question for the author — is the older source cited as history or as the current state?=== Review flags === section lists open review_flags (content findings from semantic-wiki-review). These do not fail the exit code, but they gate drafting (see drafting-manuscript): decide with the user per flag — fix the underlying issue and set state: resolved, or leave it open and let drafting log an override. Do not clear a flag by deleting it.=== Authority-ID coverage (entities) === section reports how many entities carry a gnd_id / idai_gazetteer_id / wikidata_qid and lists the untagged (--verbose). Advisory only. For persons and places, resolve and add the ID (via dao-paper-search resolve_author / resolve_site) — it is the join key for cross-project linkage (wiki-global-graph.py overlap); datasets / methods / software may legitimately have none. Work the untagged list rather than letting it accumulate.python scripts/check-quotes.py --problems-only. Advisory, and only where the shared library is configured (it reads the PDFs; CI has none). It lists every quote on a source page that does not stand in its PDF as written — altered, gap (a cut without […]), not-found, translated? — and every quote anchored to the wrong printed page. Fix each from the PDF, as ingest-source describes under "Checking the quotes"; a PDF flagged as having a degraded text layer is checked by eye. Pages ingested before the check existed are where the findings are: on the live corpus, 76 of ~2,560 quotes and 115 page anchors (most of them physical PDF pages cited as printed ones).knowledge/_meta/log.md with summary (N errors fixed, N warnings deferred, N open flags, N quote findings)wiki-linter subagent (optional) for large wikis — see agents/wiki-linter.mdSee also: scripts/wiki-to-graph.py is the sibling tool for structure analysis (not validation) — it exports the wiki as a graph (graph.json / graph.graphml) and reports god_nodes (most-connected pages) and bridges (entities joining otherwise-unconnected sources). Useful after a lint pass to spot hubs and weak links; it reads the same relations frontmatter the linter validates.
For users on Cowork or any environment without a shell — or any project where python3 / pyyaml / scripts/lint-wiki.py are simply not available — the skill performs frontmatter validation inline.
Trigger the fallback automatically when:
scripts/lint-wiki.py does not exist in the project, ORpython3 or python, ORTell the user upfront:
"Running wiki-lint in fallback mode (no Python). This checks frontmatter but skips wikilink resolution and orphan detection — those would cost too many tokens on a full wiki scan. For a complete check, install Python+PyYAML and use the
scripts/lint-wiki.pyscript. Recommended for projects above ~20 pages."
Fallback procedure:
schema/knowledge-frontmatter.schema.json from the project root. If absent, read the plugin's copy (the plugin ships one).knowledge/**/*.md file (excluding files prefixed _example-).--- lines) and validate against:
required fields exist and are non-emptytype is one of entity | concept | source | synthesisstatus is one of draft | review | stableauthor is one of human | llm | mixedcreated and updated match the ISO date pattern ^\d{4}-\d{2}-\d{2}$type: source, then bibkey is presentwikidata_qid is present, it matches ^Q\d+$idai_gazetteer_id is present, it matches ^\d+$MISSING: <path> — required field '<field>' is missing / INVALID: <path> — <field>='<value>' (allowed: …).review_flags — these live in frontmatter, so the fallback can list them cheaply (page, kind, detail). Report count + list, exactly as the script's === Review flags === section does; they are advisory (gate drafting, not this check).What the fallback does NOT do:
If those checks are needed and Python isn't an option, dispatch the wiki-linter subagent (agents/wiki-linter.md) — it has a fresh context budget and can afford the full scan once per session.
digraph lint {
"Locate lint script" [shape=box];
"Run lint-wiki.py" [shape=box];
"Parse output" [shape=box];
"Errors present?" [shape=diamond];
"Fix errors inline" [shape=box];
"Warnings: fix / defer / ignore" [shape=box];
"Orphans: link / delete / mark root" [shape=box];
"Re-run lint" [shape=box];
"Exit 0 on errors?" [shape=diamond];
"Log run summary" [shape=box];
"Done" [shape=doublecircle];
"Locate lint script" -> "Run lint-wiki.py";
"Run lint-wiki.py" -> "Parse output";
"Parse output" -> "Errors present?";
"Errors present?" -> "Fix errors inline" [label="yes"];
"Errors present?" -> "Warnings: fix / defer / ignore" [label="no"];
"Fix errors inline" -> "Warnings: fix / defer / ignore";
"Warnings: fix / defer / ignore" -> "Orphans: link / delete / mark root";
"Orphans: link / delete / mark root" -> "Re-run lint";
"Re-run lint" -> "Exit 0 on errors?";
"Exit 0 on errors?" -> "Fix errors inline" [label="no"];
"Exit 0 on errors?" -> "Log run summary" [label="yes"];
"Log run summary" -> "Done";
}
Not the quotes: whether a quote's words stand in the PDF is scripts/check-quotes.py
(step 8) — it needs the PDFs, and lint-wiki.py must run where there are none.
(per the template's scripts/lint-wiki.py)
title, type, created, updated, status, author)type ∈ {entity, concept, source, synthesis}status ∈ {draft, review, stable}author ∈ {human, llm, mixed}YYYY-MM-DD)[[...]] resolve to existing filesrelations blocks resolve + the inference-rate (share of inferred/ambiguous edges)review_flags (content findings from semantic-wiki-review) — surfaced only: advisory, they gate drafting-manuscript, not the lint exit codesurname-year-shorttitle convention (it is a cross-project join key); no key defined twice; every bibkey: and every @citation resolves to a real entry; every bibliography: path a manuscript declares exists (Quarto renders a dead bibliography as ??? and still exits 0)bibkey has a PDF at <library>/pdf/<bibkey>.pdfingest-source — the PDFs are already there.| Error | Fix |
|---|---|
missing frontmatter field: status | Add status: draft (or proper value) |
broken wikilink: [[finkelstein-2003]] | Either create knowledge/sources/finkelstein-2003.md via ingest-source, or correct the slug |
invalid type: Person | Change to entity (types are: entity, concept, source, synthesis) |
created is not ISO date | Reformat to YYYY-MM-DD |
orphan: knowledge/entities/foo.md | Add an incoming link from a relevant source/synthesis page |
| Thought | Reality |
|---|---|
| "Lint is bureaucracy, skip it" | SOFT-GATE before drafting and finishing. The override gets logged. |
| "I'd notice broken wikilinks while reading" | No — when rendered they vanish silently. They're only visible to the linter. |
| "Orphans are fine, just internal notes" | Orphan means unreachable. Link them in or delete them. |
| "I can ignore all warnings" | Every warning needs a decision, not silence. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub leiverkus/research-superpowers --plugin research-superpowers18 skills in this plugin
/acquire-sourcesUse AFTER literature-review and BEFORE ingest-source to obtain the actual PDFs for the A+B graded sources. Auto-downloads Open-Access PDFs into the shared library (<library>/pdf/<bibkey>.pdf — the bibkey IS the filename) and writes a manual-download worklist (input/bibliography/acquisition-todo.md) for everything paywalled or bot-blocked, so the user can fetch originals via university VPN. Re-run to reconcile manually-downloaded files. Triggers on "acquire the sources", "download the literature", "get the PDFs", "Quellen beschaffen", "lade die Literatur herunter". NOT a search skill (that is literature-review), NOT an ingest skill (that is ingest-source)./add-to-libraryAdd ONE document (a PDF) directly to the shared master library — outside the project ingest flow. Auto-discovers the bibliographic metadata, VERIFIES it against Crossref/OpenAlex (never guessing), derives keywords cheaply from the PDF's docinfo + first-page abstract (no full read), computes the canonical bibkey, places the PDF at <library>/pdf/<bibkey>.pdf and appends the entry to <library>/references.bib. Stops and asks when metadata cannot be verified. Triggers on "add this PDF to the library", "add to the master bibliography", "put this straight in the library", "füge das Dokument der Bibliothek hinzu", "nimm das PDF in die Bibliothek auf". NOT ingest-source (which reads a source into a project's wiki), NOT acquire-sources (which downloads a review's worklist)./brainstorming-researchUse BEFORE any research work — defining a question, planning a study, starting a chapter, proposing a grant. Explores intent, state of the field, methodology, feasibility, and ethics, then writes a design doc and gets user approval./drafting-manuscriptUse to draft a book chapter, article section, or grant exposé from synthesized wiki content. Settles the argument architecture with the user first; by default then sketches the WHOLE text — every section's argument, a paragraph plan for long sections, an evidence check with a gap list — and gets that sketch approved before any prose exists, then writes section by section along the plan (per-section mode on request). Pulls from stable synthesis pages and source pages, writes to `output/**/*.qmd` with proper citations. Never drafts from memory — always from the wiki./drift-reportUse to check the shared library, the current wiki, and all registered projects for accumulated drift — un-indexed PDFs, scans without a text layer, PDF bloat, project-bib keywords not yet merged into the master, cross-project bibkey collisions, lint regressions from out-of-band edits. Wraps hooks/drift_check.py, the same state-triggered check that runs automatically at session start. Triggers on "drift report", "check everything", "was steht an", "prüf mal alles", "ist alles konsistent", "check the library". NOT wiki-lint (single-project structural lint — this composes it), NOT semantic-wiki-review (LLM content audit — this is deterministic only)./executing-research-planUse AFTER writing-research-plan has produced a ready plan (status=ready for hermeneutic projects, status=pre-registered for quantitative/mixed). Reads `input/ideas/<slug>-plan.md`, creates one task-list item per plan task, runs a pre-ingest acquisition gate (acquire-sources) so originals are on disk before any source-ingester runs, and works tasks via subagent dispatch (source-acquirer, source-ingester, analyst, drafter) with two-stage review. Does not execute anything outside the plan.Other plugins' skills for the same job