agentleFS
th3vib3coderth3vib3coder/RevEng/skills/repo-reverse-engineering/SKILL.md

repo-reverse-engineering

Skill4 starsChanged 6 months agoMITView on GitHub

Static-first reverse engineering of downloaded or cloned source repositories. Use when Codex or Claude Code needs to deeply analyze an unfamiliar repo, map architecture, entrypoints, dependencies, API/CLI/MCP/plugin surfaces, security and supply-chain risks, and produce both a Markdown report and RAG/MCP-ready corpus outputs.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not run builds, tests, installers, package managers, Docker, shell scripts, binaries, or repo-provided CLIs automatically.

    line 13
  2. Distinctive:

    If execution is requested or required, respond:

    line 14
  3. Distinctive:

    When the user asks to query the corpus through an agent/MCP workflow, serve it read-only:

    line 34
  4. Distinctive:

    Read details only when needed:

    line 42
  5. Very specific:

    If MCP/RAG interaction is requested, use repo_corpus_mcp.py and prefer cursor-paginated tools (reveng.list_graph_nodes, …

    line 58
  6. Distinctive:

    Write the Markdown report with these sections:

    line 59
  7. Distinctive:

    Test/build strategy observed from files.

    line 66
  8. Distinctive:

    If requested, MCP server startup command for querying the generated corpus.

    line 75
  9. Distinctive:

    Do not claim runtime behavior, successful builds, test status, exploitability, or production safety unless those were separately verified …

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Repo Reverse Engineering

Analyze a local source repository without executing its code. Produce an evidence-backed Markdown report plus structured artifacts for downstream RAG/MCP ingestion.

Safety

  • Static-first only: read files, manifests, docs, configs, tests, routes, lockfiles, and source text.
  • Do not run builds, tests, installers, package managers, Docker, shell scripts, binaries, or repo-provided CLIs automatically.
  • If execution is requested or required, respond:

PAUSE: This step would execute code from the analyzed repository. Confirm sandbox, network posture, snapshot/rollback state, exact command, and output path before continuing.

Quick Start

From the plugin root, run:

mkdir -p case
python3 scripts/repo_inventory.py /path/to/repo --json-out case/repo_inventory.json
python3 scripts/repo_map.py /path/to/repo --json-out case/repo_map.json
python3 scripts/repo_corpus_export.py /path/to/repo --repo-map case/repo_map.json --jsonl-out case/repo_corpus.jsonl
python3 scripts/case_manifest.py --case-dir case --target /path/to/repo \
  --artifact repo_inventory=case/repo_inventory.json \
  --artifact repo_map=case/repo_map.json \
  --artifact repo_corpus=case/repo_corpus.jsonl \
  --cap repo_corpus_max_file_bytes=500000

When the user asks to query the corpus through an agent/MCP workflow, serve it read-only:

python3 scripts/repo_corpus_mcp.py --corpus case/repo_corpus.jsonl --repo-map case/repo_map.json

On Windows, use python if python3 is absent.

Read details only when needed:

  • references/repo-analysis-playbook.md
  • references/repo-analysis-schema.md
  • references/case-manifest-schema.md
  • references/output-schemas.md
  • references/report-templates.md

Analysis Procedure

  1. Inspect repo_inventory.json for languages, file mix, size, ignored directories, and manifest evidence.
  2. Inspect repo_map.json for entrypoints, dependencies, routes, plugin/MCP surfaces, configs, and risk observations.
  3. Inspect repo_map.json module_graph for Python internal import edges and unresolved/external imports.
  4. Inspect repo_map.json graph for file, module, symbol, route, entrypoint, dependency, and plugin nodes plus evidence-backed edges.
  5. Inspect case_manifest.json for artifact hashes, target content hash, caps, ignored directories, warnings, and static-first safety posture.
  6. Sample repo_corpus.jsonl to verify records contain stable hashes, summaries, symbols, imports, evidence excerpts, and graph_refs when exported with --repo-map.
  7. If MCP/RAG interaction is requested, use repo_corpus_mcp.py and prefer cursor-paginated tools (reveng.list_graph_nodes, reveng.list_graph_edges, reveng.graph_neighbors) over pasting large corpus sections into chat.
  8. Write the Markdown report with these sections:
    • Apparent purpose.
    • Structure and major modules.
    • Entrypoints and flows.
    • Dependencies and toolchain.
    • API, CLI, MCP, plugin, and service surfaces.
    • Security and supply-chain risk signals.
    • Test/build strategy observed from files.
    • Limitations and next steps.

Output Contract

Always deliver:

  • A Markdown report with file/line evidence for non-obvious claims.
  • Paths to case_manifest.json, repo_inventory.json, repo_map.json, and repo_corpus.jsonl.
  • If requested, MCP server startup command for querying the generated corpus.
  • Limitations, especially anything not executed because of the static-first boundary.

Do not claim runtime behavior, successful builds, test status, exploitability, or production safety unless those were separately verified under an approved execution gate.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.