Skip to content
← Tools / Skills
Tooldavidkimai/10 trustVerified

Context Engineering Handbook

First-principles handbook for designing the LLM context window — MIT licensed.

Visit official site →

About

davidkimai/Context-Engineering (~8,900 stars, MIT) is a comprehensive, first-principles handbook inspired by Andrej Karpathy — who coined the term 'context engineering' — and 3Blue1Brown, aimed at moving beyond prompt engineering to the wider discipline of context design, orchestration, and optimization. It's structured as a curriculum: foundations, zero-to-hero guides with runnable notebooks, and reusable templates covering token budgeting, context pruning, dynamic assembly, memory hierarchies, schema design, and evaluation loops.

Independent reviewers note it's best used as a pattern mine rather than a runtime: the repo is large, mostly educational Markdown, and some of the more advanced 'field' artifacts are conceptual or simulated rather than production code. That framing is honest about what it is — a vocabulary and pattern catalog for context-control work. If you want the discipline's mental models (component taxonomy, protocol-shell notation, cognitive-tool prompts), this is the densest free resource; if you want drop-in code, pair it with the coleam00 template repo.

What it can do

  • First-principles curriculum: foundations, guides, templates
  • Token budgeting, context pruning, and dynamic assembly patterns
  • Memory hierarchies, schema design, and evaluation loops
  • Research synthesis from IBM, Princeton, and MIT sources
  • MIT-licensed, community-contributed patterns

Setup

Browse or clone github.com/davidkimai/Context-Engineering. Work through 00_foundations, run the notebooks in 10_guides_zero_to_hero, and lift templates from 20_templates into your own projects.

Prerequisites

Familiarity with LLM prompting basics; Python for the notebooks.

Use cases

llmprompt-engineeringeducationrag

Works with

Trust score — 8/10

/10 trustVerified

Scored 8/10 (verified tier, metrics-v1). Evidence: Verified via vendor site/docs/GitHub and reputable coverage, wave 68; Trending score 78/100 from researcher assessment.

★ 8,900 GitHub stars

Sources

Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.