mini-claude-code  by shareAI-lab

Build AI coding agents progressively from scratch

Created 3 months ago
264 stars

Top 96.8% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> This repository offers a progressive tutorial for building AI coding agents from scratch, starting with a minimal bash-based agent and incrementally adding complexity. It targets developers and researchers seeking to understand the core mechanics of agents like Kode, Claude Code, and Cursor, providing a clear, code-driven path from basic loops to advanced features like planning, subagents, and on-demand skills. The benefit is a demystified, hands-on understanding of AI agent architecture.

How It Works

The project demystifies AI coding agents through a series of five progressively complex Python versions, totaling approximately 1100 lines. The core agent loop involves a model generating responses, executing tool calls, and iterating until completion. Key concepts are introduced sequentially: v0 demonstrates a bash tool, v1 adds core agent tools, v2 incorporates explicit planning via todo tracking, v3 introduces subagents for task decomposition, and v4 integrates a skills mechanism for domain expertise. This layered approach highlights that sophisticated agents are built upon simple, iterative principles.

Quick Start & Requirements

Installation requires pip install anthropic python-dotenv. Users must configure their API key by copying .env.example to .env and editing it. Any version can be run via python vX_...agent.py (e.g., python v0_bash_agent.py for the minimal version, python v4_skills_agent.py for the version with skills). Official documentation is available in the docs/ directory.

Highlighted Details

  • Progressive Learning: 5 versions, ~1100 lines total, each adding a single core concept to build understanding incrementally.
  • Core Agent Loop: A simple while True loop executing model responses and tool calls forms the foundation.
  • Key Concepts: Covers "Bash is All You Need," "Model as Agent," "Structured Planning," "Subagent Mechanism," and "Skills Mechanism."
  • Agent Builder Skill: Includes a meta-skill to scaffold new agent projects.
  • Production Integration: Supports integration with Kode CLI and Claude Code via the shareAI-skills project.

Maintenance & Community

This repository has moved to learn-claude-code. It is closely related to Kode (a full-featured agent CLI) and shareAI-skills (production-ready skills), both part of the broader shareAI ecosystem. Detailed explanations are available in English and Chinese within the docs/ directory.

Licensing & Compatibility

The project is released under the MIT License, permitting broad use, including commercial applications.

Limitations & Caveats

This repository serves as an educational tutorial and has been superseded by learn-claude-code. The "mini" versions are illustrative; production-ready agent frameworks and skills are provided by related projects like Kode and shareAI-skills.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
2
Star History
69 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.