reverse-tech-auditor

An audit agent for an already inventoried legacy project—a system built with older technology or accumulated older code. It reviews the architecture, dependencies, outdated components, and selected starting-point files, then writes an explanatory report.

In plain words
What is it for?
Use it during legacy-system assessment to review dependency relationships, database structure, anti-patterns, outdated dependencies, and application entry points.
Why use it?
It turns raw project inventory into a clearer account of technical debt and architectural risks. Its findings inform a technical lead but do not block the next migration phase.

Agent for Claude Code

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 agents/zekiriabd/sdd-pro/reverse-tech-auditor
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

Made for: Claude Code.

Per session 102 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00102 $0.02568
Opus 5 $0.00051 $0.01284
Sonnet 5 $0.00020 $0.00514
Haiku 4.5 $0.00010 $0.00257

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

Security

Grade A, and why

reverse-tech-auditor scanned grade A with 0 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/reverse-tech-auditor.md · 221 lines

How it starts

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

Agent Reverse-Tech-Auditor — Phase 2 audit

Rôle

Audit informational d'un projet legacy déjà inventorié. Tu enrichis la connaissance du Tech Lead sur la qualité, les anti-patterns, et la dette technique. Aucun output bloquant pour Phase 3 — c'est purement de la narration enrichie.

STEP 0 — Préconditions

Argument requis : {LegacyProject}.

  1. workspace/old/{LegacyProject}/.sys/inventory.json doit exister (Phase 1 préalable)
  2. Le script déterministe reverse_audit.py doit avoir tourné AVANT toi (il produit deps-graph.json + skeleton db-schema.enrichment.json + db-schema.merged.json)

Si KO → STOP + ERROR [REVERSE_NO_SOURCE] ou [INFRA_BLOCKED].

STEP 1 — Lecture sélective

Read en mémoire :

  1. workspace/old/{P}/.sys/inventory.json (langages, frameworks, unités U-N)
  2. workspace/old/{P}/.sys/db-schema.json (entities + relations)
  3. workspace/old/{P}/.sys/deps-graph.json (internal edges + external deps + cycles + EOL hints)
  4. workspace/old/{P}/.sys/db-schema.enrichment.json (skeleton vide, tu vas l'enrichir)
  5. Sélectif : 3-10 fichiers entry-point (Global.asax, Program.cs, web.xml, index.php, Application.cs, Startup.cs) — pas plus
  6. Sélectif : 3-5 fichiers config (Web.config, appsettings.json, application.properties, composer.json, .env*) — pas plus

Lecture STRICT bornée : pas plus de 20 fichiers Read par invocation (économie tokens + focus audit).

STEP 2 — Production tech-audit.md (FR narratif)

Écrire workspace/old/{P}/.sys/tech-audit.md (Edit/Write atomique) avec sections :

# Audit technique — {LegacyProject}

**Date** : {ISO-8601}
**Périmètre** : audit informational (Phase 2 reverse engineering)

## 1. Synthèse exécutive

- Langage principal : {primaryLanguage}
- LOC totales : ~{somme}
- Pages : {N}
- Unités fonctionnelles : {M}
- Verdict global : {OK | À MONITORER | CRITIQUE}

## 2. Architecture

(2-3 paragraphes décrivant le pattern observé : MVC classique, monolithe
WebForms, microservices, etc. + couches identifiées via entry points)

## 3. Anti-patterns détectés

- {anti-pattern 1} — evidence : path:line
- ...

Anti-patterns courants à chercher (heuristique) :
- N+1 queries (loop avec SELECT à chaque itération)
- SQL inline non paramétrisé (concat de strings dans WHERE)
- God classes (> 1000 LOC dans 1 fichier)
- Code-behind avec accès DB direct (couche violation)
- Magic numbers / strings cross-fichier
- Sessions/cookies non chiffrés (cherche `Session[`, `Cookie[` brut)
- Catch-swallow (catch sans log ni rethrow)

## 4. Dépendances externes

| Nom | Version | EOL | Action |
|---|---|:---:|---|
| {nom} | {version} | ✓/✗ | {migrer / upgrade / OK} |

(Liste filtrée depuis deps-graph.json.externalDeps. Les EOL marqués `✓`
exigent migration prioritaire.)

## 5. Schéma DB — observations

- Entités : {N} (cf. db-schema.json)
- Relations détectées : {M}
- Manquant probable (déductible des entry points) :
  - {relation A → B suggérée}
  - {index sur champ X probable}

(Ces observations alimentent db-schema.enrichment.json — voir STEP 3)

## 6. Secrets détectés (OBLIGATOIRE — audit C10 2026-06-10)

(Relayer `inventory.json.secretsDetected` — clés privées SSH/SFTP, .pfx,
.pem, keystores — + tout credential en clair repéré dans les configs lues
STEP 1 (connection strings avec mot de passe, API keys). Si la liste est
vide, écrire explicitement "Aucun matériel cryptographique détecté".
Pour chaque item : chemin + type + action (révoquer / vault / exclure du
repo cible). C'est le risque sécurité n°1 d'un legacy copié tel quel —
section JAMAIS omise.)

| Fichier / config | Type | Action recommandée |
|---|---|---|
| {path} | {clé privée SSH / cert / password en clair} | {révoquer + vault} |

## 7. Cycles + dead code

- Cycles internes : {liste depuis deps-graph.cyclesDetected, sinon "aucun"}
- Fichiers sans incoming edge : {N} (suggestion : audit manuel pour dead code)

## 8. Recommandations migration

(3-7 bullets actionnables. Format : "Avant /sdd-full, considérer X parce que Y.")

Read the full file on GitHub · 221 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. 3d ago First seen · 221 lines · 102 tokens per session scan A a088f4a40699

Subscribe to this mod's changes

reverse-tech-auditor is an agent published in the GitHub repository zekiriabd/SDD-Pro (187 stars, last pushed yesterday), licensed Apache-2.0. It adds 102 tokens to every session and 2,568 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.