HubLensAI Agentsyasasbanukaofficial/claude-code
// archived 2026-04-04
yasasbanukaofficial

claude-code

Security#npm#Source Maps#AI Agents#TypeScript#Reverse Engineering
View on GitHub
78

// summary

This project backs up the complete source code of Anthropic's official AI coding tool, Claude Code, which was leaked due to the accidental inclusion of sourcemap files in an npm package. The repository details the cause of the leak and provides an in-depth analysis of Claude Code's complex internal architecture and hidden features. This initiative aims to provide researchers with a reference platform for studying and archiving the internal systems of this AI agent framework.

// technical analysis

This project is a backup repository of Claude Code that leaked source code due to an npm package build configuration error, showcasing the internal architecture of Anthropic's official AI coding CLI. Its core design adopts a terminal rendering engine based on React Ink and integrates a complex Agent orchestration system, multi-tool support, and automated memory management mechanisms. The project reveals the technical implementation of enterprise-grade AI tools in handling multi-agent collaboration, security protection under Undercover mode, and long-term memory consolidation through a "dream" system, providing a valuable reference case for researching AI Agent frameworks.

// key highlights

01
Built-in Tamagotchi-style Buddy system, providing users with virtual companions with different personality attributes through deterministic random algorithms.
02
Implements Undercover mode to mask internal model codenames, ensuring that AI does not leak sensitive internal information when collaborating in public codebases.
03
Equipped with an autoDream service, which periodically organizes logs and updates persistent memory files via background sub-agents to optimize context.
04
Integrates KAIROS proactive assistant and ULTRAPLAN deep planning engine, supporting the offloading of complex tasks to remote models for long-duration reasoning.
05
Adopts a modular tool architecture, containing over 40 Agent tools for Bash operations, file processing, and LSP interaction.
06
Provides MCP server support, allowing developers to explore and analyze the project's source code structure directly via Claude tools.

// use cases

01
Researching Claude Code's multi-agent orchestration and React terminal rendering architecture
02
Analyzing the internal hidden Tamagotchi-style companion system and automatic memory organization mechanism
03
Learning how to prevent production source code leaks through secure sourcemap configuration

// getting started

Developers can clone the repository and install dependencies using npm install, then run npm run build to build the project. Once the build is complete, use node dist/main.js to start the CLI, or configure an MCP server to utilize Claude for source code exploration.