CRAB (Clean Rebuild of Anything's Behavior): rebuild software from behavior, not source code. An MCP-powered toolkit for black-box observation, clean-room reimplementation, and behavioral verification.
# Add to your Claude Code skills
git clone https://github.com/lemonadesaltbagel/crabcrab is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by lemonadesaltbagel. CRAB (Clean Rebuild of Anything's Behavior): rebuild software from behavior, not source code. An MCP-powered toolkit for black-box observation, clean-room reimplementation, and behavioral verification. It has 527 GitHub stars.
crab's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/lemonadesaltbagel/crab" and add it to your Claude Code skills directory (see the Installation section above).
crab is primarily written in Python. It is open-source under lemonadesaltbagel on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh crab against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Clean-room reimplementation by black-box observation.
See a feature you like. Rebuild it from how it behaves, never from its code.
Quick start · How CRAB works · What you can analyze · Results · FAQ · Documentation
uv tool install "crab-cleanroom[web]" && crab demo
[!NOTE] CRAB was called Teardown until 0.3. The
teardowncommand,TEARDOWN_*variables and an existing~/.teardownkeep working for this release; the package is nowcrab-cleanroom.
[!IMPORTANT] CRAB is early software (0.4). You declare the purpose of every analysis at intake and own its legal assessment. Read Responsible use first.
See a feature in an app that you want in your own product? CRAB lets you rebuild it without ever looking at its implementation. One agent, the observer, studies the app as a black box. It records what the app accepts, refuses and defaults to, what it does at the edges, and how its screens are sequenced. CRAB turns that into falsifiable rules and claims and releases them as a sanitized spec. A second agent, the clean implementer, sees only that spec and writes its own implementation. It can check its work against the original, but it only ever gets back abstract pass/fail verdicts.
The valuable knowledge about a feature is behavioral. Tracing the implementation through binaries, minified bundles or obfuscated code is slow, brittle, and copies expression you don't want. CRAB never captures code, decompilation or stack traces. What it cannot observe becomes an explicit unknown, not a silent gap.
Both sides can run enforced, not just instructed. The observer works in a container whose only way to the target is CRAB's drivers. The implementer works in a container that sees only the spec. Every crossing goes through the gate and is recorded in a signed, hash-chained audit log.
uv tool install "crab-cleanroom[web]" # Python 3.12+; the command is `crab`
crab install-browser # Chromium for web targets
crab demo # observe -> gate -> clean -> verdict on a built-in example
pip install "crab-cleanroom[web]" works too, and
uv tool install "crab-cleanroom[web] @ git+https://github.com/lemonadesaltbagel/crab" installs the
latest unreleased version. Docker is needed for CLI targets (each run is isolated in a container)
and for the enforced rooms; an installed copy builds the room images from files it carries. Android needs the SDK
and an emulator or device reachable through adb.
To work on CRAB itself, use a checkout: git clone https://github.com/lemonadesaltbagel/crab.git, then
uv sync and uv run crab ....
Register the observe server with your agent (Claude Code shown; any MCP client works):
claude mcp add crab-observe -- crab observe --project /path/to/project
From a checkout, use uv run --directory /path/to/crab crab observe ... instead.
Then ask:
Open web:http://localhost:3000/ as a research target and follow the observe_target playbook:
discover the UI, probe every field, inject API faults, state rules, close the coverage gaps
and release the spec.
The playbook (docs/observer-playbook.md) is served as the observe_target MCP
prompt; the observer guide (docs/observer-guide.md) details every tool.
crab review --project P --feature F # gate findings by class, coverage gaps
crab approve --project P --feature F --by [email protected] --class expected-output --reason test-oracle
crab release --project P --feature F
crab export-clean --project P --out KIT # the kit: released spec + build/verify scaffolding
In strict mode every release needs your approval at a terminal, and the observer's tools cannot approve anything. In practice that is a few class-level decisions per release: approve the app text the clone must reproduce, approve the action names, acknowledge the coverage gaps the observer explained (docs/strict-gate.md).
crab cleanroom up --project P --kit KIT --claude-token-file ~/.config/crab-claude-token
crab cleanroom check --project P # isolation probes, run from inside the container
crab cleanroom shell --project P -- claude # the implementer sees only /kit; `verify` asks the gate
crab cleanroom down --project P
crab observerroom confines the observer the same way
(docs/clean-runtime.md).
web.aria/v10)
and records everything a user-facing Playwright test can tell apart.| Target | What CRAB observes | Faults it can inject | Requirements | Status |
|---|---|---|---|---|
| Command-line tools | Exit code, stdout, diagnostic presence and errno class, file effects | Closed/full stdio, unreadable files, read-only directories | Docker (isolated runner) or local | Stable |
| Web apps | Everything a user-facing Playwright locator or assertion can tell apart (the accessibility tree with roles, names, levels, states and nesting; field values and properties; titles, focus, status messages, landmarks text), plus API method/path/status and public-contract selectors | 5xx, network failure, timeout, malformed body, pending requests, changed responses (server modes); API setup calls to reach deep screens | Playwright Chromium; optional backend reset command | Working: 96.9–99.2% of hidden tests on the last three held-out apps (see Results) |
| Android apps | Controls by role and name with state flags, visible text, system dialogs | Network off (airplane mode) | Android SDK, emulator or device via adb |
Working |
| Linux desktop apps | AT-SPI tree: windows, controls, text, list items | — | Docker (Xvfb + AT-SPI container) | Experimental |
| macOS, Windows, iOS | — | — | — | Not started |
CRAB refuses to bypass protections and never captures implementation-tier data (see Responsible use).
Each result was scored on a hidden test suite the observer never saw, against the original's own score under the same harness. How the evaluation works, and every result with its caveat, is in docs/evaluation.md.
| target | hidden suite |
|---|---|
| A command-line tool no model has seen | 397/397 from the spec alone |
| Web apps no model has seen (the last three held-out apps) | 129/130, 126/130, 125/127 |
| Android apps no model has seen | 113/118 and 100/119 (the second built without any verification feedback) |
| RealWorld "Conduit" web frontend (tooling tuned against it) | 99/101 |
| Flipt v1.61.0, a real open-source web app, on its own suite | 19/55 in the fourth round (from 9 in the first): an application many times larger; 21 of its tests need a server mode the observer could not find, and the other misses are sections the coverage report listed as unexplored (see the evaluation notes) |