From 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 always 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).
How this skill is triggered — by the user, by Claude, or both
Slash command
/wiki-toolkit:wiki-lintThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Validate a Karpathy-style LLM wiki and refresh its search index in one pass. The
Validate a Karpathy-style LLM wiki and refresh its search index in one pass. The lint script does both jobs: structural checks AND a qmd index rebuild, so "lint" and "index the pages" are the same operation here. 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/ (synced via its git remote).
This always exists on a configured machine.If the user names a wiki explicitly, use that. If only the global wiki exists, use it.
The lint logic lives in a shell script. Resolve it in this order:
Project's own script: if $WIKI_DIR (or its repo root) has scripts/lint_wiki.sh,
run that. It encodes the project's house rules.
Global script: otherwise run the global one against the detected wiki. It
takes the wiki directory as its first argument and auto-detects pages/ vs
concepts/ and the index file, so it works on any Karpathy-style layout:
~/wiki/scripts/lint_wiki.sh "$WIKI_DIR"
Run with no argument, it lints ~/wiki itself.
The script checks: orphan pages (not in index), 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 (>49KB), date-suffixed pages that
should be snapshot, and markdownlint via the committed config. It finishes by
running qmd update and qmd embed to refresh the search index, so the pages
become searchable as part of the same run.
Exit codes: 0 clean, 1 warnings present, 2 errors present. The qmd index is
stored under ~/.config/qmd/, not in the repo, so re-indexing never produces git
changes.
The script's own policy is that flagged items are not background noise: fix them. How aggressively depends on whose wiki it is.
~/wiki): this is the user's own. 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, register an orphan page in index.md (one line, ~150 char cap), correct
a dead index path, set status: snapshot or refresh last_compiled on a stale
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)
- 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.
npx claudepluginhub marjovanlier/claude-plugins --plugin wiki-toolkitGuides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Runs a structured interview session to sharpen plans or designs, producing ADRs and a glossary as output.
Applies curated color/font themes to slides, docs, and HTML artifacts. Includes 10 preset themes and can generate custom themes on demand.