Claude Code Research banner
cablate cablate

Claude Code Research

Development community

Description

Independent research on Claude Code internals, Claude Agent SDK, and related tooling.

Installation

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

README

Claude Code Research

[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](./CONTRIBUTING.md)

Independent research on Claude Code internals.

What's in this repo

Directory What Source Count
`source-code-analysis/` Full architecture reverse-engineering Leaked TypeScript source (v2.1.88) 75 reports
`reports/` Problem-oriented investigations (cache, cost, injection) Minified npm bundle (cli.js) 8 reports

**Looking for the source code analysis?** Go to [`source-code-analysis/`](./source-code-analysis/). **Looking for specific bug/cost investigations?** Go to [`reports/`](./reports/).


Source Code Analysis (`source-code-analysis/`)

On 2026-03-31, the full source code of Claude Code was exposed via a sourcemap file in the npm registry ([discovered by Chaofan Shou](https://x.com/shoucccc), archived by [Kuberwastaken](https://github.com/Kuberwastaken/claude-code) and [sanbuphy](https://github.com/sanbuphy/claude-code-source-code)).

We performed a 10-domain, 75-report analysis — the most thorough publicly available breakdown of how a production AI coding agent works.

**[Browse all reports →](./source-code-analysis/)**

Interactive viewer — open `source-code-analysis/index.html` in your browser (all 75 reports are embedded, no server needed).

Key Findings

Domain Reports Highlights
Harness Engineering 7 Agent Loop reverse-engineering, 12 transferable harness design principles
System Prompt 6 Complete 13-section prompt with dynamic assembly logic, 17 prompt engineering patterns
Cost & Quota 8 Cost envelope, prompt cache break detection (12 causes), Haiku→Opus 37.5x cost ga