🦞🦀 Your tiny coding claw. Learn to build an AI coding agent from scratch—small, simple, powerful.
概览
Your tiny coding claw Learn to build an AI coding agent in ~2000 lines of Python Ever wondered how tools like Claude Code or OpenClaw actually work under the hood? is the answer -- a minimal, hackable AI coding agent you can read through in an afternoon. The name says it all: + (from Open**). No sprawling architecture, no thousand-file monorepo. Just the essential loop that powers every AI coding assistant: If you want to , , or an AI agent, start here. - -- read, write, edit, glob, grep, bash, Skill, todo_write, ask_followup_question, memory, session_search, Agent. Workspace file ops plus task tracking, user clarification, on-demand skills, persistent memory, past-session recall, and sub-agents. - -- Automatically loads AGENTS.md and .miniclaw/rules/*.md into the system prompt. Project conventions and coding guidelines are always visible to the agent. - -- The agent can enter a read-only planning phase: explore code, produce a structured plan, then execute only after you approve.
README
以下为原文 README 节选,完整内容请查看原文。
Your tiny coding claw Learn to build an AI coding agent in ~2000 lines of Python
English | 中文
What is miniclaw?
Ever wondered how tools like Claude Code or OpenClaw actually work under the hood? miniclaw is the answer – a minimal, hackable AI coding agent you can read through in an afternoon.
The name says it all: mini + claw (from OpenClaw). No sprawling architecture, no thousand-file monorepo. Just the essential loop that powers every AI coding assistant:
You type a request
-> LLM thinks
-> LLM calls tools (read / write / edit / grep / glob / bash)
-> Tools execute in your workspace
-> LLM sees the result
-> Repeat until done
If you want to learn, teach, or hack on an AI agent, start here.
Features
- 12 Tools –
read,write,edit,glob,grep,bash,Skill,todo_write,ask_followup_question,memory,session_search,Agent. Workspace file ops plus task tracking, user clarification, on-demand skills, persistent memory, past-session recall, and sub-agents. - Project Rules – Automatically loads
AGENTS.mdand.miniclaw/rules/*.mdinto the system prompt. Project conventions and coding guidelines are always visible to the agent. - Plan Mode – The agent can enter a read-only planning phase: explore code, produce a structured plan, then execute only after you approve. Write operations are blocked until you say go.
- Skills System – Drop a
SKILL.mdinto.miniclaw/skills//and the agent learns new tricks. Skills are injected into the system prompt automatically; theSkilltool loads full instructions on demand. - Memory – Durable facts live in
~/.miniclaw/memory/MEMORY.mdand are auto-injected each session. The agent can read/write topic files for longer notes. - Session Search – Conversations are recorded locally; the agent can browse, full-text search, or scroll through past sessions.
- Sub-agents – Optional
Agenttool spawns an isolated sub-agent (explore/general) so research or side tasks don’t pollute the main context. Enable withsubagent.enabled.
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add sundl123/miniclaw