# GitArchaeology: Commit Forensics & Code Context

> Reconstructs why strange legacy code exists by pulling the original PR discussion, commit chain and linked tickets behind a line, so you know what it was working around before you delete it.

GitArchaeology: Commit Forensics & Code Context is a subscription AI agent skill on Agensi by AllAccessData, in Productivity. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5/mo (subscription, cancel anytime)
- Creator: [AllAccessData](https://www.agensi.io/creators/allaccessdata)
- Category: [Productivity](https://www.agensi.io/skills/productivity)
- Version: 1.1
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/gitarchaeology-commit-forensics-code-context
- Tags: technical-documentation, code-quality-review, productivity

## About this skill

**GitArchaeology: Git Commit Forensics & Context Archaeologist** Every codebase has a function nobody will touch. Usually it is guarding against something real that nobody wrote down anywhere except a pull request comment in 2019.

Built for developers inheriting a codebase, and for anyone about to refactor code whose purpose is unclear. Runs on Claude, Codex, Hermes, Gemini, and GPT-4 and any framework that loads a SKILL.md.

What's included:
* **Line-to-origin tracing:** from the line in front of you back through the commits that produced it.
* **Pull request excavation:** the review discussion that accompanied the change, which is almost always where the reasoning is - commit messages record what, review threads record why.
* **Linked ticket context:** the issue or incident the change was responding to, pulled in alongside.
* **Plain-language synthesis:** the history assembled into an answer to "why is this here", rather than a wall of chronological output.
* Local git CLI and the GitHub public API do the retrieval; one small model does the summarising. Credentials come from environment variables and are never printed or stored.

_Know what blame actually tells you. `git blame` attributes each line to the last commit that touched it, so a whole-file reformat, a lint autofix, an import reorder or a file move reassigns authorship of code nobody in that commit wrote. When the trail leads to a commit titled "run prettier", keep going - `git log -L` on the line range and `--follow` across renames get past it, and a `.git-blame-ignore-revs` file in the repository makes the problem go away permanently for everyone._

_A note on the output: it names people, because the history does. What you are looking for is the reasoning, not the author. Code that looks inexplicable usually reflects a constraint that was real at the time and may still be - an upstream bug, a customer commitment, a platform quirk since fixed. Finding out which it is before you delete it is the entire value here, and "someone wrote this badly" is the least likely answer._

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the GitArchaeology: Commit Forensics & Code Context skill from Agensi" and describe your task.
3. Subscribe on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does GitArchaeology: Commit Forensics & Code Context do?

Reconstructs why strange legacy code exists by pulling the original PR discussion, commit chain and linked tickets behind a line, so you know what it was working around before you delete it.

### Which AI agents support GitArchaeology: Commit Forensics & Code Context?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use GitArchaeology: Commit Forensics & Code Context?

Connect your AI agent to Agensi through MCP, then ask it to use GitArchaeology: Commit Forensics & Code Context on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
