buildwithabid

Codecrafters Claude Code Python — AI skill for Claude Code

AI community

A minimal LLM coding agent in ~280 lines of Python — Read/Write/Edit/Bash/Glob/Grep tools with an agent loop.

How to install Codecrafters Claude Code Python

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

What Codecrafters Claude Code Python does

A minimal LLM coding agent in ~280 lines of Python — Read/Write/Edit/Bash/Glob/Grep tools with an agent loop. Built in under 48 hours with Claude Code (CodeCrafters Python rank #13).

Alternatives in AI

  • Agmsg — Cross-vendor messaging for CLI AI coding agents — let Claude Code, Codex, Gemini & Copilot talk to each other 1.5k ★
  • SEO Geo Claude Skills — 20 SEO & GEO skills for Claude Code, Cursor, Codex, and 35+ AI agents 888 ★
  • CoreCoder — Minimal AI coding agent (~1,400 LoC Python) inspired by Claude Code 616 ★

README

[![progress-banner](https://backend.codecrafters.io/progress/claude-code/79e3d0dc-a2eb-4b28-bb10-8786b1784122)](https://app.codecrafters.io/users/BuildWithAbid?r=2qF)

Build Your Own Claude Code in Python — a minimal LLM coding agent from scratch

An **LLM-powered coding agent** in ~280 lines of Python. Give it a prompt, and it decides which tools to call (Read, Write, Edit, Bash, Glob, Grep), actually runs them on your filesystem, feeds the results back to the model, and keeps looping until the task is done. The tool surface mirrors the real [Claude Code](https://claude.com/claude-code) CLI.

Built in under **48 hours** with Claude Code itself, while reaching **CodeCrafters Python leaderboard rank #13**.

If you searched for *"build an LLM agent from scratch"*, *"OpenAI tool calling Python"*, *"AI coding assistant implementation"*, or *"agent loop tutorial"* — this repo is a compact, readable starting point.


What it does

export OPENROUTER_API_KEY=...
./your_program.sh -p "Summarize what app/main.py does and propose 2 refactors."

The agent will:

  1. Call Read on app/main.py
  2. Think about the content
  3. Possibly call Grep or Glob to explore the project
  4. Produce its final answer

Or:

./your_program.sh -p "Add a --verbose flag to app/main.py that prints each tool call."

And it will edit the file in place with **Edit** — because the model chose to.

Implemented tools (match the real Claude Code)

Tool Purpose
Read Return the contents of a file
Write Write content to a file (overwrite)
Edit Exact string replace with uniqueness / replace_all checks
Bash Run a shell command, return stdout/stderr/exit code
Glob Find files by glob pattern, sorted by mtime
Grep