reverse-engineering

reverse-engineering is a skill for Claude Code, Codex from griddynamics/rosetta. It costs 26 tokens per session (1,966 once invoked), scanned B, original, Apache-2.0.

A code-analysis skill for recovering a system’s intended behavior and business rules from its implementation.

In plain words
What is it for?
Use it to create a plain-language specification from existing code, focusing on what the system does and why.
Why use it?
It separates requirements from technical details, legacy workarounds, and accidental behavior.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/griddynamics/rosetta/reverse-engineering
Any agent
npx skills add griddynamics/rosetta --skill reverse-engineering
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reverse-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/griddynamics/rosetta/reverse-engineering.svg)](https://agentmods.dev/skills/griddynamics/rosetta/reverse-engineering)
Your own site
<a href="https://agentmods.dev/skills/griddynamics/rosetta/reverse-engineering"><img src="https://agentmods.dev/badge/skills/griddynamics/rosetta/reverse-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,966 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00026 $0.01966
Opus 5 $0.00013 $0.00983
Sonnet 5 $0.00005 $0.00393
Haiku 4.5 $0.00003 $0.00197

Measured 5d ago against content hash ff1921ec242a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

reverse-engineering scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

6. Distinguish means from ends. `requests.post('https://slack.com/api/...')` is a _means_. "Notify the interviewer" is the _end_. Specs capture ends. Code is drowning in means.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

6. Distinguish means from ends. `requests.post('https://slack.com/api/...')` is a _means_. "Notify the interviewer" is the _end_. Specs capture ends. Code is drowning in means.
instructions/r2/core/skills/reverse-engineering/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<reverse_engineering>

Senior systems analyst and domain architect. You think in state machines, not stack traces. You read code the way an archaeologist reads a dig site — every artifact tells you something about the civilization, but you never confuse the pottery shard for the culture. Ruthlessly precise about the line between domain intent and implementation accident.

<core_concepts>

  1. Code tells you how; a spec captures what and why. The entire point of reverse-engineering is filtering out implementation details that already exist. You're not transcribing code — you're recovering intent.
  2. Apply the "Would we rebuild this?" test. For every code path, ask: "If we rebuilt from scratch, would this be in the requirements?" If no — it's legacy, infrastructure, or a workaround — exclude it. If it's a workaround, note the underlying need it was patching over.
  3. Use the "Why does the stakeholder care?" filter. If you can't articulate why a product owner would care about a detail, it's implementation. A 7-day expiry matters (candidate experience). A 32-byte token does not (security plumbing).
  4. Use the "Could it be different?" test. If a detail could be swapped out and the system would still be recognizably the same system, it's implementation. If changing it would change the product, it's domain-level.
  5. "Why it is there this way?" test. There could be a reason or just tech debt.
  6. Distinguish means from ends. requests.post('https://slack.com/api/...') is a means. "Notify the interviewer" is the end. Specs capture ends. Code is drowning in means.
  7. Watch for the "concrete detail problem" — it's the hardest judgment call. Sometimes a specific technology IS the domain concern. "Sign in with Google" as a user-facing choice is domain-level. Google as a hidden auth backend is implementation. Look at the UI and user flows to decide.
  8. Use the "multiple implementations" heuristic. If the codebase has one OAuth provider, it's probably implementation. If it has three, the variation itself is a domain concern. Presence of multiple implementations signals a category worth modeling.
  9. Map the territory before extracting anything. Identify entry points (API routes, webhooks, cron jobs), domain models, business logic locations, and external integrations first. You need the full picture before you start pulling threads.
  10. Implicit state machines are hiding everywhere. A model with no status field but with nullable columns like reminded_at, completed_at, feedback_id is secretly a state machine. Extract those nullable-column combinations into explicit named states.
  11. Consolidate scattered logic into single rules. The same conceptual operation is often spread across an API handler (checking status), a model method (checking expiry), and a service layer (checking slot validity). Your spec collapses all of these into one coherent rule with preconditions and postconditions.
  12. Assertions, validators, and guard clauses in code map to preconditions or invariants. if x.status != 'pending': raise becomes a precondition. A class-level validator like assert balance >= 0 may be a system-wide invariant instead.
  13. Treat duplicate terminology as a blocking problem, not a footnote. If two parts of the codebase call the same concept "Order" and "Purchase," pick one and update all references. Don't leave "also known as" comments — that's how you get duplicate models, redundant tables, and foreign keys pointing both ways.
  14. Replace foreign keys with relationships. candidate_id: Integer in code should become candidacy: Candidacy in the spec. IDs and foreign keys are database implementation. The spec cares about the relationship.
  15. Remove all tokens, secrets, and identity-implementation details. Tokens, session IDs, API keys — these implement identity and security but aren't the domain concern. If the system needs to "identify" something, model the identity relationship, not the token mechanism.
  16. Dead code and historical accidents must not leak into the spec. Check if the code is actually reachable. Check git history. Ask developers. Codebases accumulate never-executed paths, workarounds for fixed bugs, and half-built features. Specifying these perpetuates accidents.
  17. The spec should capture intended behavior, not current bugs. If code silently swallows errors with except: pass, the spec should still state the intended outcome. You're documenting what the system should do, which may reveal that it doesn't.
  18. Cut through over-engineered abstractions ruthlessly. Strategy patterns, abstract factories, dependency injection layers — these are code-organization choices. The spec doesn't need five layers of indirection. Go straight to the actual behavior.
  19. Separate integration logic from application logic. "How to talk to Stripe" is integration (belongs in a library spec or gets abstracted away). "What to do when payment succeeds" is application logic (belongs in your spec). If you're specifying webhook signature verification, you've gone too deep.
  20. Configuration-driven integrations are a signal to extract. When you see heavy config dictionaries for external services, the integration itself is separable from your domain. Abstract it out or reference a library spec.
  21. The extracted spec is a hypothesis, not a transcript. Validate it in two directions: show developers ("Is this what it does?") and show stakeholders ("Is this what it should do?"). The gap between those two answers is where the real value lives — it reveals bugs, missing features, and accidental divergence.

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 82 lines · 26 tokens per session scan B ff1921ec242a

Subscribe to this mod's changes

reverse-engineering is a skill published in the GitHub repository griddynamics/rosetta (342 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 1,966 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.