Claude-code

作者 fazxes

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster through natural language commands. Rebuilt from leaked source.

222
Stars
216
Forks
TypeScript
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/fazxes/Claude-code

快速入门

使用 Claude-code 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Claude Code — Rebuilt from Leaked Source

Disclaimer: This repository contains proprietary source code belonging to Anthropic that was unintentionally exposed via a source map file (.js.map) included in the official @anthropic-ai/claude-code npm package. This repository is provided strictly for educational and research purposes — to study the architecture, design patterns, and engineering of a production-grade AI coding agent. This project is not affiliated with, endorsed by, or authorized by Anthropic. If you are a representative of Anthropic and wish to have this repository removed, please open an issue or contact the repository owner. Use at your own risk. The authors assume no liability for any use or misuse of this code.


On March 31, 2026, the full source code of Anthropic's Claude Code CLI was leaked via a .map file exposed in their npm registry. This repo contains that source rebuilt into a runnable CLI.

Quick Start

Prerequisites: Bun v1.1+

git clone https://github.com/fazxes/claude-code.git
cd claude-code
bun install
bun run build
bun dist/cli.js

That's it. The CLI will launch and prompt you to authenticate via OAuth (same flow as the official Claude Code).

Commands

bun dist/cli.js                    # Launch interactive REPL
bun dist/cli.js --help             # Show all options
bun dist/cli.js --version          # Show version
bun dist/cli.js -p "your prompt"   # Non-interactive mode (pipe-friendly)
bun dist/cli.js auth login         # Authenticate

How It Was Leaked

Chaofan Shou (@Fried_rice) discovered the leak:

"Claude code source code has been leaked via a map file in their npm registry!"

@Fried_rice, March 31, 2026

The source map in the published npm package contained a reference to the full, unobfuscated TypeScript source, downloadable as a zip from Anthropic's R2 storage bucket.

What's Inside

  • ~1,900 source files, 512,000+ lines of TypeScript
  • Runtime: Bun
  • Terminal UI: React + custom forked Ink
  • CLI parser: Commander.js
  • Layout engine: Pure TypeScript port of Yoga (Meta's flexbox engine)

Architecture

src/
├── main.tsx                 # Entrypoint (Commander.js CLI parser)
├── commands.ts              # Command registry
├── tools.ts                 # Tool registry (~40 tools)
├── QueryEngine.ts           # LLM query engine (Anthropic API)
├── context.ts               # System/user context collection
├── ink/                     # Custom Ink fork (terminal React renderer)
├── commands/                # Slash command implementations
├── tools/                   # Agent tool implementations
├── components/              # React UI components
├── services/                # API, MCP, OAuth, telemetry
├── screens/                 # Full-screen UIs (REPL, Doctor)
├── native-ts/               # Pure TS ports of native modules
│   ├── yoga-layout/         # Flexbox layout engine
│   ├── color-diff/          # Syntax-highlighted diffs
│   └── file-index/          # Fuzzy file search
└── vim/                     # Vim mode implementation

What's Stubbed Out

Some internal Anthropic features weren't included in the leak or are behind private packages. These are stubbed with no-ops:

  • Computer Use (@ant/computer-use-*) — screen control tools
  • Chrome Integration (@ant/claude-for-chrome-mcp) — browser automation
  • Sandbox Runtime (@anthropic-ai/sandbox-runtime) — sandboxed execution
  • TungstenTool, REPLTool — internal-only tools
  • Context Collapse — internal compaction feature

The core CLI, all standard tools (Bash, Edit, Read, Write, Grep, Glob, etc.), MCP support, and the full terminal UI work.

Build Details

The build script (build.ts) uses Bun's bundler to:

  1. Bundle 4,500+ modules into a single dist/cli.js (~21 MB)
  2. Define MACRO.* build-time constants (version, feedback channel)
  3. Externalize optional native deps (sharp, react-devtools-core)

Feature flags from bun:bundle's feature() all return false — internal Anthropic features (voice mode, coordinator mode, etc.) are disabled.

Telemetry

By default, Claude Code sends telemetry to Anthropic (event logging, Datadog, GrowthBook). To disable all telemetry:

DISABLE_TELEMETRY=1 bun dist/cli.js

Or for maximum privacy:

DISABLE_TELEMETRY=1 CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 bun dist/cli.js

Disclaimer

This repository contains proprietary source code that was unintentionally made public by Anthropic through their npm package distribution. It is provided here for educational and research purposes only.

  • This project is not affiliated with Anthropic
  • No warranty is provided, express or implied
  • Users are responsible for their own compliance with applicable laws
  • This repository may be subject to takedown at Anthropic's request
  • Do not use this for commercial purposes

常见问题

What is Claude-code?

Claude-code is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by fazxes. Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster through natural language commands. Rebuilt from leaked source. It has 222 GitHub stars.

Is Claude-code safe to use?

Claude-code returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install Claude-code?

Clone the repository with "git clone https://github.com/fazxes/Claude-code" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is Claude-code written in?

Claude-code is primarily written in TypeScript. It is open-source under fazxes on GitHub, so you can review or fork the full source.

Are there alternatives to Claude-code?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Claude-code against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情