Claude Code workflow kit

miniClaudeCode

miniClaudeCode - 从50万行蒸馏到~1000行的Claude Code核心Agent架构最小复现 | Distilled Claude Code agent framework

140 stars 23 forksWorkflow kits Source

Install

From source
git clone https://github.com/bcefghj/miniClaudeCode.git

From the README

miniClaudeCode

从 50 万行蒸馏到 ~800 行 -- Claude Code 核心架构的最小可运行复现

miniClaudeCode 是对 Claude Code 核心 Agent 架构的蒸馏(distillation)实现。它保留了 Claude Code 最核心的四大模块——Agent Loop、Tool System、Permission System、Context Management——同时将代码量从原版的 ~500K 行精简到 ~800 行纯 Python。

架构总览

Claude Code 原版 vs miniClaudeCode

快速开始

安装

设置 API Key

交互模式

单次执行

指定模式

内置工具

miniClaudeCode 保留了 Claude Code 最核心的 6 个工具:

蒸馏笔记

什么是"蒸馏"?

蒸馏 (Distillation) 是指从一个大型复杂系统中提取核心架构和关键逻辑,去掉非本质的复杂性,保留最小可运行的版本。

蒸馏过程

1. 分析原版架构:研究 claw-code 的 28 个子系统、100+ 工具、150+ 命令
2. 识别核心模式:Agent Loop 是灵魂,Tool 接口是骨架,Permission 是安全网
3. 保留本质:6 个工具覆盖 90% 的编码场景
4. 去除复杂性:去掉 MCP、SubAgent、Teams、React UI、Hooks 等

去掉了什么?

- MCP 服务器集成:自定义工具扩展(miniClaudeCode 用固定工具集)
- SubAgent/Task 并行系统:子智能体分叉(miniClaudeCode 用单线程循环)
- Team/tmux 多进程协作:多 Agent 协同(超出 mini 范围)
- Ink/React 终端 UI:复杂渲染(miniClaudeCode 用 print)
- Hooks 系统:PreToolUse/PostToolUse 钩子(简化为直接权限检查)
- 远程/SSH/Teleport 模式:远程连接能力
- Plugin/Skill 加载系统:运行时扩展

项目结构

运行测试

参考资料

- Claude Code 架构解析
- Anthropic Harness Design
- claw-code - Python 移植工作区

License

MIT
Read the full README on GitHub

Details

Language
Python
Last updated
31 March 2026

FAQ

What is miniClaudeCode?

miniClaudeCode - 从50万行蒸馏到~1000行的Claude Code核心Agent架构最小复现 | Distilled Claude Code agent framework It is a workflow kit for Claude Code, from bcefghj/miniClaudeCode on GitHub.

How do I install miniClaudeCode?

Clone bcefghj/miniClaudeCode from GitHub and follow the setup steps in its README.

Is miniClaudeCode popular?

bcefghj/miniClaudeCode has 140 GitHub stars and 23 forks. It was last updated on 31 March 2026.

More workflow kits

Browse the most popular Claude Code mods, all workflow kits, or the skills and MCP server directories.