Borrowing it
Nothing to install: this file belongs to Dhevenddra/forensic-deepdive. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Dhevenddra/forensic-deepdive/main/.claude/skills/forensic-deepdive-extract/SKILL.mdgit clone --depth 1 https://github.com/Dhevenddra/forensic-deepdiveWrote 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.
[](https://agentmods.dev/skills/dhevenddra/forensic-deepdive/forensic-deepdive-extract)<a href="https://agentmods.dev/skills/dhevenddra/forensic-deepdive/forensic-deepdive-extract"><img src="https://agentmods.dev/badge/skills/dhevenddra/forensic-deepdive/forensic-deepdive-extract.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00131 | $0.00978 |
| Opus 5 | $0.00066 | $0.00489 |
| Sonnet 5 | $0.00026 | $0.00196 |
| Haiku 4.5 | $0.00013 | $0.00098 |
Grade A, and why
forensic-deepdive-extract 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Forensic Deep-Dive — Extract
Runs the full extraction pipeline once per new codebase. Produces five markdown artifacts in docs/codebase/.
When to use
- First time analyzing this codebase.
- Repo has no
docs/codebase/directory. - Existing artifacts are >7 days old AND >100 commits behind HEAD.
When NOT to use
- Artifacts exist and are <7 days old → use
forensic-deepdive-query. - Only some files changed since last run → use
forensic-deepdive-update. - User is asking about a single file or function → just read it.
How to run
-
Verify CLI is installed:
forensic --versionIf missing:
uv tool install forensic-deepdiveorpipx install forensic-deepdive. -
From the repo root:
forensic extract . --output ./docs/codebase/ -
Defaults:
- Cloud mode (uses
ANTHROPIC_API_KEYorOPENAI_API_KEY). - Plain
git logarchaeology (no Graphiti). - Repomix
--compressfor flattening.
- Cloud mode (uses
-
Flags:
--local— use Ollama / LM Studio on localhost (v0.2).--with-graphiti— enable temporal KG (v0.2; only if repo meets 2-of-5 threshold).--fast— use yek instead of Repomix (v0.2).--force— ignore cache, regenerate everything.
Pipeline stages
| Stage | Flag | Typical time |
|---|---|---|
| Inventory | --stage=inventory |
<10s |
| Layer 1 (Tree-sitter + PageRank) | --stage=static |
30s–5min |
| Layer 2 (Repomix --compress) | --stage=flatten |
10s–2min |
| Layer 3 (plain-git / Graphiti) | --stage=history |
30s plain / 5-15min Graphiti |
| Layer 4 (emit 5 artifacts) | --stage=emit |
10–60s |
Earlier stages cache to .forensic-deepdive/cache/.
What to report back to the user
After the run completes:
- Five-bullet summary: "Top entry points are X, Y, Z. Hot paths are A, B. The repo's hidden weight-bearing abstraction is C."
- Cost report: read
.forensic-deepdive/last_run.jsonand report actual token cost. - Three suggested first-tasks based on ARCHAEOLOGY.md (e.g., "PR #1234 was reverted; underlying bug may still exist in module M").
- Exact paths of the five artifacts.
- Shim status: confirm
CLAUDE.md,AGENTS.md,.cursor/rules/codebase.mdc,.continue/rules/codebase.mdwere written.
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.
- 7d ago First seen · 78 lines · 131 tokens per session scan A 726174bc934b
forensic-deepdive-extract is a skill published in the GitHub repository Dhevenddra/forensic-deepdive (2 stars, last pushed 22d ago), licensed Apache-2.0. It adds 131 tokens to every session and 978 once invoked, about $0.0007 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-31.
Other skills, from other repositories
mistakes
List past mistakes engram has learned in this project — failures, regressions, broken assumptions. Use before starting a non-trivial change to surface relevant prior failures, or when debugging to check if this issue has been seen before.
query
Query engram's local knowledge graph for structural context — function calls, imports, type relationships, mistake history, ADRs. Use when the user asks "how does X work in this project", "what calls Y", "where is Z used", or any structural question that doesn't need file content.
cost
Show how many tokens engram has saved in this session, this week, and across all indexed projects. Use when the user asks about token usage, savings, costs, or wants a digest report.
1.1.0
Review diffs for correctness, security, maintainability, and test coverage.
templates
Describe the skill workflow, eval criteria, and constraints here.
code-review
Review diffs for correctness, security, and maintainability.