From wikillm
Use this skill when running health checks and maintenance on a wikillm knowledge base. Covers finding and fixing broken wikilinks, missing frontmatter, orphan pages, missing concept pages, missing cross-references, contradictions, stale claims, disconnected graph clusters, and near-duplicate articles. Use whenever performing a lint pass, whether triggered by a scheduled task or a manual request.
How this skill is triggered — by the user, by Claude, or both
Slash command
/wikillm:lintThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Full procedure for running health checks and maintenance on the knowledge base.
Full procedure for running health checks and maintenance on the knowledge base.
/wikillm:obsidian-cli for graph queries (orphans, unresolved links, backlinks) when Obsidian is running. Fall back to Grep/Glob when it's not.raw/ source-material noise and _index/ auto-references that mask real problems._index/ files). If fewer than 3, exit silently.Run in this priority order. Stop after 50 total fixes to avoid runaway changes.
The Obsidian graph includes every markdown file in the vault — raw sources, wiki articles, and the _index/ administrative files. All of them produce noise in the graph commands unless you filter them out. Use these definitions consistently across every subsection below:
wiki/*.md but not wiki/_index/**. This is the set lint operates on. Everything else is either immutable source material or administrative bookkeeping.wiki/ (not raw/). Broken links inside raw/ source material are false positives — raw/ is immutable and typically references external doc-site paths that were never meant to resolve. Ignore them.wiki/_index/**. The index files (INDEX, TAGS, SOURCES, RECENT, LOG) reference nearly every article, which inflates raw obsidian backlinks total by 4–5 for every file. Thresholds in this skill ("orphan", "near-orphan", "hub") always mean real backlinks. Use:
obsidian backlinks file="$name" | grep -v "_index/" | grep -c "wiki/"
for the real count. Never use obsidian backlinks total directly for threshold decisions.obsidian orphans alone is not sufficient — it considers any inbound edge including _index/ auto-references, so it will report 0 orphans on a healthy-looking vault that actually has several isolated articles.Run every graph query through these filters. A lint pass that skips scoping will flag 70+ false positives on a typical vault.
/wikillm:obsidian-cli — run obsidian unresolved verbose to find all broken links.unresolved verbose lists the source files referencing each broken target. Drop any row whose source files are all in raw/ — those are immutable and out of scope. Only act on rows with at least one wiki/ source.obsidian search query="<term>" path="wiki"._index/ files).created, updated, tags, sources.created = file creation date or todayupdated = todaytags = infer from contentsources = [] if unknownRun these counts using the real backlink definition from §2.0 — the obsidian orphans command alone will miss orphans masked by _index/ auto-references.
for f in wiki/*.md; do
name=$(basename "$f" .md)
[ "$name" = "_index" ] && continue
count=$(obsidian backlinks file="$name" 2>/dev/null | grep -v "_index/" | grep -c "wiki/")
echo "$count $name"
done | sort -n
obsidian orphans as the primary signal — it treats _index/ references as real inbound and returns raw/ files alongside wiki articles. Use it only as a cross-check./wikillm:obsidian-cli — run obsidian unresolved counts format=json to find frequently-linked non-existent pages.raw/ files are noise.---
created: YYYY-MM-DD
updated: YYYY-MM-DD
tags: [stub]
sources: []
---
# Concept Name
This is a stub article. It was referenced by [[linking-page-1]], [[linking-page-2]].
## Related
- [[related-article]]
Operationalize this as a bounded check — avoid O(n²) sweeps on large vaults.
obsidian tags format=json to get the tag → articles mapping.## Related addition.## Related sections on the under-connected side.reference, overview, stub) — they capture documents with nothing thematic in common.[contradiction] tag:## [YYYY-MM-DD HH:MM] lint | Contradiction found
[[article-1]] says X, [[article-2]] says Y. Needs human review.
[unverified] markers across wiki.[unverified] tag.Every article in wiki/ (excluding _index/ files) must appear in both INDEX.md (with a category and one-line summary) and SOURCES.md (mapped back to its source). Drift between wiki files and indices is the #1 cause of ingest detection bugs.
obsidian files folder="wiki" ext=md (or Glob wiki/**/*.md excluding wiki/_index/).INDEX.md under some category. If missing, add it under the best-fit category using the one-line summary format.SOURCES.md mapped from its source file. Re-derive the mapping from the article's frontmatter sources: field if missing.wiki/_index/TAGS.md coverage: every tag actually used in frontmatter across the vault should appear in TAGS.md. Run obsidian tags format=json to get the ground-truth tag set from Obsidian's index.Some articles are load-bearing hubs — they're linked from many others and contain canonical framing or cross-cutting tables. INDEX.md lists every article equally, which buries hubs. Lint should surface them.
_index/).obsidian backlinks total here is wrong — every article has 4–5 auto-references from the index files, so every article would falsely qualify as a hub.)obsidian unresolved counts format=json to find non-existent concepts referenced multiple times by wiki articles (per §2.0 filtering). Any wiki-side unresolved wikilink referenced 3+ times should become a stub article — the KB is telling you a concept is missing. Create it using the stub format in §2.4.## [YYYY-MM-DD HH:MM] lint | Hub discovery
[[article]] has N real backlinks — promoted to top of <category> in INDEX.md
This check is the main reason a linter over Obsidian is more valuable than a flat-markdown linter. Don't skip it.
An article can have multiple backlinks and still sit in a disconnected island — §2.3 and §2.9 won't catch this because they only count per-node degree, not whole-graph reachability. Obsidian's graph view is the fastest way to spot the failure mode: two or more visually distinct clumps with no edges between them.
A healthy wiki is one weakly-connected component. Two or more components means users browsing the graph will land in an island and never traverse to the rest of the knowledge base.
obsidian links file=<name> for every wiki article (excluding _index/). For each article, collect its outbound links that resolve to other wiki articles — that forms the adjacency list.sources: prefix) and add bridging [[wikilinks]] on both sides. One strong bridge is better than five weak ones — pick an anchor in each cluster that genuinely cites the other.## [YYYY-MM-DD HH:MM] lint | Cluster bridge
Merged component with N articles into main island via [[article-a]] <-> [[article-b]]
Skip this check on vaults with fewer than 20 wiki articles — the graph is too sparse for connectivity to be meaningful.
Ingest runs can produce near-duplicate articles when two source files describe the same concept or when a second pass fails to update an existing article and creates a new one instead. Duplicates rot the KB — queries return inconsistent answers depending on which duplicate wins the search.
raw/ source file, list the wiki articles whose frontmatter sources: field references it. Groups of 2+ are candidates for inspection. Read the H1 and first paragraph of each article in the group side by side.backends overview + composite-backend specific type). A duplicate is two articles covering the same concept with different phrasing or coverage depth.sources: entry.[duplicate-candidate] tag and let the human decide:## [YYYY-MM-DD HH:MM] lint | Duplicate candidate
[[article-a]] and [[article-b]] share source `raw/path.md` and cover the same concept. Suggested action: merge [[article-b]] into [[article-a]], redirect any inbound links, and delete [[article-b]].
Before writing the LOG entry, re-run the same queries to confirm the fixes actually landed. It is easy to claim "fixed N broken links" when the numbers didn't actually move — the LOG is the source of truth for health-check history and needs to be accurate.
obsidian unresolved verbose and confirm the count of wiki-side unresolved links is lower by the number you claim to have fixed.obsidian search query="[stub]" path="wiki" (or similar) to confirm newly created stubs are present.If any verification step disagrees with your intended fix, diagnose before writing the LOG — never write a claim you haven't verified.
Append to LOG.md after verification passes:
## [YYYY-MM-DD HH:MM] lint | Health Check
Fixed N broken links, added M frontmatter fields, connected K orphans,
bridged J disconnected components, created S stubs, added L cross-refs.
Flagged P contradictions, D duplicate candidates.
Pages touched: [[page1]], [[page2]], ...
After all fixes, update INDEX.md and TAGS.md to reflect any new or changed articles. Update RECENT.md with touched pages.
Single commit after all fixes:
lint: fixed N broken links, created M stubs, added K cross-refs
Stage specific files, not git add .. Push after committing.
CRLF/LF warnings on Windows. git status may show files under raw/ as modified (M) even though lint never touched them — the warning is just line-ending normalization and there is no content diff. Before staging, run git diff --stat and skip any file showing 0 insertions(+), 0 deletions(-). Never stage raw/ files in a lint commit: raw/ is immutable per the KB rules and any real content change there belongs in a separate ingest pipeline fix.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub berkay2002/wikillm --plugin wikillm