📦 Complete archive of the leaked Claude Code source code from Anthropic (March 31, 2026)
Claude Code is Anthropic's revolutionary AI-powered coding assistant that runs directly in your terminal. It's designed to help developers with:
- 🔧 Code Generation - Write, edit, and refactor code using natural language
- 📁 File Operations - Create, read, update, and delete files autonomously
- 🐛 Debugging - Find and fix bugs with AI-powered analysis
- 🧪 Testing - Generate and run tests automatically
- 🌐 Web Fetching - Retrieve information from the web
- 📊 Project Understanding - Analyze and navigate complex codebases
- 🔄 Git Integration - Manage version control seamlessly
Claude Code became one of the most popular AI coding tools, known for its ability to perform complex, multi-step tasks autonomously while maintaining context across long sessions.
On March 31, 2026, Claude Code's entire source code was accidentally exposed. This repository preserves that codebase for educational and research purposes, allowing developers to study:
- How enterprise-grade AI agents are architected
- The internal workings of tool systems and command processing
- Real-world patterns for context management and session handling
- Production-level plugin and hook architectures
📦 Claude-code-leaksource
├── 📂 src/ # Main source code
│ ├── 📂 assistant/ # AI assistant core logic
│ ├── 📂 cli/ # Command-line interface
│ ├── 📂 commands/ # Built-in command implementations
│ ├── 📂 tools/ # Tool system (file ops, web fetch, etc.)
│ ├── 📂 hooks/ # Pre/post execution hooks
│ ├── 📂 plugins/ # Plugin architecture
│ ├── 📂 services/ # Service layer
│ ├── 📂 skills/ # Skill modules
│ ├── 📂 context/ # Context & session management
│ ├── 📄 runtime.py # Core execution engine
│ ├── 📄 commands.py # Command definitions
│ ├── 📄 tools.py # Tool implementations
│ ├── 📄 context.py # Context handling
│ ├── 📄 main.py # Entry point
│ └── ...
├── 📂 tests/ # Test suite
├── 📂 assets/ # Images and media
└── 📄 README.md
The heart of Claude Code's capabilities. Each tool is a modular unit that can:
- Read/write files
- Execute shell commands
- Search codebases with grep/glob
- Fetch web content
- Interact with Git
Built-in slash commands like:
/help- Display available commands/clear- Clear conversation history/compact- Compress context/init- Initialize project settings
Extensibility points for custom behavior:
- Pre-execution hooks
- Post-execution hooks
- Error handlers
- Output formatters
Modular extensions that add new capabilities without modifying core code.
Sophisticated system for maintaining:
- Conversation history
- File state tracking
- Session persistence
- Memory optimization
# Clone the repository
git clone https://github.com/Yusufkuscu/Claude-code-leaksource.git
cd Claude-code-leaksource
# Explore the manifest
python -m src.main manifest
# View subsystems
python -m src.main subsystems --limit 20
# Run the test suite
python -m unittest discover -s tests -v| Topic | What You'll Discover |
|---|---|
| Agent Architecture | How to structure a production AI agent |
| Tool Calling | Patterns for implementing AI tool systems |
| Context Windows | Managing long conversations efficiently |
| Plugin Systems | Building extensible architectures |
| CLI Design | Creating powerful command-line interfaces |
| Error Handling | Graceful failure and recovery patterns |
| Testing AI Agents | Strategies for testing non-deterministic systems |
🌟 The Next-Generation AI Creative Workspace Platform
BLYTH AI is a modern AI Creative Workspace platform — a production-grade SaaS that lets you build visual, video, and text generation workflows on a node-based infinite canvas.
💡 Think of it as "Lego blocks for AI" — build complex AI pipelines without writing a single line of code!
Example Workflow:
📝 Text Input → 🤖 LLM (Prompt Enhancement) → 🎨 Image Generation → 🎨 Video Generation → 📤 Output
| Feature | Description |
|---|---|
| 🎯 Infinite Canvas | ReactFlow-powered workspace with unlimited space |
| 🧊 Drag & Drop Blocks | 13+ block types for every AI task |
| ⚡ Auto-Save | Never lose work — saves every 5 seconds |
| 🔄 Undo/Redo | Full history support |
| 🎨 Theme Customization | Background patterns, colors, animations |
| 📷 PNG Export | Download your canvas as an image |
| ⌨️ Keyboard Shortcuts | Ctrl+Z, Ctrl+Y, Delete, and more |
- 🖼️ Image Block — Text-to-image, image-to-image, inpaint, outpaint, upscale
- 🎬 Video Block — Text-to-video, image-to-video, video-to-video
- 📝 Text Block — LLM text generation, prompt splitter
- ✂️ SAM Mask — Florence-SAM3 automatic segmentation
- 🎨 Inpaint — Masked area editing
- 🖌️ Style Ref — IP-Adapter style reference
- 🔀 Compositor — Multi-image compositing
- 📚 Multi-Ref — Flux 2 Pro Edit with 10 reference image blending
- 📝 Text Input — Static prompt input
- 📤 Upload — Image/video upload
- 📥 Output — View & download results
- 📌 Note — Add notes to your canvas
| Provider | Models |
|---|---|
| Black Forest Labs | FLUX Pro, Kontext Max, Schnell, Dev |
| Stability AI | Stable Diffusion 3.5, SDXL Turbo |
| OpenAI | DALL-E 3 |
| Recraft | Recraft V3 |
| Ideogram | Ideogram V2 |
| Midjourney | Midjourney V6 |
| Playground | Playground V3 |
| Leonardo AI | Leonardo Phoenix |
- 🎨 Designers — No coding required
- 📱 Content Creators — Build creative pipelines
- 📈 Marketing Teams — Batch content generation
- 🏢 Agencies — Multiplayer workflows
Be among the first to experience the future of AI-powered creative workflows!
IMPORTANT: This repository is provided strictly for educational and research purposes.
- 📌 This is NOT affiliated with, endorsed by, or maintained by Anthropic
- 📌 No ownership is claimed over the original source material
- 📌 No warranty or support is provided
- 📌 Users are solely responsible for their use of this material
- 📌 This archive exists to advance understanding of AI agent systems
This is an archive repository. Contributions for documentation improvements, analysis, and educational materials are welcome.
This repository contains leaked proprietary code. Use at your own discretion and risk. The original code is property of Anthropic.
📚 Archived for educational and research purposes | March 2026