/wiki-toolkit:wiki-lintfrom wiki-toolkit
Lint and re-index a Karpathy-style LLM wiki (second brain). Use this whenever the user asks to "lint the wiki", "wiki lint", "check wiki health", "index the wiki pages", "refresh the wiki search index", or anything about validating wiki structure or making wiki pages searchable. The wiki is sometimes a project-local folder and there is sometimes a global one at ~/wiki. This skill detects which wiki applies, runs the correct lint script (which also refreshes the qmd search index in one pass), and resolves flagged issues. Do NOT use it for ordinary source-code linting (eslint, phpstan, markdownlint of non-wiki files) or for the full pre-compaction knowledge sweep (that is /wiki-checkpoint).
Ships in wiki-toolkit. 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.
Validate a Karpathy-style LLM wiki and refresh its search index in one pass. The global wiki's lint script does both jobs: structural checks AND a qmd index rebuild, so "lint" and "index the pages" are the same operation there; another wiki's script may not index (see section 2). Run the script, then resolve what it flags.
A wiki lives in one of two places, checked in this order. Set $WIKI_DIR to the
first that exists:
wiki/ folder in the current project root. The
directory is always named wiki, never docs/, .wiki/, notes/, or anything
else. Confirm it is genuinely a wiki (contains SCHEMA.md, index.md, log.md,
or a pages/ layout) rather than an unrelated folder that happens to be named
wiki.~/wiki/, where it exists (synced via its git remote).If the user names a wiki explicitly, use that. If neither location exists, report
No wiki found and stop: there is nothing to lint, and no directory should be created
to satisfy the request.
The lint logic lives in a shell script. Resolve it in this order:
The wiki's own script: resolve these two paths in order and run the first that is executable. It encodes that wiki's house rules.
"$WIKI_DIR/scripts/lint_wiki.sh" "$WIKI_DIR"
# or, when the wiki sits inside a larger repository:
"$(git -C "$WIKI_DIR" rev-parse --show-toplevel)/scripts/lint_wiki.sh" "$WIKI_DIR"
Report the checks a foreign script actually performs, not the ones listed below. Those
describe the global script specifically. Another wiki's script may use different exit
codes and may not index at all, in which case the Index line reports
not applicable (script does not index) rather than an invented count.
A project wiki with no script of its own: report
Lint: not run (no project lint script) and stop. Do NOT fall back to the global
script. Its checks encode global-wiki conventions (frontmatter fields, status
values, citation format) that a different layout does not share, so running it
there produces false errors and invites destructive "fixes". This matches the rule
the checkpoint and ingest skills already follow.
The global wiki with no script present: the script is not bundled with this
plugin. Report Lint: not run (no compatible lint runner) and stop. Never report a
clean lint that did not execute, and never hand-roll a substitute set of structural
checks against a wiki whose conventions you have not read.
The script checks: orphan pages (not in index, or lacking a summary frontmatter key when the wiki keeps no index file), dead index entries, duplicate index
entries, broken [[wiki-links]], missing/invalid frontmatter, missing status,
stale pages (14-day last_compiled cutoff), unresolved CONTRADICTION markers,
em/en dashes, near-empty pages, oversized pages (50 KiB and up), date-suffixed pages
that should be snapshot, and markdownlint via the committed config. It finishes by
running qmd update, and qmd embed when there is something new to embed, so the
pages become searchable as part of the same run.
If the qmd output warns about orphaned embedding chunks (qmd hints when they
exceed 10% of vectors), run qmd cleanup and record the result in the report.
Do not run cleanup when no hint appears; it vacuums the whole index.
Exit codes on a completed run: 0 clean, 1 warnings present, 2 errors present
(an early abort, such as a missing wiki root, exits before the summary). The qmd
index lives outside the wiki (qmd status shows where), so re-indexing the global
wiki produces no git changes there.
The script's own policy is: fix every flagged item on a file this session touched, pre-existing or not, and report items on untouched files without fixing them. A standalone lint the user asks for is the exception where the whole wiki is in scope.
~/wiki): this is the user's own. On a user-invoked lint, fix all
flagged errors and warnings, then re-run until clean. Read $WIKI_DIR/SCHEMA.md
first if a fix touches conventions (frontmatter fields, status values, citation
format). Common fixes: replace em/en dashes with the right substitute, add missing
frontmatter or status, give an orphan page its summary frontmatter, or its index.md line where
the wiki keeps one (~150 char cap either way), correct a dead index path, set status: snapshot on a dated page. A stale
page's last_compiled moves only after its sources were actually re-checked; a
partial re-check is declared on the page.Pre-existing warnings you choose not to fix (for a project wiki, or because they need a judgement call) should be reported honestly, not silently passed over.
Keep it short:
Wiki lint: <WIKI_DIR>
- Pages: N | Errors: N | Warnings: N
- Fixed: <list, or "nothing to fix">
- Index: refreshed (qmd: N new, N updated) / not run (qmd not installed)
- Cleanup: N orphaned chunks removed (only when the qmd hint fired)
- Remaining: <pre-existing items left, with reason> / clean
South African English. No em or en dashes in anything you write while fixing pages
(this is also one of the things the linter flags). Never fabricate sources or page
content. If qmd is not installed the script skips indexing and says so; the
structural checks still run.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub marjovanlier/claude-plugins --plugin wiki-toolkit4 skills in this plugin
/wiki-checkpointUse when the user invokes wiki-checkpoint, asks to save session knowledge, asks for a wiki or memory sweep, or wants durable findings, retrospective lessons, and routing decisions captured from the current conversation, typically at the end of a chat thread or before context compaction. Honour focus text and skip flags such as skip wiki, skip memory, and skip retrospective./wiki-ingestIngest one explicitly identified input into the wiki as a single transaction. A URL, file, pasted text, command output, stated fact, or an investigation result from the current session. Use when the user asks to add a specific input or finding to the wiki, says "wiki this" or "ingest this into the wiki", or asks to record a conclusion, decision, or finding permanently. Also use when the user pastes a record (a portal or dossier extract, a lab table, an email, a screenshot) into a wiki repository session with no question attached: that is a request to file it. A paste sent in the middle of an open question on its own topic is input to that answer, not a filing request. Generic "ingest this" or "file this" without wiki context is not this skill. Not for behavioural rules or memory updates, not for end-of-thread or pre-compaction knowledge sweeps (use wiki-checkpoint), and not for wiki health checks (use wiki-lint).Other plugins' skills for the same job