Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reverse-engineer an authorized repo, binary
.claude/skills/hashgraph-online-reverse-engineer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 99% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 74% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 179% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 96% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 30% | 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.
| 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 (pins the clone to a specific commit/tag/branch; the resolved SHA is recorded in clone-metadata.json on any clone), --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 and clone-metadata.json only when the script performs a clone (i.e., --upstream-repo is supplied and the target is not already checked out); --upstream-ref pins which commit, it is not what triggers the file. 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: 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.
$output_dir, $security_audit, $sbom, and$upstream_ref_set (each flag 0|1) set:
bash set -euo pipefail required=(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 analysis-root-path.txt validate-feature-registry.py steal-map.md) for name in "${required[@]}"; do test -f "$output_dir/$name" test ! -L "$output_dir/$name" test -s "$output_dir/$name" done test -f "$output_dir/docs-features.txt" test ! -L "$output_dir/docs-features.txt" test ! -L "$output_dir/spec-cli-surface.md" if [[ -e "$output_dir/spec-cli-surface.md" ]]; then test -f "$output_dir/spec-cli-surface.md" test -s "$output_dir/spec-cli-surface.md" fi python3 "$output_dir/validate-feature-registry.py" if [[ "$upstream_ref_set" == 1 ]]; then test -f "$output_dir/clone-metadata.json" test ! -L "$output_dir/clone-metadata.json" jq -e 'type == "object"' "$output_dir/clone-metadata.json" >/dev/null else [[ "$upstream_ref_set" == 0 ]] fi grep -Fqx '| Their capability | Our surface today | Verdict |' "$output_dir/steal-map.md" if [[ "$security_audit" == 1 ]]; then test -x "$output_dir/security/validate-security-audit.sh" if [[ "$sbom" == 1 ]]; then "$output_dir/security/validate-security-audit.sh" "$output_dir" --sbom else [[ "$sbom" == 0 ]] "$output_dir/security/validate-security-audit.sh" "$output_dir" --no-sbom fi else [[ "$security_audit" == 0 ]] [[ "$sbom" == 0 ]] fi
steal-map.md to Plan forone-way-door candidates; ordinary have, park, and reject decisions remain evidence-backed terminal rows.
--upstream-ref pins the clone (fetch FETCH_HEAD, record SHA) so contracts can be committed as golden fixtures and diffed across runs. 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 generated, registry generated, registry validator exits 0; in security mode validate-security-audit.sh exits 0 and the secret scan passes.
Run the skill 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 maps each feature onto our surfaces (have, gap, steal, park, or reject) in steal-map.md. 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. | | 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 | 48,309 | 63,261 | +31% | 1 | 1 | 0% | 8,207 | 3,562 | -57% | 0 | 0 | — |
case-02 | fail→fail | 35,119 | 17,445 | -50% | 1 | 1 | 0% | 5,274 | 4,160 | -21% | 0 | 0 | — |
case-03 | fail→fail | 61,065 | 16,274 | -73% | 1 | 1 | 0% | 8,297 | 3,353 | -60% | 0 | 0 | — |
case-04 | fail→pass | 13,250 | 9,150 | -31% | 1 | 1 | 0% | 1,809 | 3,604 | +99% | 0 | 0 | — |
case-05 | fail→pass | 19,420 | 15,410 | -21% | 1 | 1 | 0% | 2,537 | 4,411 | +74% | 0 | 0 | — |
case-06 | fail→pass | 15,038 | 8,911 | -41% | 1 | 1 | 0% | 1,295 | 3,612 | +179% | 0 | 0 | — |
case-07 | fail→pass | 17,615 | 5,398 | -69% | 1 | 1 | 0% | 1,850 | 3,634 | +96% | 0 | 0 | — |
case-08 | pass→pass | 18,904 | 10,683 | -43% | 1 | 1 | 0% | 2,464 | 3,953 | +60% | 0 | 0 | — |
case-09 | pass→pass | 18,172 | 13,550 | -25% | 1 | 1 | 0% | 1,761 | 4,062 | +131% | 0 | 0 | — |
case-10 | fail→pass | 16,177 | 4,191 | -74% | 1 | 1 | 0% | 2,691 | 3,490 | +30% | 0 | 0 | — |
case-11 | pass→pass | 9,875 | 10,121 | +2% | 1 | 1 | 0% | 1,559 | 3,345 | +115% | 0 | 0 | — |
case-12 | pass→pass | 19,745 | 16,770 | -15% | 1 | 1 | 0% | 2,249 | 4,599 | +104% | 0 | 0 | — |
case-13 | fail→pass | 14,397 | 3,573 | -75% | 1 | 1 | 0% | 1,527 | 3,544 | +132% | 0 | 0 | — |
case-14 | fail→pass | 16,773 | 2,444 | -85% | 1 | 1 | 0% | 1,539 | 3,297 | +114% | 0 | 0 | — |
case-15 | fail→fail | 20,646 | 2,365 | -89% | 1 | 1 | 0% | 2,282 | 3,307 | +45% | 0 | 0 | — |
case-16 | pass→pass | 21,910 | 11,846 | -46% | 1 | 1 | 0% | 2,279 | 4,142 | +82% | 0 | 0 | — |
case-17 | fail→fail | 15,571 | 9,173 | -41% | 1 | 1 | 0% | 1,239 | 3,457 | +179% | 0 | 0 | — |
case-18 | fail→pass | 39,366 | 9,928 | -75% | 1 | 1 | 0% | 5,712 | 3,238 | -43% | 0 | 0 | — |
case-19 | fail→fail | 18,925 | 3,192 | -83% | 1 | 1 | 0% | 1,155 | 3,256 | +182% | 0 | 0 | — |
case-20 | pass→pass | 29,606 | 35,656 | +20% | 1 | 1 | 0% | 4,145 | 7,460 | +80% | 0 | 0 | — |
case-21 | fail→fail | 14,475 | 19,133 | +32% | 1 | 1 | 0% | 1,755 | 3,145 | +79% | 0 | 0 | — |
case-22 | pass→pass | 17,677 | 23,016 | +30% | 1 | 1 | 0% | 2,562 | 6,091 | +138% | 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 18 counted toward the lift figure. The other 4 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 +36 percentage points is the difference between those two pass rates over the 18 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
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.