FareedKhan-dev/claude-code-from-scratch — reverse-engineered prompt
Reverse engineered prompt
Build me a Python project that recreates the main ideas behind Claude Code in a clear, learnable way. I want it to start with a tiny agent loop that talks to a model, lets the model ask to read files, write files, and run commands, then feeds the results back so it can keep working.
Make it grow step by step into a more complete coding agent with planning, subagents, skill loading, context cleanup, background tasks, agent teammates, streaming responses, permissions, session save and resume, parallel tool calls, interrupts, MCP support, and optional Redis mailboxes. Keep the shared logic in one core file so each lesson file only shows the new idea.
It should work with Anthropic Claude directly, but also let me use other models through LiteLLM without changing the agent code. Include clear setup instructions, an example env file, simple config files, and a few sample skills. Look up current docs online if needed.
Want more depth? Deep Reverse