A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
A lightweight implementation of Claude Code
Claude Code leaked today: 1,903 files, 513,083 lines. I compressed the whole thing down to 13 files and about 4.2k lines, and it actually works. Lightweight, hackable, and built to be fully understood.
That makes nano-claude-code roughly 146x smaller by file count and 119x smaller by line count than the leaked codebase snapshot.
nano-claude-code keeps the useful parts of a Claude Code style harness:
NANO.md.nano/rules/*.mdIt leaves out most of the surrounding product surface that makes larger agent repos hard to reason about.
Claude Code style agents feel good because of the harness, not because they are giant.
The repo snapshot I started from was powerful, but far too large to comfortably reason about end to end: 1,903 files and 513,083 lines. For a solo fork that I want to modify aggressively, that is too much surface area.
nano-claude-code keeps the same core shape in a codebase small enough to inspect directly:
The point is not to recreate every feature. The point is to keep the part that actually matters: a tight coding-agent loop you can trust yourself to edit.
Requirements:
22+ANTHROPIC_API_KEYrg if you want fast grep_filesCreate a .env file:
cd /Users/composio/Downloads/src/nano-claude-code
printf 'ANTHROPIC_API_KEY=your_key_here\n' > .env
Install the command globally on your machine:
cd /Users/composio/Downloads/src/nano-claude-code
npm link
Start interactive mode:
nano-claude-code
Or run it locally from the repo without installing:
npm run chat --
Initialize NANO.md and the rules directory:
nano-claude-code /init
Run a one-shot prompt:
nano-claude-code "summarize this repo"
Run against another workspace:
nano-claude-code --workspace /path/to/project "fix the failing tests"
Small enough to understand.
One process, a few source files, no build graph, no framework maze. If you want to understand the whole repo, you actually can.
Built for direct customization.
This repo is meant to be changed in code, not stretched through config sprawl. If you want different behavior, edit the harness.
Core loop first.
The important part is:
Everything else is secondary.
AI-native interface.
No dashboard. No wizard. No orchestration theater. Open the CLI, tell the agent what to do, and change the code when you want different behavior.
Skills over feature sprawl.
Instead of stuffing every behavior into core, nano-claude-code can load local SKILL.md files and MCP servers. The base stays small.
Project instructions as files.
Like CLAUDE.md in Claude Code, nano-claude-code can load project instructions from NANO.md.
Rules when you need them.
Put path-scoped instructions in .nano/rules/*.md instead of cramming everything into one file.
bash, list_files, grep_files, read_file, write_file, edit_file, apply_patchweb_search, web_fetchNANO.md, .nano/NANO.md, .nano/rules/*.md, NANO.local.mdlist_skills, load_skill, plus prompt-triggered skill preloading like $code-reviewstdio, streamable http, and legacy ssedelegate_taskTry this in the interactive shell:
/status
/skills
Use $code-review to review src/mcp.js
Useful commands:
/help/init/status/skills/clear/exitCtrl+C exits cleanly.
nano-claude-code is intentionally small enough that customization should happen in code.
Examples:
NANO.mdsrc/config.jssrc/ui.jssrc/agent.jssrc/tools.jsskills/*/SKILL.md.nano-claude-code/mcp.jsonThis repo is designed to be forked and changed, not merely configured.
Key files:
src/cli.js - CLI entrypoint and interactive loopsrc/agent.js - model/tool execution loopsrc/anthropic.js - Anthropic client with retry and backoffsrc/tools.js - built-in tools, tool execution, and tool-result compactionsrc/mcp.js - MCP transport handling and dynamic tool wiringsrc/skills.js - local skill discovery and loadingsrc/ui.js - terminal UI, loading indicator, prompts, and error renderingsrc/transcript.js - session persistencesrc/config.js - CLI flags, defaults, and .env loadingsrc/nano.js - NANO.md / .nano/rules instruction loadingskills/code-review/SKILL.md - sample built-in skillSystem shape:
CLI -> Agent Loop -> Anthropic Messages API
-> Built-in Tools
-> MCP Tools
-> Local Skills
-> JSONL Transcript
Skills are plain local instruction files loaded from:
<workspace>/skills/*/SKILL.md<workspace>/.nano-claude-code/skills/*/SKILL.md--skills-dirIf a prompt explicitly mentions a skill like $code-review, nano-claude-code preloads that skill into the turn prompt.
nano-claude-code supports workspace instruction files that behave like a lightweight CLAUDE.md equivalent.
Load order:
NANO.mdnano.md.nano/NANO.md.nano/nano.md.nano/rules/**/*.mdNANO.local.mdnano.local.mdLater files have higher priority.
Rules under .nano/rules/*.md can also use simple frontmatter:
---
paths:
- "src/**/*.js"
- "tests/**"
---
Run vitest for this part of the repo.
Path-scoped rules are included when the prompt mentions files or directories that match those globs.
Simple @include lines are also supported:
@./docs/coding-style.md
@~/.nano/private-notes.md
Included files are loaded before the file that references them.
nano-claude-code can load MCP servers from .nano-claude-code/mcp.json or --mcp-config.
Example:
{
"servers": {
"filesystem": {
"transport": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"."
]
},
"remote-http-server": {
"transport": "http",
"url": "https://example.com/mcp"
},
"legacy-sse-server": {
"transport": "sse",
"url": "https://example.com/sse"
}
}
}
Connected MCP servers contribute dynamic tool definitions directly to the model.
Local session logs and generated runtime state live under .nano-claude-code/.
This is a small local harness, not a hardened sandbox product.
bash runs in the workspace root--approval-mode ask is activeThe safety model is intentionally simple and visible in code.
429, 529, and other 5xx Anthropic failures retry with backoffMinimal skill test:
cd /Users/composio/Downloads/src/nano-claude-code
nano-claude-code --approval-mode auto "First call list_skills, then call load_skill for code-review, then answer with the skill name and one sentence on what it does."
MCP plus skills:
cd /Users/composio/Downloads/src/nano-claude-code
nano-claude-code --approval-mode ask "Use $code-review, inspect the repo, and tell me what MCP tools and resources are available before making any edits."
--workspace <path>: target repo to operate in--model <id>: Anthropic model ID--max-turns <n>: max tool/action rounds per user turn--max-subagent-depth <n>: maximum nested delegation depth--approval-mode ask|auto: interactive confirmation for risky tools, or auto-approve them--mcp-config <path>: explicit MCP config file; defaults to .nano-claude-code/mcp.json--skills-dir <path>: additional skill directory; repeatable--session <uuid>: explicit session ID--resume <uuid>: load messages from an existing session logSyntax check the repo:
npm run check
There is no build step. That is intentional.
If you want to remove the global command later:
cd /Users/composio/Downloads/src/nano-claude-code
npm unlink -g
Human + AI music production workflow for Suno - skills, templates, and tools
Claude Code skill for YouTube creators — channel audits, video SEO, retention scripts, thumbnails, content strategy, Sho
AI image generation skill for Claude Code -- Creative Director powered by Gemini
A Claude Code skill by Hao (駱君昊) that learns your Facebook voice and auto-posts to FB / IG / Threads / X with a 14-day c