git-archaeology

git-archaeology is a skill for Claude Code from rpraharaj/forward-deployed-engineer. It costs 120 tokens per session (1,751 once invoked), scanned A, original, MIT.

A method for examining Git history—the record of code changes—to recover why unusual code, special cases, or seemingly unnecessary rules were added.

In plain words
What is it for?
Use it before simplifying or removing puzzling code, by tracing it from a line change to its commit, pull request, and linked work item.
Why use it?
It reduces the risk of deleting an old bug fix, workaround, or customer-specific requirement whose purpose is no longer obvious.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fde-core plugin — 30 skills shipped together

Good fit Use it before simplifying or removing puzzling code, by tracing it from a line change to its commit, pull request, and linked work item.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rpraharaj/forward-deployed-engineer/git-archaeology
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.

Any agent
npx skills add rpraharaj/forward-deployed-engineer --skill git-archaeology
Clone the repo
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer

Made for: Claude Code.

Or install fde-core, the plugin that ships this one along with the rest of its 30 skills.

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 git-archaeology

README.md
[![agentmods](https://agentmods.dev/badge/skills/rpraharaj/forward-deployed-engineer/git-archaeology.svg)](https://agentmods.dev/skills/rpraharaj/forward-deployed-engineer/git-archaeology)
Your own site
<a href="https://agentmods.dev/skills/rpraharaj/forward-deployed-engineer/git-archaeology"><img src="https://agentmods.dev/badge/skills/rpraharaj/forward-deployed-engineer/git-archaeology.svg" alt="Measured on agentmods" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,751 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00120 $0.01751
Opus 5 $0.00060 $0.00875
Sonnet 5 $0.00024 $0.00350
Haiku 4.5 $0.00012 $0.00175

Measured 8d ago against content hash b5b9fd39f842, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

git-archaeology 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 8d 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.

fde-core/skills/git-archaeology/SKILL.md · 152 lines

How it starts

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

Git archaeology

Finding out why, before you change it.

Why this exists

An FDE reads a lot of code that looks wrong. Some of it is. Much of it is an incident fix, a regulatory requirement, a workaround for a downstream system's bug, or a special case for one customer worth more than the rest combined.

The odd-looking code is odd because something happened. Removing it re-creates whatever it was preventing — usually silently, usually in production, and usually with your name on the commit.

You are the person least equipped to tell the difference. The permanent team carries the scar tissue; you don't. History is how you acquire it in three minutes instead of three years.

When this applies

  • Code looks unnecessary, bizarre, or over-complicated
  • Before deleting anything you don't understand
  • A magic number or special case with no explanation
  • A comment that contradicts the code
  • You're about to say "this can be simplified"
  • A [confirmed] claim you want to upgrade with the reasoning behind it

When it doesn't

  • Code you already understand
  • Genuinely new code with no history
  • You need runtime behavior rather than intent — that's trace-the-flow
  • Shallow clone with no history — say so and tag conclusions [unverified]

Prerequisites

Git history you can read. If git rev-parse --is-shallow-repository is true, stop and tag any intent claim [unverified]. Locate the workspace so the write-up lands with the rest of the engagement.

Procedure

1. Blame the specific lines

git blame -L 88,120 path/to/File.java
# Follow through moves and reformatting, which otherwise hide the real author
git blame -w -C -C -L 88,120 path/to/File.java

-w ignores whitespace changes, -C -C follows code moved between files. Without them, blame frequently points at whoever last reformatted the file, which tells you nothing and wastes the step.

2. Read the whole commit, not just the line

git show <sha>
git show <sha> --stat

Read the full file on GitHub · 152 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. 8d ago First seen · 152 lines · 120 tokens per session scan A b5b9fd39f842

Subscribe to this mod's changes

git-archaeology is a skill published in the GitHub repository rpraharaj/forward-deployed-engineer (6 stars, last pushed 21d ago), licensed MIT. It adds 120 tokens to every session and 1,751 once invoked, about $0.0006 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.

Related

Other skills, from other repositories