/yka-code:knowledge-basefrom yka-code
[yka-code] Karpathy's LLM-maintained knowledge-base workflow. Use when the user wants to research a topic, build a queryable wiki, compile notes into structured knowledge, or asks "compile what we know about X", "research Y deeply", "turn these sources into a knowledge base". Structures knowledge in raw/ → wiki/ → output/ directories. Fills the research-first gap the 5 core sub-skills don't cover.
Ships in yka-code. 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.
Adapted from Andrej Karpathy's April 3, 2026 "LLM Knowledge Bases" post. Core insight: "A large fraction of my recent token throughput is going less into manipulating code, and more into manipulating knowledge." The LLM maintains the wiki, the human rarely edits it directly.
deepwiki lookup)research.md needs real sources with verificationSkip for: trivial lookups (use docfork or deepwiki directly), single-file summarizations, or anything that doesn't warrant persistent structure.
This skill operates on a vault directory (default: ~/knowledge/<topic>/ or user-specified). Inside it:
<vault>/
├── raw/ Source documents as-is — web articles, PDFs, markdown downloads, code dumps
├── wiki/ LLM-compiled structured markdown with backlinks — the queryable layer
└── output/ Query results, slide decks, visualizations, reports
Invariant: the human edits raw/ (adds sources). The LLM edits wiki/. Both edit output/ (user requests a specific format; LLM produces it).
| Purpose | Tool |
|---|---|
| Display/browse the vault visually | Obsidian (obsidian command, AppImage installed) |
| Programmatic read/write to the vault | claude-obsidian CLI |
Web article ingestion into raw/ | Obsidian Web Clipper browser extension (user installs manually) OR crwl (crawl4ai CLI) for headless scraping |
Library/API docs into raw/ | docfork MCP (needs DOCFORK_API_KEY) — pull current docs, save markdown to raw/ |
| Similar OSS projects' documentation | deepwiki MCP |
| Cross-session institutional memory | /claude-mem:mem-search + /claude-mem:knowledge-agent (builds focused brains from CC observations) |
| Structured plan generation from the wiki | /claude-mem:make-plan — hand it the wiki, get a phased execution plan |
| Final report / slide output | Markdown (default), Marp for slides, Matplotlib via python3 subprocess for charts |
Ask the user (if unclear):
~/knowledge/<slug>/)Create the directory tree if it doesn't exist.
raw/Options (pick based on source type):
raw/. OR you use crwl (crawl4ai) to scrape to markdown: crwl crawl <url> -o markdown -O raw/<slug>.mddocfork MCP with the library name, save the returned markdown into raw/docs-<lib>.mdraw/code/ OR use rendergit (karpathy/rendergit, 2.2k★) if user has it installed to render a repo into a single HTML/MD for LLM ingestion/claude-mem:knowledge-agent for prior observations on this topic; save results into raw/prior-sessions.mdEach file in raw/ gets a frontmatter header:
---
source: <URL or description>
retrieved: <YYYY-MM-DD>
format: web | pdf | docs | code | memory
---
wiki/For each new item in raw/, produce OR update a matching wiki article. Rules Karpathy's post implies:
[[B]] — Obsidian resolves. Claude should add these actively, not wait to be asked.researcher discipline: cite primary sources, flag contradictions between sources rather than picking silently.Use claude-obsidian CLI to write — it handles vault semantics (frontmatter, Obsidian-specific link resolution). Invoke pattern:
claude-obsidian write <vault> wiki/<article-slug>.md --content "<markdown>"
This is the payoff. Once critical mass exists (Karpathy: ~100 articles, 400k words on his topic), you can run multi-step questions:
Always cite specific wiki articles ([[article-name]]) in the answer so the user can verify.
output/)Render query results as:
output/<query-slug>.mdoutput/<query-slug>.md with Marp frontmatter (marp: true) — Obsidian previews it; Marp CLI renders to HTML/PDFBash, save figure into output/Always store the query text at the top of the output file so the artifact is self-documenting.
Karpathy: "Run LLM linting to find inconsistencies, discover missing data, surface connections between concepts."
Triggers:
Checks:
[[X]] where X doesn't existReport in output/health-check-<date>.md, then propose targeted edits (user approves).
last_verified: YYYY-MM-DD.knowledge-base to produce research → use the wiki as input to /claude-mem:make-planknowledge-base can ingest README + CLAUDE.md + key source files as a persistent referenceknowledge-base can pull docfork docs into raw/ so the fix references current behavior"Research rate limiting algorithms for our login endpoint"
→ Phase 1: create ~/knowledge/rate-limiting/
→ Phase 2: use docfork for node-rate-limiter-flexible, deepwiki for how OSS projects solve it, crwl for IETF RFC 6585 and the Stripe engineering blog
→ Phase 3: wiki articles: [[token-bucket]], [[sliding-window]], [[leaky-bucket]], [[redis-vs-memory]], cross-linked
→ Phase 4: query "for /api/login, which algorithm?" → LLM answers with references
→ Phase 5: output/rate-limiting-recommendation.md passed to ship-feature
"Compile what we know about OAuth in this project"
→ Phase 2: pull from /claude-mem:knowledge-agent (prior sessions), code files touching auth, our CLAUDE.md auth section
→ Phase 3: articles: [[oauth-flow]], [[our-token-storage]], [[known-gotchas]]
→ Phase 4: on-demand queries from now on: "how did we handle refresh last time?" → answered from wiki
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (youssefkadaouiabbassi/yka-code) — no native marketplace selected
npx claudepluginhub p/youssefkadaouiabbassi-code-tools-setup20 skills in this plugin
/audit-rigor[yka-code] Discipline for audit, review, and technology-comparison tasks. Use when the request is "audit X", "review our stack", "is this the best option", "compare alternatives", "what should we swap / add / drop", or any task that produces prioritized recommendations rather than new code. Enforces a ≥70% confidence threshold, delegate-retrieval-to-subagent pattern, inline citations with ISO dates, MCP-first sourcing, and a fixed output format (SWAP / ADD / DROP / KEEP-BUT-UPGRADE / SURPRISE). Pair with research-first (retrieval discipline) and karpathy-guidelines (surgical scope). Chained from security-audit, onboard-codebase, and any /do route that smells like "is this the best we have"./ci-hygiene[yka-code] CI/CD and DevOps hygiene enforcer. Activates when editing GitHub Actions workflows, Dockerfiles, docker-compose, justfile, deploy scripts, or any CI configuration. Enforces pinned versions, proper Claude Code invocation in CI (--bare, API key not Max sub), secret management, and reproducibility. Fills the DevOps gap — no plugin covers this in the wild./coding-style[yka-code] Enforce minimalist, self-documenting, defensively-sane coding style. Use ALWAYS when writing, editing, or reviewing ANY code in ANY language — every function, every edit, every diff, no exceptions. Covers five rules: (1) no comments unless critical (WHY only, never WHAT, never history), (2) clean + optimized (no dead code, no speculative abstractions, no stale imports, delete over deprecate), (3) self-documenting names (full words, verbs for functions, nouns for data), (4) smallest surface (one function one concern, extract only on 3rd reuse, validate only at boundaries), (5) no dead defense (no try/catch for impossible cases, no fallbacks for inputs you control, let errors bubble to the right handler). Pair with karpathy-guidelines for behavioral principles (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution).Other plugins' skills for the same job