Skip to content

Instantly share code, notes, and snippets.

@pyyupsk
Created April 22, 2026 13:30
Show Gist options
  • Select an option

  • Save pyyupsk/19ada0b5b5bb9fdf586ad04c8e16c4e2 to your computer and use it in GitHub Desktop.

Select an option

Save pyyupsk/19ada0b5b5bb9fdf586ad04c8e16c4e2 to your computer and use it in GitHub Desktop.
wiki-llms Claude Code slash commands — LLM Wiki Pattern by Andrej Karpathy
description Show all wiki-llms slash commands and quick usage

Print a concise cheatsheet for the wiki-llms commands. Use this exact template, do NOT browse the wiki:

wiki-llms commands — <YOUR_WIKI_PATH>/

/wiki-llms:ingest <path|url>   Add a source → normalize filename → summarize → update entities/concepts/index/log/hotcache
/wiki-llms:query <question>    Answer via hotcache → index → drill in; file valuable synthesis back
/wiki-llms:lint                Health check: contradictions, stale, orphans, missing links, gaps, index drift
/wiki-llms:status              Counts + last 5 log entries + active threads
/wiki-llms:hotcache            Refresh hotcache.md from current wiki state
/wiki-llms:page <slug>         Open/read a wiki page by slug (fuzzy)
/wiki-llms:help                This cheatsheet

Schema: <YOUR_WIKI_PATH>/AGENTS.md · Hotcache: <YOUR_WIKI_PATH>/wiki/hotcache.md

End turn. No other output.

description Refresh hotcache.md from current wiki state

Refresh <YOUR_WIKI_PATH>/wiki/hotcache.md:

  1. Read current hotcache.md to preserve structure and voice.
  2. Read wiki/overview.md for scope + current-state counts.
  3. Read wiki/index.md for page inventory.
  4. Tail wiki/log.md for recent activity (last 10 entries).
  5. Update hotcache sections:
    • Bump Last updated to today
    • Refresh Current State counts (sources, pages, per-category)
    • Refresh "Key Concepts" section if new concept pages warrant it
    • Keep total length ~500 words — this is a fast-read summary, not an index
  6. Preserve the "How to Operate" + "Naming Conventions" + "How I Work" sections unless the schema has changed in AGENTS.md.
  7. Append to wiki/log.md: ## [YYYY-MM-DD] hotcache | refresh.

Show a diff summary of what changed.

description Ingest a new source into the wiki (file path or URL)
argument-hint <file-path-or-url>

Ingest source: $ARGUMENTS

Follow the ingest workflow from <YOUR_WIKI_PATH>/AGENTS.md exactly:

  1. Normalize filename — if arg is a URL, fetch with WebFetch and save to <YOUR_WIKI_PATH>/raw/sources/YYYY-MM-DD-kebab-case.md (today's date). If arg is a file path, check it matches the pattern; if not, propose a rename target and confirm with user before mv. Never edit contents.
  2. Read the source end-to-end.
  3. Surface key takeaways to the user (3–5 bullets).
  4. Create wiki/sources/<slug>.md summary using the source page template in AGENTS.md.
  5. Update wiki/index.md — add row under Sources (and under Entities/Concepts for any new pages).
  6. Create/update wiki/entities/ pages for every person, org, project, product mentioned.
  7. Create/update wiki/concepts/ pages for every idea, pattern, framework.
  8. Flag any contradictions with existing wiki claims.
  9. Update wiki/synthesis/ if this source changes existing analyses.
  10. Append to wiki/log.md: ## [YYYY-MM-DD] ingest | <title> with every file created/updated.
  11. Update wiki/overview.md counts + bump wiki/hotcache.md if significant.

A single source typically touches 10–15 wiki pages. Be thorough. Report the final file list.

description Run a wiki health check
argument-hint
scope

Lint scope: $ARGUMENTS (default: full wiki)

Run the lint workflow from <YOUR_WIKI_PATH>/AGENTS.md. Check for:

  • Contradictions — pages making conflicting claims
  • Stale claims — superseded by newer sources
  • Orphan pages — no inbound [[wikilinks]] from other wiki pages
  • Missing pages — concepts/entities mentioned but lacking their own page
  • Missing cross-references — pages that should link but don't
  • Naming driftraw/sources/ files not matching YYYY-MM-DD-kebab-case.md
  • Index accuracy — does wiki/index.md match actual wiki state?
  • Frontmatter validity — every page has type, created, updated, sources, tags, related
  • Data gaps — topics worth strengthening with more research

Report findings grouped by category with file paths. Offer to fix each — ask before making destructive changes. Append the lint pass to wiki/log.md.

description Open a wiki page by slug (fuzzy match)
argument-hint <slug-fragment>

Find and display a wiki page matching: $ARGUMENTS

  1. Search <YOUR_WIKI_PATH>/wiki/ for a file whose basename contains the argument (case-insensitive).
  2. If multiple matches, list them and ask which one.
  3. If one match, Read and display its content.
  4. If no match, suggest the 5 closest slugs from wiki/index.md.

Do not modify the file. Do not ingest or synthesize — this is a read-only lookup.

description Ask a question answered from the wiki
argument-hint <question>

Query: $ARGUMENTS

Follow the query workflow from <YOUR_WIKI_PATH>/AGENTS.md:

  1. Read <YOUR_WIKI_PATH>/wiki/hotcache.md first. If the answer is here, respond directly — do NOT browse further.
  2. If not, read wiki/index.md and scan for relevant pages.
  3. Read the relevant wiki pages (entities/, concepts/, sources/, synthesis/).
  4. Synthesize a concise answer with [[wikilink]] citations.
  5. If the answer is a new comparison, analysis, or insight worth keeping, file it as a new page in wiki/synthesis/ (or appropriate category) — update index.md, append to log.md.
  6. If the conversation added significant new context, update hotcache.md.

Prefer reading over inferring. Cite pages. Flag uncertainty.

description Show wiki counts, recent activity, and active threads

Print a terse wiki status report. Do NOT ingest or modify anything.

Gather:

  • Counts from <YOUR_WIKI_PATH>/wiki/overview.md
  • Actual counts: ls raw/sources/ | wc -l, find wiki -name '*.md' | wc -l, per-subdir counts
  • Last 5 log entries from wiki/log.md (tail)
  • Active Threads section from overview.md
  • Last updated date from hotcache.md

Format:

📚 Wiki Status — <YOUR_WIKI_PATH>/

Sources: N raw · M summaries
Entities: N · Concepts: N · Synthesis: N
Total wiki pages: N

Hotcache last updated: YYYY-MM-DD

Recent activity:
  [date] op | description
  ...

Active threads:
  - ...

Flag any discrepancy between overview.md counts and actual file counts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment