T-Lab-CUHKSZ

Claude Code — Development skill for Claude Code

Development community intermediate

Claude Code Source - Buildable Research Fork.

How to install Claude Code

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

What Claude Code does

Claude Code Source - Buildable Research Fork. Reverse-engineered build system, runnable with Bun.

Alternatives in Development

  • Master Routing — reverse-skill PRIMARY 快路径 29.6k ★
  • Desloppify — Agent harness to make your slop code well-engineered and beautiful 3k ★
  • Claude Code Rev — Runnable ClaudeCode source code 3k ★

README

Claude Code Source - Buildable Research Fork

[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)]() [![Bun](https://img.shields.io/badge/runtime-Bun-f9f1e1?logo=bun)](https://bun.sh) [![TypeScript](https://img.shields.io/badge/lang-TypeScript-3178c6?logo=typescript&logoColor=white)]() [![Lines of Code](https://img.shields.io/badge/lines-512K+-blue)]() [![License](https://img.shields.io/badge/license-research%20only-orange)]() [![Stars](https://img.shields.io/github/stars/beita6969/claude-code?style=social)](https://github.com/beita6969/claude-code/stargazers) [![Forks](https://img.shields.io/github/forks/beita6969/claude-code?style=social)](https://github.com/beita6969/claude-code/network/members)

A **buildable, modifiable, and runnable** version of the Claude Code source.

Based on the Claude Code source snapshot publicly exposed on 2026-03-31 via an npm source map leak. The original snapshot contained only raw TypeScript source with no build configuration — it could not be compiled or run. This fork reconstructs the full build system and fixes all missing components to make it functional.

**[Quick Start](#quick-start)** | **[Architecture](#architecture-overview)** | **[Feature Flags](#feature-flags)** | **[Extension Guide](#extension-points-no-source-modification-needed)**


Quick Start

Prerequisites

  • Bun >= 1.3.x
  • Valid Anthropic authentication (OAuth via claude login or ANTHROPIC_API_KEY)

Install & Run

git clone https://github.com/beita6969/claude-code.git
cd claude-code

# Install dependencies (auto-creates bun:bundle polyfill via postinstall)
bun install

# Run directly
bun src/main.tsx -p "your prompt here" --output-format text

Build (Optional)

# Compile to single bundle (~20MB)
bun build src/main.tsx --outdir=dist --target=bun

Run Modes

# Headless print mode (no TTY needed)
bun src/main.tsx -p "your prompt here" --output-format text

# JSON output
bun src/main.tsx -p "your prompt here" --output-format json

# Interactive REPL mode (needs TTY)
bun src/main.tsx

**Note**: If `ANTHROPIC_API_KEY` is set in your environment, it must be valid. To use OAuth instead, unset it:

unset ANTHROPIC_API_KEY

What Changed vs. the Original Snapshot

The original snapshot shipped **no `package.json`, no `tsconfig.json`, no lockfile, and no build scripts**. Over 100 internal/feature-gated modules were also missing from the source map.

Build System (Reconstructed)

File Purpose
package.json 60+ npm dependencies reverse-engineered from ~1,900 source files
tsconfig.json TypeScript config (ESNext + JSX + Bun bundler resolution)
bunfig.toml Bun runtime configuration
scripts/postinstall.sh Auto-creates bun:bundle runtime polyfill after bun install
.gitignore Excludes node_modules/, dist/, lockfiles

Stub Modules (Created)

The original so