Skip to content

sceran/claw-code-with-skills

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claw Code with Skills

A personal fork of instructkr/claw-code — enhanced with curated skill collections for scientific computing, productivity, and more.

Claw

Claude Code's agent harness, reverse-engineered and supercharged with 170+ skills


What is this?

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.

Three projects, one workspace

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.


Repository Layout

.
├── 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

How the Harness Works

This is not just a collection of files — it's a working agent runtime. Here's the execution flow:

  1. User launches the REPL with the claw command
  2. System prompt is assembled from environment, config, CLAW.md project files, and tool definitions
  3. User enters a prompt at the interactive terminal
  4. Runtime sends the request to Claude via Anthropic API with full conversation history + available tools
  5. Claude invokes tools — bash execution, file read/write/edit, grep/glob search, web fetch, sub-agent spawning
  6. Tool results feed back into the conversation for continued reasoning
  7. Loop continues until Claude completes the task
  8. Response is rendered with syntax highlighting and markdown formatting
  9. Session is persisted to disk for later resumption
  10. Token usage and costs are tracked and displayed

Key architectural components

  • 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 commands
    • accept-edits — can also write/edit files in the workspace
    • danger-full-access — unrestricted tool execution
    • skip — 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).


Getting Started

Build the Rust CLI

cd rust
cargo build --release

Initialize and update skill submodules

git submodule update --init --recursive    # first time setup
git submodule update --remote              # pull latest updates from upstream

Run the Python workspace

python3 -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 tests

Inspect command and tool inventories

python3 -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)

Skills Catalog

Scientific Skills — 140+ domains

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

Community Skills — 30+ tools

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

What You Can Learn from This Repo

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, /compact etc. 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/)

Feature parity status

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.


Why Combine These Three Repos?

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.

The problem with separate repos

  • 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-creator template AND examples from scientific-skills. That's three repos open at once.
  • Keeping everything up to date means remembering to git pull in three different directories.

What this setup gives you

  • One git clone and 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.md file is a working template.
  • Single sync command — one alias updates all three upstream sources (see below)

How to actually use the skills

The skills in skills/scientific/ and skills/community/ are essentially prompt templates and tool configurations designed for Claude Code's skill system. You can:

  1. Browse for inspiration — Each skill folder contains a SKILL.md that defines what the skill does, what tools it needs, and how it should behave. Read these to understand patterns for extending Claude Code.

  2. 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.

  3. Study the patterns — Compare how a simple skill (like file-organizer) vs. a complex one (like scanpy or clinical-decision-support) structures its instructions, tool requirements, and constraints.

  4. 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.

  5. Write your own skills — Use skills/community/skill-creator/ as a starting point, reference existing skills for structure, and test against the harness.


Keeping Everything in Sync

All three upstream repos are actively maintained. This repo pulls updates from:

One-command sync

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 only

sync-claw will:

  1. Fetch and merge the latest harness code from instructkr/claw-code
  2. Pull the latest skill definitions from both submodule upstreams
  3. Commit the updated submodule pointers
  4. Push everything to your fork

sync-skills will:

  1. Pull the latest skill definitions from both submodule upstreams
  2. 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.


Credits

Original Claw Code

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:

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"

Skill Collections


Disclaimer

  • 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.

About

Cleanroom Claude Code harness (Rust/Python) supercharged with 170+ scientific & community skills

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 92.8%
  • Python 7.2%