claude-code-reverse
A Tool to Visualize Claude Code's LLM Interactions.
Yuyz0112/claude-code-reverse is ranked 8,611 with 2,439 stars.
Yuyz0112/claude-code-reverse is ranked 8,611 among these 8 peers; lmnr-ai/index is ranked 8,609.
| Name | Rank | Metrics |
|---|---|---|
| RAIT-09/obsidian-agent-client | 8,598 |
|
| fossasia/susi_android | 8,600 |
|
| ggozad/oterm | 8,601 |
|
| lmnr-ai/index | 8,609 |
|
| Player-YN/BrowserKitten | 8,628 |
|
| zurawiki/gptcommit | 8,633 |
|
| SoraWebui/SoraWebui | 8,648 |
|
| aress31/burpgpt | 8,650 |
|
| Parameter | Value |
|---|---|
| Language | JavaScript |
| Category | Applications |
| Subcategory | Other |
| Keywords | Claude Code |
| Stars | 2,439 |
| Forks | 414 |
| Contributors | 1 |
| Created date | 2025-02-25 |
| Updated date | 2026-10-14 |
| Stars in 1 day | 0 |
| Stars in 7 days | 4 |
| Rank | 8,611 |
| Previous rank | 8,683 |
| Rank change | 72 |
| 7-day stars rank | 6,020 |
| Previous 7-day stars rank | 5,057 |
| 7-day stars rank change | -963 |
| Total stars rank | 5,384 |
| Previous total stars rank | 5,376 |
| Total stars rank change | -8 |
| Country | China |
So, I implemented a solution to reverse engineer static code using LLMs, which became the first version of this repository. The code for the initial version is currently archived in the v1 directory. At the time, there was another version by someone else that directly restored the source code based on sourcemaps. However, that repository was later taken down, indicating that Anthropic officially does not support this type of reverse engineering. Actually, the implementation of v1 was less about reverse
engineering Claude Code and more an experiment to explore the limits of "analyzing large uglify JS code using LLMs. " When we were able to actually run Claude Code, we found many simpler and more efficient ways to understand how it works. However, I recently noticed a repository gaining popularity that referenced the v1 approach (it mentioned referring to my v1 solution). Yet, a deeper look reveals that this method isn't effective for analyzing the overall architecture and design. So, I
spent a night exploring a reverse engineering approach based on **runtime behavior and API data** (hereafter referred to as v2). I also created a log visualization tool to help researchers interested in Claude Code analyze the parts they care about. If you're interested in the implementation ideas behind v2, please read the following sections in order. If you're only interested in the results of the v2 reverse engineering analysis, you can jump directly to the "Analysis Results" section. Monkey Patching
API Request Code As an agent, Claude Code ultimately needs to interact with LLM APIs. Therefore, the core idea behind v2 is to ignore Claude Code's complex internal processing and instead focus only on the requests and responses that Claude Code ultimately exchanges with the LLM API in different task scenarios. If you want to develop an agent as powerful as Claude Code, theoretically, you just need to implement your own code to construct similar API requests under the same
task scenarios. This type of code is typically application code, with many different implementation methods and styles. Therefore, I believe implementing it from scratch yourself is the most reasonable approach. What's truly worth learning from Claude Code, however, is the content of its interactions with the LLM API, as this reflects its understanding of LLMs and agents. To get the API data, there are many methods, but my current approach involves modifying Claude Code's installed files. First, locate the file
: Next, use to format : Upon examining the formatted and referring to Anthropic's TS SDK, you'll find that Claude Code uses this SDK for all its requests, specifically the method. We just need to find the bundled TS SDK code within and monkey patch the method. The TS SDK has some intricacies regarding Promise and Stream encapsulation that I won't detail here; please refer to the actual patch code in cli. This patch implements the following logic: 1. Create a file
every time Claude Code starts. Record corresponding logs whenever an API request is sent and a response is received. After
How many stars and forks are recorded?
Yuyz0112/claude-code-reverse has 2,439 stars and 414 forks.
What is the repository rank?
Yuyz0112/claude-code-reverse is ranked 8,611.
What language and category are recorded?
Yuyz0112/claude-code-reverse has 2,439 stars, uses JavaScript and belongs to Applications.
Which repository is closest in rank?
Yuyz0112/claude-code-reverse is compared with lmnr-ai/index, ranked 8,609 with 2,440 stars.