Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A Tool to Visualize Claude Code's LLM Interactions
| Date | Stars |
|---|---|
| 2026-07-31 | 2408 |
| 2026-08-03 | 2409 |
| 2026-08-06 | 2409 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Claude Code Reverse Engineering: New Version (July 2025) [中文版](./README.zh_CN.md) **🚀 Quick Try**: Experience the reverse engineering analysis results through our interactive visualization tool at [https://yuyz0112.github.io/claude-code-reverse/visualize.html](https://yuyz0112.github.io/claude-code-reverse/visualize.html) When Anthropic released Claude Code (February 2025), I couldn't try it directly because registrations were paused due to high load. 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](./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 `cli.js` file: ```shell which claude $PATH_TO_CLAUDE ls -l $PATH_TO_CLAUDE $PATH_TO_CLAUDE -> $REAL_PATH/cli.js ``` Next, use `js-beautify` to format `cli.js`: ```shell mv cli.js cli.bak js-beautify cli.bak > cli.js ``` Upon examining the formatted `cli.js` and referring to Anthropic's [TS SDK](https://github.com/anthropics/anthropic-sdk-typescript), you'll find that Claude Code uses this SDK for all its requests, specifically the `beta.messages.create` method. We just need to find the bundled TS SDK code within `cli.js` and monkey patch the `beta.messages.create` 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.js.patch](./cli.js.patch) for specifics. This patch implements the following logic: 1. Create a `messages.log` file every time Claude Code starts. 2. Record corresponding logs whenever an API request is sent and a response is received. After making this modification, using Cl
Excerpt of 10,364 characters
Read on GitHub16
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:12cad3648a22b6a1, llm:description: 'A Tool to Visualize Claude Code's LLM Interactions' (repository description)
matched fp:12cad3648a22b6a1, llm:description: 'A Tool to Visualize Claude Code's LLM Interactions' (repository description)