From 76631bb7d38ca0f49c7e542435103bf26c38fe14 Mon Sep 17 00:00:00 2001 From: Yuhan Lei Date: Sun, 5 Apr 2026 14:17:01 +0800 Subject: [PATCH] docs: add README and MIT license Effect-first README: install command, 3-step quick start, architecture overview, compatibility table. Links to Karpathy's original idea file gist. --- LICENSE | 21 ++++++++++++++ README.md | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..45da0c6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Yuhan Lei + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4c19c61 --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +# karpathy-llm-wiki + +**One skill to build your own Karpathy-style LLM wiki.** + +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) +[![Agent Skills](https://img.shields.io/badge/Agent_Skills-compatible-blue)](https://agentskills.io) + + + +## Install + +```bash +npx add-skill Astro-Han/karpathy-llm-wiki +``` + +Works with Claude Code, Cursor, Codex, and other tools that support the [Agent Skills](https://agentskills.io) standard. + +## Quick Start + +**1. Ingest your first source** + +Give the skill a URL, a file, or paste text directly: + +> "Ingest this article: https://example.com/attention-is-all-you-need" + +The skill fetches the content into `raw/`, then compiles it into a wiki article under `wiki/`. + +**2. Ask your wiki a question** + +> "What do I know about attention mechanisms?" + +The skill searches your wiki and answers with citations linking back to your articles. + +**3. Keep it healthy** + +> "Lint my wiki" + +The skill checks for broken links, missing index entries, stale cross-references, and reports potential issues. + +## How It Works + +Inspired by [Karpathy's LLM Wiki idea](https://gist.github.com/karpathy/1dd0294ef9567971c1e4348a90d69285): + +> "The LLM writes and maintains the wiki; the human reads and asks questions." + +The skill manages two directories in your project: + +``` +your-project/ +├── raw/ ← Immutable source material (you or the LLM add, never modify) +│ └── topic/ +│ └── 2026-04-03-source-article.md +├── wiki/ ← Compiled knowledge (LLM maintains) +│ ├── topic/ +│ │ └── concept-name.md +│ ├── index.md ← One-page table of contents +│ └── log.md ← Append-only operation log +``` + +Three operations: + +| Operation | What it does | +|-----------|-------------| +| **Ingest** | Fetch a source into `raw/`, compile into `wiki/`, update index and cross-references | +| **Query** | Search the wiki and answer with citations. Optionally archive answers as wiki pages | +| **Lint** | Auto-fix broken links and index gaps. Report contradictions, orphan pages, stale content | + +The wiki compounds over time. Each new source enriches existing articles, adds cross-references, and flags conflicts. + +## Compatibility + +This skill follows the [agentskills.io](https://agentskills.io) open standard. It works with any LLM coding tool that supports SKILL.md: + +| Tool | Install method | +|------|---------------| +| Claude Code | `npx add-skill Astro-Han/karpathy-llm-wiki` | +| Cursor | `npx add-skill Astro-Han/karpathy-llm-wiki` (auto-converts) | +| Codex CLI | Copy to `.agents/skills/karpathy-llm-wiki/` | +| Others | Copy `SKILL.md` + `references/` to your tool's skill directory | + +## Inspired By + +This is an unofficial community implementation of the LLM Wiki workflow described in [Karpathy's idea file](https://gist.github.com/karpathy/1dd0294ef9567971c1e4348a90d69285) (April 2026). The core value is a battle-tested set of compilation principles and workflow templates, not the code itself. + +## License + +[MIT](LICENSE)