A personal fork of instructkr/claw-code — enhanced with curated skill collections for scientific computing, productivity, and more.
Claude Code's agent harness, reverse-engineered and supercharged with 170+ skills
On March 31, 2026, the Claude Code source was exposed due to an npm security blunder. The community quickly mobilized — @instructkr created a cleanroom rewrite in Rust and Python, capturing the core architecture without copying proprietary code. That project became one of the fastest repos in history to reach 50K stars.
This fork takes it a step further: it bundles two major skill collections as git submodules, creating a single workspace for studying, extending, and experimenting with Claude Code's agent architecture.
| Component | Source | What it brings |
|---|---|---|
| Claw Code | instructkr/claw-code | Cleanroom Rust/Python rewrite of Claude Code's agent harness — system prompts, tool execution, MCP orchestration, permission model, session management, the whole stack |
| Scientific Skills | K-Dense-AI/claude-scientific-skills | 140+ scientific computing skills spanning bioinformatics, chemistry, quantum computing, clinical research, data science, and more |
| Community Skills | ComposioHQ/awesome-claude-skills | 30+ community-built skills for productivity, development, content creation, and automation |
The skill repos live under skills/ as git submodules — easy to update, easy to swap, no bloat.
.
├── rust/ # Rust agent harness (main implementation)
│ ├── crates/api/ # API client, OAuth, SSE streaming
│ ├── crates/runtime/ # Agent loop, session, MCP, prompt construction
│ ├── crates/tools/ # Built-in tools (bash, file ops, search, web)
│ ├── crates/claw-cli/ # Interactive REPL binary
│ ├── crates/commands/ # Slash commands & skills discovery
│ ├── crates/plugins/ # Plugin system & hook pipeline
│ ├── crates/server/ # HTTP/SSE server (axum)
│ └── crates/lsp/ # LSP integration
├── src/ # Python port (secondary implementation)
│ ├── main.py # CLI entrypoint
│ ├── runtime.py # Runtime session orchestration
│ ├── commands.py # Command registry
│ ├── tools.py # Tool manifest loading
│ ├── query_engine.py # Query routing engine
│ └── models.py # Data models
├── skills/
│ ├── scientific/ # ← submodule: claude-scientific-skills
│ │ └── scientific-skills/ # 140+ scientific domain skills
│ └── community/ # ← submodule: awesome-claude-skills
│ ├── mcp-builder/ # MCP server builder
│ ├── skill-creator/ # Skill authoring template
│ ├── webapp-testing/ # Web app testing
│ └── ... # 30+ community skills
├── tests/ # Python verification suite
└── assets/ # Documentation images
This is not just a collection of files — it's a working agent runtime. Here's the execution flow:
- User launches the REPL with the
clawcommand - System prompt is assembled from environment, config, CLAW.md project files, and tool definitions
- User enters a prompt at the interactive terminal
- Runtime sends the request to Claude via Anthropic API with full conversation history + available tools
- Claude invokes tools — bash execution, file read/write/edit, grep/glob search, web fetch, sub-agent spawning
- Tool results feed back into the conversation for continued reasoning
- Loop continues until Claude completes the task
- Response is rendered with syntax highlighting and markdown formatting
- Session is persisted to disk for later resumption
- Token usage and costs are tracked and displayed
-
System Prompt Builder (
rust/crates/runtime/src/prompt.rs) — Constructs the full system prompt including intro, rules, tool descriptions, environment context, project instructions (CLAW.md files), and runtime config. This is where you can see exactly what Claude "sees" when it starts a conversation. -
Tool Framework (
rust/crates/tools/) — Unified tool interface with permission gates. Each tool (bash, read, write, edit, grep, glob, web fetch, agent spawn) is registered with a manifest and executed through a common pipeline. -
MCP Orchestration (
rust/crates/runtime/) — Model Context Protocol integration for connecting external tool servers, enabling extensible tool ecosystems beyond the built-in set. -
Permission Model — Four modes controlling what the agent can do:
read-only— can only read files and run safe commandsaccept-edits— can also write/edit files in the workspacedanger-full-access— unrestricted tool executionskip— bypass permission prompts entirely
-
Session Persistence — Full conversation history + context saved to disk, enabling resume across sessions.
-
Cost Tracking — Per-message token counting with pricing models for each Claude variant (Opus, Sonnet, Haiku).
cd rust
cargo build --releasegit submodule update --init --recursive # first time setup
git submodule update --remote # pull latest updates from upstreampython3 -m src.main summary # porting summary
python3 -m src.main manifest # workspace manifest
python3 -m src.main subsystems --limit 16 # list Python modules
python3 -m unittest discover -s tests -v # run verification testspython3 -m src.main commands --limit 10
python3 -m src.main tools --limit 10
python3 -m src.main parity-audit # audit against original (when archive present)| Domain | Skills |
|---|---|
| Bioinformatics | scanpy, biopython, scvelo, pydeseq2, esm, cellxgene-census, anndata, scvi-tools, scikit-bio, pysam |
| Chemistry & Drug Discovery | rdkit, deepchem, datamol, medchem, cobrapy, torchdrug, matchms, pyopenms, glycoengineering |
| Molecular & Structural | diffdock, molecular-dynamics, molfeat, dhdna-profiler, esm |
| Physics & Quantum | qiskit, pennylane, qutip, cirq, fluidsim |
| Machine Learning | scikit-learn, pytorch-lightning, transformers, torch-geometric, stable-baselines3, hypogenic |
| Data Science | polars, polars-bio, dask, vaex, statsmodels, shap, umap-learn, networkx |
| Visualization | matplotlib, plotly, seaborn, scientific-visualization, scientific-schematics |
| Research Workflow | paper-lookup, literature-review, hypothesis-generation, scientific-writing, peer-review, citation-management |
| Clinical & Health | clinical-decision-support, clinical-reports, treatment-plans, pyhealth, pydicom, imaging-data-commons |
| Genomics & Sequencing | deeptools, neuropixels-analysis, tiledbvcf, zarr-python, gtars, depmap |
| Lab & Platforms | opentrons-integration, ginkgo-cloud-lab, latchbio-integration, benchling-integration, labarchive-integration |
| Documents & Presentations | pdf, docx, pptx, latex-posters, pptx-posters, scientific-slides, infographics |
| Simulation | simpy, pymc, pymoo, pymatgen, sympy |
| Category | Skills |
|---|---|
| Development | mcp-builder, webapp-testing, changelog-generator, skill-creator, template-skill |
| Content & Research | content-research-writer, lead-research-assistant, developer-growth-analysis, twitter-algorithm-optimizer |
| Productivity | meeting-insights-analyzer, invoice-organizer, file-organizer, raffle-winner-picker |
| Design & Media | canvas-design, brand-guidelines, theme-factory, image-enhancer, slack-gif-creator, video-downloader |
| Business | tailored-resume-generator, domain-name-brainstormer, competitive-ads-extractor, internal-comms |
| Integration | composio-skills, connect, connect-apps, connect-apps-plugin, langsmith-fetch, skill-share |
If you're interested in how Claude Code actually works under the hood, this repo is a goldmine:
- System prompts — See exactly how the agent's personality, rules, and constraints are constructed (
rust/crates/runtime/src/prompt.rs) - Tool architecture — How tools are defined, permissioned, and executed (
rust/crates/tools/) - Agent loop — The core conversation-tool-response cycle that powers agentic behavior (
rust/crates/runtime/) - MCP integration — How external tool servers are discovered and orchestrated
- Session management — How conversations persist across sessions
- Slash commands — How
/help,/status,/compactetc. are registered and dispatched (rust/crates/commands/) - Skill system — How skills extend the agent's capabilities (and how to write your own using
skills/community/skill-creator/)
The Rust implementation covers the core feature set:
- API + SSE streaming, OAuth login/logout
- Interactive REPL with syntax highlighting and markdown rendering
- Full tool system (bash, read, write, edit, grep, glob, web fetch/search, sub-agents)
- MCP server lifecycle management
- Session persistence and resumption
- Extended thinking (Claude thinking blocks)
- Cost tracking and usage display
- Git integration, model aliases, slash commands
- Todo tracking, project memory (CLAW.md)
Still in progress: hook execution pipeline, plugin ecosystem/marketplace, full skills registry pipeline, some specialized tools (LSP, remote triggers, team tools).
See PARITY.md for the detailed gap analysis against the original TypeScript implementation.
Each of these repos is valuable on its own, but separately they're scattered context — you'd be jumping between three browser tabs, three local folders, three git histories. Together, they become something more useful: a single workspace where the harness code and the skills that plug into it live side by side.
- You're reading the tool framework in
rust/crates/tools/and want to see how a real skill is structured — you'd have to switch to a different repo, find the right folder, lose your place. - You want to write a custom skill — you need the harness code for reference AND the
skill-creatortemplate AND examples from scientific-skills. That's three repos open at once. - Keeping everything up to date means remembering to
git pullin three different directories.
- One
git cloneand you have everything — the agent runtime, 140+ scientific skills, 30+ community skills - Cross-reference instantly — read the system prompt builder, then jump to a skill definition, then check how the tool manifest works, all in the same editor window
- Skills as living documentation — the skill collections aren't just a catalog, they're concrete examples of how to extend Claude Code's capabilities. Each
SKILL.mdfile is a working template. - Single sync command — one alias updates all three upstream sources (see below)
The skills in skills/scientific/ and skills/community/ are essentially prompt templates and tool configurations designed for Claude Code's skill system. You can:
-
Browse for inspiration — Each skill folder contains a
SKILL.mdthat defines what the skill does, what tools it needs, and how it should behave. Read these to understand patterns for extending Claude Code. -
Copy into your own projects — If you're building something with Claude Code (or any LLM agent), grab a skill definition and adapt it to your use case.
-
Study the patterns — Compare how a simple skill (like
file-organizer) vs. a complex one (likescanpyorclinical-decision-support) structures its instructions, tool requirements, and constraints. -
Use as reference while modifying the harness — If you're hacking on the Rust/Python code and want to understand what skills expect from the runtime, the skill definitions are your spec.
-
Write your own skills — Use
skills/community/skill-creator/as a starting point, reference existing skills for structure, and test against the harness.
All three upstream repos are actively maintained. This repo pulls updates from:
upstream— instructkr/claw-code (the main harness)skills/scientific— K-Dense-AI/claude-scientific-skillsskills/community— ComposioHQ/awesome-claude-skills
Add these aliases to your ~/.zshrc (or ~/.bashrc):
# Full sync — harness + skills (requires upstream to be accessible)
alias sync-claw='cd "/path/to/claw-code-with-skills" && git fetch upstream && git merge upstream/main && git submodule update --remote && git add skills/ && git commit -m "Sync upstream + submodules" && git push origin main'
# Skills-only sync — always works, even if upstream is down
alias sync-skills='cd "/path/to/claw-code-with-skills" && git submodule update --remote && git add skills/ && git commit -m "Sync submodules" && git push origin main'Then just run:
sync-claw # full sync (harness + skills)
sync-skills # skills onlysync-claw will:
- Fetch and merge the latest harness code from
instructkr/claw-code - Pull the latest skill definitions from both submodule upstreams
- Commit the updated submodule pointers
- Push everything to your fork
sync-skills will:
- Pull the latest skill definitions from both submodule upstreams
- Commit and push — useful when the upstream harness repo is temporarily unavailable
Your own commits (README changes, custom skills, config tweaks) are preserved — this is a merge, not a reset.
The fastest repo in history to surpass 50K stars — reached the milestone in just 2 hours after publication
This project is a cleanroom rewrite by @instructkr (Sigrid Jin), built after the Claude Code source was exposed on March 31, 2026. The entire port was orchestrated using AI-driven code orchestration tools:
- oh-my-codex (OmX) by @bellman_ych — primary scaffolding, orchestration, and core porting workflow
- oh-my-opencode (OMO) by @q_yeon_gyu_kim — Rust implementation acceleration, cleanup passes, and verification
AI startup worker Sigrid Jin single-handedly used 25 billion Claw Code tokens last year. — Wall Street Journal, March 21, 2026, "The Trillion Dollar Race to Automate Our Entire Lives"
- claude-scientific-skills — scientific computing skills for Claude Code by K-Dense-AI
- awesome-claude-skills — community-curated skill catalog by ComposioHQ
- This repository does not claim ownership of the original Claw Code source material.
- This repository is not affiliated with, endorsed by, or maintained by the original authors.
- Skills included as submodules retain their original licenses and ownership.
