skills/claude-code-haha-local/SKILL.md
```markdown --- name: claude-code-haha-local description: Run the leaked Claude Code source locally with any Anthropic-compatible API endpoint triggers: - set up claude code haha locally - run claude code from source - configure custom API endpoint for claude code - use minimax or openrouter with claude code - fix claude code not starting - connect claude code to compatible API - run leaked claude code source - self-host claude code with custom model --- # Claude Code Haha — Loc
npx skillsauth add aradotso/trending-skills skills/claude-code-haha-localInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
---
name: claude-code-haha-local
description: Run the leaked Claude Code source locally with any Anthropic-compatible API endpoint
triggers:
- set up claude code haha locally
- run claude code from source
- configure custom API endpoint for claude code
- use minimax or openrouter with claude code
- fix claude code not starting
- connect claude code to compatible API
- run leaked claude code source
- self-host claude code with custom model
---
# Claude Code Haha — Local Runnable Claude Code from Leaked Source
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
A patched, locally runnable version of the Claude Code source that leaked from Anthropic's npm registry on 2026-03-31. Fixes multiple blocking issues in the original leak so the full Ink TUI works. Supports any Anthropic-compatible API (MiniMax, OpenRouter, etc.).
---
## What It Does
- Full Ink TUI interactive interface (identical to official Claude Code)
- `--print` headless mode for scripts/CI
- MCP server, plugin, and Skills support
- Custom API endpoint and model configuration
- Fallback Recovery CLI mode if TUI fails
---
## Installation
### 1. Install Bun (required runtime)
```bash
# macOS / Linux
curl -fsSL https://bun.sh/install | bash
# If unzip is missing on minimal Linux
apt update && apt install -y unzip
# macOS via Homebrew
brew install bun
# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
Verify:
bun --version
git clone https://github.com/NanmiCoder/claude-code-haha.git
cd claude-code-haha
bun install
cp .env.example .env
Edit .env:
# Authentication — pick ONE
ANTHROPIC_API_KEY= # sent as x-api-key header
ANTHROPIC_AUTH_TOKEN= # sent as Authorization: Bearer header
# Custom endpoint (omit for official Anthropic)
ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic
# Model names — map all tiers to your provider's model
ANTHROPIC_MODEL=MiniMax-M2.7-highspeed
ANTHROPIC_DEFAULT_SONNET_MODEL=MiniMax-M2.7-highspeed
ANTHROPIC_DEFAULT_HAIKU_MODEL=MiniMax-M2.7-highspeed
ANTHROPIC_DEFAULT_OPUS_MODEL=MiniMax-M2.7-highspeed
# Timeout in ms (default 600000 = 10 min)
API_TIMEOUT_MS=3000000
# Disable telemetry and non-essential network requests
DISABLE_TELEMETRY=1
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
# Full interactive TUI
./bin/claude-haha
# Headless single-shot (print mode)
./bin/claude-haha -p "explain this codebase"
# Pipe input into headless mode
echo "what does main.tsx do?" | ./bin/claude-haha -p
# Force fallback Recovery CLI (plain readline)
CLAUDE_CODE_FORCE_RECOVERY_CLI=1 ./bin/claude-haha
# Help / all options
./bin/claude-haha --help
| Variable | Required | Purpose |
|---|---|---|
| ANTHROPIC_API_KEY | One of two | Sent as x-api-key |
| ANTHROPIC_AUTH_TOKEN | One of two | Sent as Authorization: Bearer |
| ANTHROPIC_BASE_URL | No | Override API endpoint |
| ANTHROPIC_MODEL | No | Primary model name |
| ANTHROPIC_DEFAULT_SONNET_MODEL | No | Sonnet-tier model |
| ANTHROPIC_DEFAULT_HAIKU_MODEL | No | Haiku-tier model |
| ANTHROPIC_DEFAULT_OPUS_MODEL | No | Opus-tier model |
| API_TIMEOUT_MS | No | Request timeout (ms) |
| DISABLE_TELEMETRY | No | Set 1 to disable |
| CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | No | Set 1 to suppress extras |
| CLAUDE_CODE_FORCE_RECOVERY_CLI | No | Set 1 for plain CLI fallback |
ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY
ANTHROPIC_MODEL=claude-sonnet-4-5
ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-5
ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5
ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-5
ANTHROPIC_AUTH_TOKEN=$MINIMAX_API_KEY
ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic
ANTHROPIC_MODEL=MiniMax-M2.7-highspeed
ANTHROPIC_DEFAULT_SONNET_MODEL=MiniMax-M2.7-highspeed
ANTHROPIC_DEFAULT_HAIKU_MODEL=MiniMax-M2.7-highspeed
ANTHROPIC_DEFAULT_OPUS_MODEL=MiniMax-M2.7-highspeed
ANTHROPIC_AUTH_TOKEN=$OPENROUTER_API_KEY
ANTHROPIC_BASE_URL=https://openrouter.ai/api/v1
ANTHROPIC_MODEL=anthropic/claude-sonnet-4-5
ANTHROPIC_DEFAULT_SONNET_MODEL=anthropic/claude-sonnet-4-5
ANTHROPIC_DEFAULT_HAIKU_MODEL=anthropic/claude-haiku-4-5
ANTHROPIC_DEFAULT_OPUS_MODEL=anthropic/claude-opus-4-5
bin/claude-haha # Entry script
preload.ts # Bun preload — sets MACRO globals
.env.example # Env var template
src/
├── entrypoints/cli.tsx # CLI main entry
├── main.tsx # TUI logic (Commander.js + React/Ink)
├── localRecoveryCli.ts # Fallback Recovery CLI
├── setup.ts # Startup initialization
├── screens/REPL.tsx # Interactive REPL screen
├── ink/ # Ink terminal render engine
├── components/ # UI components
├── tools/ # Agent tools (Bash, Edit, Grep…)
├── commands/ # Slash commands (/commit, /review…)
├── skills/ # Skill system
├── services/ # Services (API, MCP, OAuth…)
├── hooks/ # React hooks
└── utils/ # Utilities
#!/bin/bash
export ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY"
export ANTHROPIC_MODEL="claude-sonnet-4-5"
export DISABLE_TELEMETRY=1
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
git diff HEAD~1 | ./bin/claude-haha -p "Review this diff for bugs and security issues"
cat src/main.tsx | ./bin/claude-haha -p "Summarize what this file does"
API_TIMEOUT_MS=600000 ./bin/claude-haha -p "Explain the architecture of this project"
CLAUDE_CODE_FORCE_RECOVERY_CLI=1 ./bin/claude-haha
The original leak routed no-argument launches to recovery CLI. This repo fixes it, but if you see a blank screen:
# Check Bun version (needs recent)
bun --version
# Try recovery mode to confirm the API connection works
CLAUDE_CODE_FORCE_RECOVERY_CLI=1 ./bin/claude-haha
Caused by missing modifiers-napi native package. The repo patches this with a try-catch in the handleEnter path. If you still hit it:
bun install # re-run in case native bindings failed
Missing stub files (verify skill .md, ultraplan/prompt.txt, filePersistence/types.ts). These are included in this repo. If missing after a fresh clone:
git status # check for untracked/missing files
git checkout . # restore any accidentally deleted stubs
--print mode hangsUsually means filePersistence/types.ts or ultraplan/prompt.txt stub is absent. Verify:
ls src/filePersistence/types.ts
ls src/ultraplan/prompt.txt
If missing, create empty stubs:
touch src/filePersistence/types.ts
touch src/ultraplan/prompt.txt
ANTHROPIC_API_KEY → sent as x-api-key header (standard Anthropic format)ANTHROPIC_AUTH_TOKEN → sent as Authorization: Bearer <token> (some compatible APIs require this)All four model env vars must be set to names your provider recognizes:
ANTHROPIC_MODEL=your-provider-model-name
ANTHROPIC_DEFAULT_SONNET_MODEL=your-provider-model-name
ANTHROPIC_DEFAULT_HAIKU_MODEL=your-provider-model-name
ANTHROPIC_DEFAULT_OPUS_MODEL=your-provider-model-name
DISABLE_TELEMETRY=1
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
| Symptom | Root Cause | Fix Applied |
|---|---|---|
| TUI never starts | Entry script routed no-args to recovery CLI | Restored cli.tsx full entry path |
| Startup hangs forever | verify skill imports missing .md files; Bun text loader hangs | Created stub .md files |
| --print hangs | filePersistence/types.ts missing | Created type stub |
| --print hangs | ultraplan/prompt.txt missing | Created resource stub |
| Enter key does nothing | modifiers-napi native pkg absent; isModifierPressed() throws, breaking handleEnter | Added try-catch around modifier check |
| Setup skipped entirely | preload.ts auto-set LOCAL_RECOVERY=1 bypassing all init | Removed that default |
| Layer | Technology | |---|---| | Runtime | Bun | | Language | TypeScript | | Terminal UI | React + Ink | | CLI parsing | Commander.js | | API client | Anthropic SDK | | Protocols | MCP, LSP |
This project is based on Claude Code source code that leaked from Anthropic's npm registry. All original source code copyright belongs to Anthropic. For educational and research use only.
development
```markdown --- name: compose-performance-skills description: Install and use the skydoves/compose-performance-skills agent skill library to diagnose and fix Jetpack Compose performance issues including stability, recomposition, lazy layouts, modifiers, side effects, and build configuration. triggers: - "my composable recomposes too often" - "LazyColumn drops frames during scroll" - "diagnose Compose stability issues" - "fix unnecessary recomposition in Jetpack Compose" - "optimize Com
development
Headless iOS Simulator manager with host-side HID input injection, 60fps streaming, and device farm web UI for iOS 26
development
```markdown --- name: claude-code-game-studios description: Turn Claude Code into a full 49-agent game dev studio with 72 workflow skills, automated hooks, and a real studio hierarchy for Godot, Unity, and Unreal projects. triggers: - "set up claude code game studios" - "use ai agents for game development" - "set up game dev studio with claude" - "add game studio agents to my project" - "how do I use claude code for game dev" - "set up godot unity unreal ai workflow" - "49 agents g
development
```markdown --- name: xq-py-quantum-vm description: Python implementation of the Quip Network's quantum virtual machine (xqvm) triggers: - quantum virtual machine python - xqvm quip network - quantum circuit simulation python - xq-py quantum vm - quip network quantum python - simulate quantum gates python - quantum vm xqvm - xqvm-py quantum circuit --- # xq-py Quantum Virtual Machine > Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. `xqvm-py` is a Python impl