do-wiki-lint
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
Run a health check on an existing Obsidian-friendly markdown wiki. Use this when the user wants to lint the wiki, health-check the knowledge base, find orphan pages, spot broken or missing cross-links, clean up stale claims and unresolved wikilinks with safe local fixes, or consolidate a legacy root `overview.md` into `index.md`. Not for adding new material; use /do-wiki-add or /do-wiki-learnings for that.
In this repository15 other files it gives its agents.
- agent-md-improverSkill
- do-agentsSkill
- do-amendSkill
- do-planSkill
- do-researchSkill
- do-startSkill
- do-wiki-addSkill
- do-wiki-alignSkill
- do-wiki-amendSkill
- do-wiki-buildSkill
- do-wiki-learningsSkill
- do-wiki-querySkill
- do-wiki-reviewSkill
- revise-agent-mdSkill
- setup-obsidian-vaultSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
40 rules. About 0 are common, 13 are distinctive, and 27 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
27
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 18
Use the LLM Wiki maintenance model:
- Distinctive: line 32
If no explicit target is provided, lint the whole wiki.
- Distinctive: line 40
Look for an existing wiki root by finding files such as:
- Very specific: line 47
If the workspace uses a different but clearly established wiki root, reuse it and treat it as <wiki root>.
- Distinctive: line 51
If no wiki exists yet, stop and recommend:
- Very specific: line 69
Use Glob and Grep to map the pages in scope before reading deeply.
- Very specific: line 71
Treat index.md as the authoritative root hub.
- Very specific: line 77
If metadata exists, retrieval.status is "ready", and retrieval.collection_path matches the actual resolved <wiki root>, qmd is ready — use …
- Very specific: line 78
If metadata is missing, stale, or status is not "ready": run which qmd 2>/dev/null then qmd collection list 2>/dev/null.
- Distinctive: line 80
If qmd is still not ready: qmd not available, use Grep/Glob only.
- Very specific: line 101
Expand with qmd (secondary, if ready): Follow references/qmd-usage.md to find related-note neighborhoods for orphan pages or missing …
- Very specific: line 111
When a legacy <wiki root>/overview.md exists:
- Very specific: line 115
treat index.md as authoritative when the two files differ
- Very specific: line 116
delete overview.md before finishing the pass
- Very specific: line 118
When <wiki root>/.obsidian/ exists and <wiki root> is a subdirectory:
- Very specific: line 121
if <parent directory root>/.obsidian/ does not exist, move only <wiki root>/.obsidian/ to <parent directory root>/.obsidian/
- Very specific: line 122
if <parent directory root>/.obsidian/ already exists, do not overwrite or merge it.
- Very specific: line 123
if Obsidian's global vault registry is available at $HOME/.config/obsidian/obsidian.json or $HOME/Library/Application …
- Very specific: line 126
When <wiki root>/.wiki-metadata.json has a stale retrieval.collection_path:
- Very specific: line 128
update retrieval.collection_path to the actual resolved absolute <wiki root>
- Very specific: line 130
if a different qmd collection is already registered for the actual <wiki root>, update retrieval.collection_name to that collection
- Very specific: line 131
if the recorded or corrected qmd collection validates against the actual <wiki root>, keep or set retrieval.status to "ready" and update …
- Very specific: line 132
if no qmd collection points at the actual <wiki root>, or validation cannot be completed, set retrieval.status to "degraded", keep the …
- Very specific: line 149
Do not: ingest new raw sources, invent facts, silently merge/rename notes, silently delete disagreement/uncertainty, leave redundant …
- Very specific: line 161
Keep log.md append-only. Ensure index.md reflects the final state before finishing.
- Very specific: line 165
If qmd was ready and you wrote to the wiki, run qmd update -c <collection> 2>/dev/null.
- Distinctive: line 191
If the pass found no significant issues, say so explicitly and still note any residual risks or thin areas.
- Distinctive: line 197
Read the wiki schema before editing.
- Distinctive: line 198
Prefer direct fixes for objective structural drift.
- Very specific: line 200
Prefer canonical [[kebab-case-note-name]] links for durable internal references.
- Distinctive: line 202
Do not modify raw-source files.
- Distinctive: line 203
Do not turn lint into source ingestion.
- Very specific: line 204
Treat a separate root overview.md as legacy drift.
- Very specific: line 205
Treat <wiki root>/.obsidian/ as misplaced Obsidian config when <wiki root> is a subdirectory.
- Very specific: line 207
Never move or rename <wiki root> or any wiki content directory as part of .obsidian/ placement or qmd metadata repair.
- Very specific: line 208
Update <wiki root>/log.md on every lint pass.
- Distinctive: line 209
Keep the note graph traversable, not just the index accurate.
- Very specific: line 210
Keep index.md aligned with the durable pages that exist after the pass.
- Distinctive: line 212
After wiki edits, refresh qmd if the collection is ready.
- Distinctive: line 213
If qmd is unavailable, unmapped, or degraded, continue without it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
You are a senior engineer and wiki maintainer performing a structured health-check on a persistent markdown wiki. Your job is to improve wiki integrity without turning the lint pass into a full ingest or a speculative rewrite.
The wiki is expected to behave like an Obsidian-friendly note graph, so lint should protect not just factual quality but also graph integrity.
The preferred root-hub pattern is a single index.md with a concise ## Overview section near the top. A separate root overview.md is a legacy pattern that lint should consolidate into index.md and remove.
Use the LLM Wiki maintenance model:
- detect contradictions instead of flattening them
- surface stale claims that newer sources may have superseded
- find orphan pages and missing cross-references
- identify concepts or entities repeatedly mentioned but lacking their own page
- preserve unresolved gaps so future sessions know what still needs evidence
Apply safe, local fixes directly. For issues that need new evidence or substantive judgment, annotate and report them instead of guessing.
Input
The lint target is: $ARGUMENTS
If no explicit target is provided, lint the whole wiki.
Step 1 — Resolve wiki, read contract & audit
Locate the wiki
Look for an existing wiki root by finding files such as:
wiki/SCHEMA.mdwiki/index.mdwiki/log.mdwiki/overview.mdas a legacy root-hub file that lint should migrate intoindex.md
If the workspace uses a different but clearly established wiki root, reuse it and treat it as <wiki root>.
Resolve the actual <wiki root> from the on-disk wiki contract files, not from qmd metadata. If multiple candidate wiki roots exist and the target is ambiguous, ask the smallest possible follow-up question. Then resolve the lint scope: if the user named a wiki root, subdirectory, topic, or entity, use that. If no scope given, lint the whole wiki.
If no wiki exists yet, stop and recommend:
/do-wiki-build <topic or wiki goal>Read the wiki contract
Before editing, read:
<wiki root>/SCHEMA.md<wiki root>/index.md- the most recent relevant parts of
<wiki root>/log.md <wiki root>/overview.mdwhen it exists, so you can fold its useful root-hub content intoindex.mdand remove it- the files inside the lint scope most relevant to the current health check
${CLAUDE_SKILL_DIR}/references/lint-checklist.md${CLAUDE_SKILL_DIR}/references/finding-triage.md
Use Glob and Grep to map the pages in scope before reading deeply.
Treat index.md as the authoritative root hub. The desired steady state is a single root-hub file: index.md with a concise ## Overview section before the grouped page catalog.
Check qmd readiness and metadata health (secondary only)
- Glob for
<wiki root>/.wiki-metadata.json. If found, read it immediately. - Compare
retrieval.collection_pathto the actual resolved<wiki root>using absolute path equality. If they differ, mark qmd metadata as stale and plan a safe metadata reconciliation during fixes. - If metadata exists,
retrieval.statusis"ready", andretrieval.collection_pathmatches the actual resolved<wiki root>, qmd is ready — useretrieval.collection_name. Do not run fallback checks. - If metadata is missing, stale, or status is not
"ready": runwhich qmd 2>/dev/nullthenqmd collection list 2>/dev/null. If both succeed and a collection path matches the actual resolved<wiki root>(absolute path equality), qmd is ready. - If metadata is stale and qmd is available, validate the recorded
retrieval.collection_namewithqmd collection show <collection-name> 2>/dev/nullwhen supported. If another collection is already registered for the actual<wiki root>, plan to updateretrieval.collection_nameto that collection. If no collection points at the actual<wiki root>, do not rename or move wiki directories; setretrieval.statusto"degraded", keep the actual<wiki root>inretrieval.collection_path, and report the collection/path mismatch. - If qmd is still not ready: qmd not available, use Grep/Glob only.
- Runtime guard: if any qmd command fails or returns stale results, treat as degraded — fall back to Grep/Glob.
qmd is secondary only in this skill: use it only to find related-note neighborhoods when a structural fix might need reciprocal links or nearby canonical notes. If ready, read ${CLAUDE_SKILL_DIR}/references/qmd-usage.md.
Audit for health issues
A. Structure and inventory — Check for: index.md missing ## Overview section; legacy overview.md still present; content stranded in overview.md instead of index.md; duplicated root-hub content; pages on disk but missing from index; index entries pointing to non-existent pages; duplicate note identities; filename convention drift; near-duplicate pages; empty or placeholder pages.
B. Link health — Check for: unresolved [[wikilinks]]; orphan pages; pages with no meaningful inbound or outbound links; pages only discoverable from index.md; pages that should link but don't; missing reciprocal backlinks; repeated entity/concept mentions without a dedicated page.
C. Knowledge integrity — Check for: contradictory statements; stale claims superseded by later ingests; broad synthesis pages out of date; under-sourced claims.
D. Maintenance signals — Check for: recent ingests not in index; lint-worthy gaps never reconciled in log; missing follow-up notes.
E. Obsidian config placement — Check whether <wiki root>/.obsidian/ exists. The desired layout is for .obsidian/ to live at the parent directory root that contains the wiki, not nested inside the wiki directory, unless <wiki root> is itself the project/workspace root.
F. qmd metadata integrity — Check whether <wiki root>/.wiki-metadata.json reflects the actual resolved <wiki root>. Lint reconciles metadata to the on-disk wiki; it must never rename, move, or recreate the wiki directory to match stale metadata.
Distinguish: fix now (safe from existing wiki evidence) vs annotate now (mark but don't resolve) vs follow-up (needs future evidence/research/user direction).
Expand with qmd (secondary, if ready): Follow references/qmd-usage.md to find related-note neighborhoods for orphan pages or missing cross-links.
Step 2 — Apply safe fixes, record & refresh
Apply safe fixes
Make the smallest correct edits that improve wiki health.
When a legacy <wiki root>/overview.md exists:
- extract durable orientation content (scope, corpus boundaries, major topic links, evidenced open questions)
- fold or compress into a concise
## Overviewsection near the top ofindex.md - treat
index.mdas authoritative when the two files differ - delete
overview.mdbefore finishing the pass
When <wiki root>/.obsidian/ exists and <wiki root> is a subdirectory:
- resolve
<parent directory root>as the parent directory that contains<wiki root> - if
<parent directory root>/.obsidian/does not exist, move only<wiki root>/.obsidian/to<parent directory root>/.obsidian/ - if
<parent directory root>/.obsidian/already exists, do not overwrite or merge it; report the nested.obsidian/as unresolved and explain that manual reconciliation is needed - if Obsidian's global vault registry is available at
$HOME/.config/obsidian/obsidian.jsonor$HOME/Library/Application Support/obsidian/obsidian.json, update entries that point exactly at<wiki root>to point at<parent directory root>after a successful move - record the vault-placement fix in
<wiki root>/log.mdbecause the wiki path remains unchanged
When <wiki root>/.wiki-metadata.json has a stale retrieval.collection_path:
- update
retrieval.collection_pathto the actual resolved absolute<wiki root> - preserve
retrieval.collection_namewhen it validates against the actual<wiki root> - if a different qmd collection is already registered for the actual
<wiki root>, updateretrieval.collection_nameto that collection - if the recorded or corrected qmd collection validates against the actual
<wiki root>, keep or setretrieval.statusto"ready"and updateretrieval.last_verifiedtoYYYY-MM-DD - if no qmd collection points at the actual
<wiki root>, or validation cannot be completed, setretrieval.statusto"degraded", keep the correctedretrieval.collection_path, and report the qmd collection repair needed - record the metadata reconciliation in
<wiki root>/log.md
Allowed direct fixes:
- updating
index.mdto match actual durable pages with## Overview - consolidating safe structural content from legacy
overview.mdintoindex.md - deleting legacy
overview.mdafter useful content preserved - resolving obvious broken
[[wikilinks]] - adding missing cross-links and reciprocal backlinks
- creating minimal entity/concept/topic pages when strongly justified
- adding contradiction or stale-claim notes when wiki already contains the evidence
- improving headings or descriptions for index navigability
- normalizing internal links to canonical
[[kebab-case-note-name]]form - moving only a misplaced nested
<wiki root>/.obsidian/directory to the parent directory root when the destination has no.obsidian/directory - reconciling stale
<wiki root>/.wiki-metadata.jsonpaths to the actual resolved wiki root
Do not: ingest new raw sources, invent facts, silently merge/rename notes, silently delete disagreement/uncertainty, leave redundant overview.md, overwrite or merge an existing parent .obsidian/, move or rename <wiki root> or any wiki content directory, perform broad rewrites, or modify raw-source files.
Record the lint pass
Append to <wiki root>/log.md:
## [YYYY-MM-DD] lint | <scope>Capture: scope, pages created/updated/removed, issues fixed, unresolved contradictions/gaps, legacy root-hub consolidation, .obsidian/ placement fixes or unresolved conflicts, qmd metadata reconciliation or degraded state, suggested next ingests.
Keep log.md append-only. Ensure index.md reflects the final state before finishing.
Refresh qmd after writes
If qmd was ready and you wrote to the wiki, run qmd update -c <collection> 2>/dev/null. If refresh fails, report it but do not roll back wiki edits.
Step 3 — Report back
Wiki lint completed for <scope>
### Fixed now
- <issue>
### Annotated but unresolved
- <issue or "none">
### Touched pages
- <path>
### Next useful command
- `/do-wiki-add <local source path or topic>`If the pass found no significant issues, say so explicitly and still note any residual risks or thin areas.
Rules
- Read the wiki schema before editing.
- Prefer direct fixes for objective structural drift.
- Maintain
index.mdas the single authoritative root hub with a concise## Overviewsection near the top. - Prefer canonical
[[kebab-case-note-name]]links for durable internal references. - Preserve contradictions and uncertainty unless existing wiki evidence genuinely settles them.
- Do not modify raw-source files.
- Do not turn lint into source ingestion.
- Treat a separate root
overview.mdas legacy drift. Consolidate intoindex.mdand remove during lint. - Treat
<wiki root>/.obsidian/as misplaced Obsidian config when<wiki root>is a subdirectory. Move only.obsidian/to the parent directory root when that destination has no.obsidian/directory. - Reconcile stale
.wiki-metadata.jsonto the actual resolved wiki root. Lint updates metadata to match the on-disk wiki; it never moves the on-disk wiki to match metadata. - Never move or rename
<wiki root>or any wiki content directory as part of.obsidian/placement or qmd metadata repair. - Update
<wiki root>/log.mdon every lint pass. - Keep the note graph traversable, not just the index accurate.
- Keep
index.mdaligned with the durable pages that exist after the pass. - qmd is secondary. Structural checks remain Glob- and Grep-led. Use qmd only to find related-note neighborhoods.
- After wiki edits, refresh qmd if the collection is ready. If refresh fails, report it but do not roll back.
- If qmd is unavailable, unmapped, or degraded, continue without it. The skill must not fail.
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.

