# Karpathy's LLM Wiki: A Markdown Memory System for Claude Code

> The model is rarely the bottleneck on a long project, the missing context is. I use Karpathy's "LLM wiki" system so the model maintains its own context (and mine). Here's how it works.

Context is the ceiling for language model usefulness in a project, more so than model intelligence - the more complex a project becomes, the more tedious it gets to keep the model in the loop. The good news is: Language models are actually great at structuring and keeping track of information, they just have to be told to do so.

I have been using Karpathy's "LLM wiki" approach for each of my projects for the past couple months, which works so well that I now use the models to help ME understand relevant context for projects rather than the other way around. 

The system is quite simple and easy to understand: you try to gather as many relevant sources as possible, and have each one be "ingested" by the model to build a knowledge graph consisting of linked markdown files, similar to a fandom wiki.

The sources go in a sources directory, which is immutable to the model and serves as the ground truth. Each time a new source is ingested by the model, it updates the wiki with any new concepts, topics or people.

The wiki is treated as a first class priority, no question is answered without thorough investigation, any information gathered in the course of the project has to be persisted somewhere in it.

I can easily access and reference this information with a markdown reader like [Obsidian](https://lukasvonkunhardt.com/obsidian-claude-code-setup/), although the wiki is meant to be largely untouched by the human and is maintained and read mostly by the LLM.

I wrapped Karpathy's instructions in four small skills: `/create-wiki` to scaffold it, `/ingest` to fold in new sources, `/query` to answer from the wiki, and `/lint` to clean it up periodically, this allows me to set this up in any project in seconds.

![Drawing that shows folder structure for Karpathy LLM wiki](https://lukasvonkunhardt.com/_assets/karpathy_wiki%201.png)

These are available as reusable skills: install them with this command, `npx skills add lukaskunhardt/skills`, or grab them on [GitHub](https://github.com/lukaskunhardt/skills). The [persona prompting skill](https://lukasvonkunhardt.com/the-simplest-way-to-improve-llm-answers/) is in the same repo.

---

Source: https://lukasvonkunhardt.com/my-favorite-memory-system-for-llms/ · Author: Lukas von Kunhardt · Published: 2026-06-21 · Updated: 2026-08-20
