
Git archaeology
Traces why odd code exists through git history before anyone removes it
Git archaeology is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 19
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Git archaeology
Git archaeology gives the agent a repeatable way to recover the intent behind code that looks wrong, unnecessary or arbitrary. It walks from git blame to the full commit, then to the linked pull request and ticket, and checks for past reverts and hotfix commits that show a change was already tried and rolled back.
The skill also guides the agent to judge whether a change was made under pressure, based on timing and the other files touched alongside it. It ends with a verdict such as load-bearing, obsolete or no history, and a default rule to leave code in place when uncertain. Where the reason is found, the agent is directed to record it as a code comment citing the commit.
It relies on shell git commands and, when available, the GitHub or GitLab CLIs to look up merged pull requests. A readable git history is required; shallow clones are flagged as unverified. Findings are written to a traces file in the engagement workspace.
When your agent uses it
Recover intent from history when code looks wrong - blame to commit to pull request to linked ticket, plus revert and hotfix patterns - so you find out why something is the way it is before removing it. Use when code looks unnecessary or bizarre, before deleting anything odd, when a constant or special case has no explanation, when a comment contradicts the code, or when you are about to say "this can be simplified". Exists specifically to prevent Chesterton's Fence mistakes, where the ugly branch turns out to be an incident fix and removing it reopens the incident.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (7 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the fde-core plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add rpraharaj/forward-deployed-engineer
/plugin install fde-core@fde-skillsOr copy only this skill to ~/.claude/skills/git-archaeology:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/git-archaeology &&
cp -R "$tmp/fde-core/skills/git-archaeology" ~/.claude/skills/git-archaeology &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/git-archaeology inside it instead.
Copy the skill folder to ~/.agents/skills/git-archaeology to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/git-archaeology &&
cp -R "$tmp/fde-core/skills/git-archaeology" ~/.agents/skills/git-archaeology &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/git-archaeology inside it instead.
Copy the skill folder to ~/.cursor/skills/git-archaeology to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/git-archaeology &&
cp -R "$tmp/fde-core/skills/git-archaeology" ~/.cursor/skills/git-archaeology &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/git-archaeology inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/rpraharaj/forward-deployed-engineer.git --path fde-core/skills/git-archaeologyOr copy the folder to ~/.gemini/skills/git-archaeology yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/git-archaeology:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/git-archaeology &&
cp -R "$tmp/fde-core/skills/git-archaeology" ~/.copilot/skills/git-archaeology &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/git-archaeology inside it instead.
Get the folder:
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.gitThen copy forward-deployed-engineer/fde-core/skills/git-archaeology into your agent's skills folder as git-archaeology. Agents that support SKILL.md read one folder per skill.
What it does
- Blame with move tracking
- Uses whitespace-ignoring and copy-following blame to find the real author of specific lines.
- Full commit context
- Reads sibling files changed in the same commit to spot incident responses behind terse messages.
- Pull request and ticket lookup
- Finds linked PRs and ticket keys from commit messages, including squash-merged history.
- Revert and hotfix search
- Searches history for reverted, reapplied or incident-related changes to the same code.
- Recorded verdicts
- Produces a written verdict per symbol and suggests comments that explain the code's purpose.
Good for
- Explain why a magic number in a retry client is set the way it is
- Check whether a special case for one customer can be safely removed
- Find the incident or ticket behind an odd branch before refactoring it
- Verify whether a comment that contradicts the code reflects an old decision
- Document the reasoning behind unexplained code for the next engineer
Git archaeology FAQ
When should the agent use Git archaeology?
When code looks unnecessary or bizarre, before deleting anything odd, when a constant or special case has no explanation, when a comment contradicts the code, or when someone proposes simplifying it.
What does Git archaeology need to work?
Git history that can be read. If the repository is a shallow clone, the skill says so and tags conclusions as unverified. Host CLIs such as gh or glab are used when present.
Does Git archaeology change the code?
It is designed to leave code in place when uncertain. When a reason is found, it adds a comment citing the commit and writes a trace file to the engagement workspace.
Does Git archaeology run scripts?
No scripts are bundled. It instructs the agent to run standard git commands and optional host CLI calls.
How do I install Git archaeology in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/git-archaeology to use it in all your projects, or to .claude/skills/git-archaeology in one project. Or install the fde-core plugin, which includes it: /plugin marketplace add rpraharaj/forward-deployed-engineer, then /plugin install fde-core@fde-skills.
Which AI agents can use Git archaeology?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Git archaeology?
The closest alternatives to Git archaeology are Why, Improve codebase architecture, Repo story time, Correct and Repo recon.
Where this comes from
- Description: from the skill's own SKILL.md.
More from rpraharaj/forward-deployed-engineer

Defines and tests the boundaries on what an AI agent's tool calls can do
- Open source
- 19 GitHub stars
- Security

Gives agents a procedure to test AI workflows against cases, thresholds and regression
- Open source
- 19 GitHub stars
- Developer tools

Turns access requests into a tracked, parallel critical path with workarounds
- Open source
- 19 GitHub stars
- Productivity

Plans how end users move to a new workflow, with barriers, pilot, support and measures
- Open source
- 19 GitHub stars
- Productivity

Maps what a proposed code change could break before you make it
- Open source
- 19 GitHub stars
- Developer tools

Maps an organization's change approval process so releases can be planned backwards from
- Open source
- 19 GitHub stars
- Productivity




