Quick Start — Building from Source
Description
> **TL;DR**: A full rebuild requires **Bun** (not Node.js) for its compile-time > intrinsics (`feature()`, `MACRO`, `bun:bundle`). A best-effort build with > esbuild gets ~95% there but needs manual f
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for zhangbo2008/claude_code_annotated, shared by 2 entries
in this directory. It describes the repository, not this entry specifically.
Quick Start — Building from Source
**TL;DR**: A full rebuild requires **Bun** (not Node.js) for its compile-time intrinsics (`feature()`, `MACRO`, `bun:bundle`). A best-effort build with esbuild gets ~95% there but needs manual fixes for ~108 feature-gated modules.
Option A: Run the pre-built CLI (Recommended)
The npm package already contains a compiled `cli.js`:
cd /path/to/parent/ # where package.json and cli.js live
node cli.js --version # → 2.1.88 (Claude Code)
node cli.js -p "Hello Claude" # Non-interactive mode
# Or install globally:
npm install -g .
claude --version
**Authentication required**: Set `ANTROPIC_API_KEY` or run `node cli.js login`.
Option B: Build from Source (Best Effort)
Prerequisites
node --version # >= 18
npm --version # >= 9
Steps
cd claude-code-2.1.88/
# 1. Install build dependency
npm install --save-dev esbuild
# 2. Run the build script
node scripts/build.mjs
# 3. If successful, run the output:
node dist/cli.js --version
What the Build Script Does
| Phase | Action |
|---|---|
| 1. Copy | src/ → build-src/ (original untouched) |
| 2. Transform | feature('X') → false (enables dead code elimination) |
| 2b. Transform | MACRO.VERSION → '2.1.88' (compile-time version injection) |
| 2c. Transform | import from 'bun:bundle' → stub import |
| 3. Entry | Create wrapper that injects MACRO globals |
| 4. Bundle | esbuild with iterative stub creation for missing modules |
Known Issues
The source code uses **Bun compile-time intrinsics** that cannot be fully replicated with esbuild:
**`feature('FLAG')` from `bun:bundle`** — Bun resolves this at compile time to `true`/`false` and eliminates dead branches. Our transform replaces with `false`, but esbuild still resolves `require()` inside those branches.
**`MACRO.X`** — Bun's `--define` replaces these at compile time. We use string replacement, which works for most cases but can miss edge cases in complex expressions.
**108 missing modules** — These are feature-gated internal modules (daemon, bridge assistant, context collapse, etc.) that don't exist in the published source. They're normally dead-code-eliminated by Bun but esbuild can't eliminate them because the `require()` calls are still syntactically present.
**`bun:ffi`** — Used for native proxy support. Stubbed out.
**TypeScript `import type` from generated files** — Some generated type files are not in the published source.
To Fix Remaining Issues
# 1. Check what's still missing:
npx esbuild build-src/entry.ts --bundle --platform=node \
--packages=external --external:'bun:*' \
--log-level=error --log-limit=0 --outfile=/dev/null 2>&1 | \
grep "Could not resolve" | sort -u
# 2. Create stubs for each missing module in build-src/src/:
# For JS/TS: create file exporting empty functions
# For text: create empty file
# 3. Re-run:
no
Related Skills
Claude Code Terminal Title
Gives each Claude Code terminal window a dynamic title describing the work being done
Productivity N8n Skills
Enables AI assistants to directly understand and operate n8n workflows
Productivity Composio Make
Trigger and manage Make (Integromat) scenarios
Productivity Getting Help
career-ops is an open source project maintained in limited time. Here's how to get help efficiently.
Productivity Worktree Status Check
Verify the current worktree environment and show task details.
Productivity Time Command
Display the current date and time in Pakistan Standard Time (PKT, UTC+5).
Productivity