Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reverse-engineer an authorized repo, binary
.claude/skills/boshu2-reverse-engineer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 132% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 103% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 215% | 0% |
Reverse-engineer an external system into two things: a mechanically-verifiable teardown (feature inventory + registry + specs, optionally a security audit) and a steal-map — what to adopt into our surfaces, what to leave behind. The teardown is the evidence; the steal-map is the decision. Separating them works because a decision row that must cite a registry entry can be re-checked by anyone, while a decision made from impressions cannot be re-checked by its own author. The original failure mode this skill exists to prevent: reading a competitor's README and "deciding" from vibes.
Triggers: "reverse-engineer X", "tear down Y", "what should we steal from Z", "evaluate competitor/upstream", "should we fork/adopt/build-native".
Produce evidence, not vibes. The script clones (pinned), scans CLI/config/artifact surface, and writes a feature inventory + machine-checkable registry + spec set.
bashpython3 skills/reverse-engineer/scripts/reverse_engineer.py <product> --mode=repo \ --upstream-repo="https://github.com/org/repo.git" --upstream-ref=v1.0.0 \ --output-dir=".agents/scratch/reverse-engineer/<product>/"
Binary mode requires --authorized (see Invocation Contract + Self-Test). Use the bundled demo fixture if you lack authorization for a real binary.
Map each capability the teardown found onto our surfaces. This is the part that turns research into a decision. Emit .agents/scratch/reverse-engineer/<product>/steal-map.md with a table; every row cites the teardown evidence and the matching surface in our repo.
The mechanical script intentionally stops after validating Phase 1. It cannot truthfully decide whether our live tree has, lacks, or should adopt a capability. The caller authors steal-map.md from the generated registry plus a fresh read of our repository, then runs the complete-output validator below. A missing or malformed map is therefore an incomplete skill result, not a script success silently relabelled as a decision.
| Their capability | Our surface today | Verdict | |---|---|---| | <feature> | <our file / skill / CLI, or "none"> | have / gap / steal / park / reject |
Verdict rules (hard-won — apply them, do not skip):
Discipline that makes the map trustworthy:
each capability from code, cross-checked by a fresh reader — never from a README or one context's summary. Model family is optional metadata, not a trust requirement.
If adopting a steal is a one-way door (an architecture fork, a new bounded context, or a migration), do not decide it here. Hand the steal-map to Plan. Dueling Idea Genies or Premortem may challenge the choice as advisory evidence. Plan alone shapes the selected option in the existing intent source; neither strategy grants readiness or continuation authority.
Required: product_name. Common flags: --mode=repo|binary|both, --upstream-repo, --upstream-ref (requires the selected checkout to be at that exact commit and records its resolved SHA in clone-metadata.json), --local-clone-dir (selects that exact tree, including a non-Git tree; it never falls back to the caller's checkout), --output-dir (default .agents/scratch/reverse-engineer/<product>/), --security-audit, --materialize-archives (authorized-only opt-in; embedded-archive extraction is off/index-only by default), --authorized (mandatory for binary mode — refuses without it). Full list: python3 skills/reverse-engineer/scripts/reverse_engineer.py --help.
Phase-1 teardown under output_dir/: feature-inventory.md, feature-registry.yaml, feature-catalog.md, spec-architecture.md, spec-code-map.md, spec-clone-vs-use.md, spec-clone-mvp.md, plus spec-cli-surface.md only when a CLI is detected. clone-metadata.json is written whenever an upstream repo/ref is selected and binds the exact analyzed commit, including an already-present checkout. Security mode adds output_dir/security/: threat-model.md, attack-surface.md, dataflow.md, crypto-review.md, authn-authz.md, findings.md, reproducibility.md, validate-security-audit.sh. Phase-2 adds the caller-authored steal-map.md.
--output-dir, defaulting to$REPO/.agents/scratch/reverse-engineer/<product>/.
files live only in the security/ child directory.
object, and inventories/specs/steal-map are nonempty Markdown files.
--phase teardown. After authoring steal-map.md, validate the complete skill output with $output_dir, $security_audit, $sbom, and $upstream_ref_set (each numeric flag 0|1):
bash bash skills/reverse-engineer/scripts/validate-output.sh \ --output-dir "$output_dir" --phase complete \ --security-audit "$security_audit" --sbom "$sbom" \ --upstream-ref-set "$upstream_ref_set"
steal-map.md to Plan forone-way-door candidates; ordinary have, park, and reject decisions remain evidence-backed terminal rows.
Existing teardowns under .agents/research/<product>/ remain in place and usable. The script accepts that directory when it is passed explicitly with --output-dir; that flag is caller authorization to write the teardown at the exact selected path. It does not relocate or duplicate existing artifacts. An invocation that omits the flag writes only to the current scratch default and never creates output under the earlier root. Consumers must retain the exact selected output_dir with their evidence references instead of rediscovering outputs by globbing one root. This owning skill contract is the compatibility authority; no separate migration receipt is required.
--upstream-ref binds the selected checkout to one full commit: a new clone is checked out detached at the fetched ref, while an existing checkout must already match or the run refuses before analysis. clone-metadata.json records that resolved commit. Regression test: bash skills/reverse-engineer/scripts/repo_fixture_test.sh. To update a fixture when contracts legitimately change, re-run with the new pinned ref, copy the contract files into fixtures/<product>/, and commit.
bashbash skills/reverse-engineer/scripts/self_test.sh
Must show: feature inventory and registry generated; the exact Phase-1 validator passes; the complete validator rejects a missing and malformed steal-map and accepts a valid caller-authored fixture; existing-checkout ref mismatch and output symlinks fail closed; in security mode validate-security-audit.sh exits 0 only after the scaffold is completed and the secret scan passes.
Run Phase 1 for cc-sdd with --mode=repo --upstream-repo="https://github.com/gotalab/cc-sdd.git" --upstream-ref=v1.0.0. It clones the pinned source, scans the surface, writes inventory/registry/specs, and validates the teardown. Then inspect our live surfaces, author each have/gap/steal/park/reject row in steal-map.md, and run the complete-output validator. Supply selected steals to Plan.
Run the skill for ao with --authorized --mode=binary --binary-path="$(command -v ao)" --security-audit. It performs authorized static analysis plus the security suite under output_dir/security/; the secret-scan check must pass.
| Problem | Cause | Solution | |---|---|---| | Refuses binary analysis | Missing --authorized | Add --authorized (explicit written authorization required). | | No clone-metadata.json | --upstream-repo not passed | Pass --upstream-repo (and optionally --upstream-ref). | | Fixture diff fails | Upstream changed / stale golden | Re-run pinned, refresh fixtures/, commit. | | Existing teardown is under .agents/research/ | It used the earlier default | Pass that exact directory with --output-dir; new runs otherwise use the scratch default. | | spec-cli-surface.md missing | No Node/Python/Go CLI detected | Surface is documented in spec-code-map.md instead. | | Steal-map is all "steal" | Skipped the park/reject rules | Substrate we delegate is park; doctrine conflicts are reject — not everything novel is worth adopting. |
have/gap/steal/park/reject — not everything marked "steal".| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 37,564 | 16,819 | -55% | 1 | 1 | 0% | 6,243 | 3,227 | -48% | 0 | 0 | — |
case-02 | fail→pass | 18,742 | 20,542 | +10% | 1 | 1 | 0% | 2,381 | 5,528 | +132% | 0 | 0 | — |
case-03 | fail→fail | 36,569 | 36,233 | -1% | 1 | 1 | 0% | 6,221 | 9,082 | +46% | 0 | 0 | — |
case-04 | pass→pass | 14,802 | 15,165 | +2% | 1 | 1 | 0% | 2,382 | 4,972 | +109% | 0 | 0 | — |
case-05 | fail→fail | 5,635 | 6,091 | +8% | 1 | 1 | 0% | 503 | 3,363 | +569% | 0 | 0 | — |
case-06 | pass→pass | 19,182 | 19,344 | +1% | 1 | 1 | 0% | 2,649 | 5,616 | +112% | 0 | 0 | — |
case-19 | fail→pass | 12,838 | 2,383 | -81% | 1 | 1 | 0% | 1,763 | 3,188 | +81% | 0 | 0 | — |
case-07 | fail→pass | 45,610 | 2,029 | -96% | 1 | 1 | 0% | 2,881 | 3,125 | +8% | 0 | 0 | — |
case-08 | fail→pass | 10,873 | 3,817 | -65% | 1 | 1 | 0% | 1,729 | 3,510 | +103% | 0 | 0 | — |
case-09 | fail→pass | 7,209 | 2,729 | -62% | 1 | 1 | 0% | 1,046 | 3,300 | +215% | 0 | 0 | — |
case-10 | fail→pass | 9,914 | 2,745 | -72% | 1 | 1 | 0% | 1,611 | 3,313 | +106% | 0 | 0 | — |
case-11 | fail→pass | 31,466 | 4,117 | -87% | 1 | 1 | 0% | 1,869 | 3,547 | +90% | 0 | 0 | — |
case-12 | fail→pass | 6,830 | 2,849 | -58% | 1 | 1 | 0% | 941 | 3,334 | +254% | 0 | 0 | — |
case-13 | fail→pass | 5,631 | 2,128 | -62% | 1 | 1 | 0% | 945 | 3,197 | +238% | 0 | 0 | — |
case-14 | pass→pass | 9,579 | 5,867 | -39% | 1 | 1 | 0% | 1,538 | 3,178 | +107% | 0 | 0 | — |
case-15 | fail→pass | 21,906 | 1,919 | -91% | 1 | 1 | 0% | 3,591 | 3,076 | -14% | 0 | 0 | — |
case-16 | pass→pass | 12,573 | 7,243 | -42% | 1 | 1 | 0% | 1,911 | 4,082 | +114% | 0 | 0 | — |
case-17 | pass→pass | 13,925 | 5,155 | -63% | 1 | 1 | 0% | 2,117 | 3,653 | +73% | 0 | 0 | — |
case-18 | pass→pass | 14,533 | 4,630 | -68% | 1 | 1 | 0% | 2,122 | 3,528 | +66% | 0 | 0 | — |
case-20 | pass→pass | 4,690 | 2,379 | -49% | 1 | 1 | 0% | 630 | 3,243 | +415% | 0 | 0 | — |
case-21 | fail→pass | 7,816 | 1,601 | -80% | 1 | 1 | 0% | 1,136 | 3,044 | +168% | 0 | 0 | — |
case-22 | fail→pass | 7,986 | 4,446 | -44% | 1 | 1 | 0% | 1,118 | 3,597 | +222% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +55 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.