CoreCoder banner
he-yufeng he-yufeng

CoreCoder

AI community

Description

Minimal AI coding agent (~1,400 LoC Python) inspired by Claude Code. Works with any LLM. Think NanoGPT for coding agents. Formerly NanoCoder.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

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.

[![PyPI](https://img.shields.io/pypi/v/corecoder)](https://pypi.org/project/corecoder/) [![Python](https://img.shields.io/badge/python-3.10+-blue)](https://python.org) [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE) [![Tests](https://github.com/he-yufeng/CoreCoder/actions/workflows/ci.yml/badge.svg)](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