CoreCoder — AI skill for Claude Code
Minimal AI coding agent (~1,400 LoC Python) inspired by Claude Code.
How to install CoreCoder
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open he-yufeng/NanoCoder and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What CoreCoder does
Minimal AI coding agent (~1,400 LoC Python) inspired by Claude Code. Works with any LLM. Think NanoGPT for coding agents. Formerly NanoCoder.
Alternatives in AI
- Agent Rules Books — AGENTS.md rules / skills for AI coding agents: Codex, Cursor & Claude Code 2.6k ★
- Loushang — AI-native agent harness for coding workflows by python: multi-model LLM orchestration, stateful sessions, tool 1.3k ★
- Clawcodex — Token efficient Claude Code full Python rebuild 875 ★
README
CoreCoder
Formerly **NanoCoder** — renamed to avoid confusion with [Nano-Collective/nanocoder](https://github.com/Nano-Collective/nanocoder). All links from the old repo redirect here automatically.
[](https://pypi.org/project/corecoder/) [](https://python.org) [](LICENSE) [](https://github.com/he-yufeng/CoreCoder/actions)
[中文](README_CN.md) | [English](README.md) | [Claude Code Architecture Deep Dive (7 articles)](article/)
**512,000 lines of TypeScript → ~1,400 lines of Python.**
I spent two days reverse-engineering the leaked Claude Code source — all half a million lines. Then I stripped it down to the load-bearing walls and rebuilt them in Python. The result: **every key architectural pattern from Claude Code, in a codebase you can read in one sitting.**
CoreCoder is not another AI coding tool. It's a **blueprint** — the [nanoGPT](https://github.com/karpathy/nanoGPT) of coding agents. Read it, fork it, build your own.
$ corecoder -m kimi-k2.5
You > read main.py and fix the broken import
> read_file(file_path='main.py')
> edit_file(file_path='main.py', ...)
--- a/main.py
+++ b/main.py
@@ -1 +1 @@
-from utils import halper
+from utils import helper
Fixed: halper → helper.
What You Get
Claude Code's 512K lines distilled into ~1,400 lines across 7 patterns that actually matter:
| Pattern | Claude Code | CoreCoder |
|---|---|---|
| Search-and-replace editing (unique match + diff) | FileEditTool | tools/edit.py — 70 lines |
| Parallel tool execution | StreamingToolExecutor (530 lines) | agent.py — ThreadPool |
| 3-layer context compression | HISTORY_SNIP → Microcompact → CONTEXT_COLLAPSE | context.py — 145 lines |
| Sub-agent with isolated context | AgentTool (1,397 lines) | `t |
Related Skills
Codecrafters Claude Code Python
A minimal LLM coding agent in ~280 lines of Python — Read/Write/Edit/Bash/Glob/Grep tools with an agent loop.
Tacit Knowledge
A cognitive protocol for AI agents. Makes any LLM-based agent think like an experienced practitioner. Works wi
Base Harness
A minimal, reliable, provider-agnostic AI agent harness in TypeScript — the agentic loop, tools, permissions,
AnyCoder
AI coding agent in your terminal. Works with any LLM - DeepSeek, Qwen, GPT-5, Claude, Gemini, Kimi, Ollama. 10
LLM Wiki Skills
Turn your markdown vault into a compounding knowledge wiki (Karpathy inspired). Six agent skills - knowledge g
Sidequest
Cut Claude Code token costs by delegating bulk LLM work to cheap models. 600+ models via NanoGPT, OpenRouter,
Related Agents
Rule Builder
Builds a Claude Code rule file based on a user-described coding standard or constraint. Called by claude-archi
Task Planner.Agent
Translates a task into a minimal, executable implementation plan with scoped steps, risks, and a test strategy
Coding
Write, review, or refactor code end-to-end — implement features, fix bugs, and add/update tests with minimal,