commit-archaeologist
Skill2 starsChanged 3 months agoMITView on GitHub
Reconstructs why code exists from local git history, including the introducing commit, later changes, current authors, repeated companion files, and likely intent. Use when the user asks "why does this code exist", "who wrote this function and why", or to "explain the history of this function" before a rewrite, refactor, or risky edit. Runs entirely locally.
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 64
If it rejects a path or range, report that error and ask for a corrected target.
- Very specific: line 66
Before interpreting the JSON, read references/reading-git-history.md.
- Distinctive: line 102
Keep hashes short in prose, but preserve enough characters to identify them.
- Distinctive: line 103
Do not dump the full JSON unless the user asks.
- Distinctive: line 111
Commit categories are message heuristics, not verified issue types.
- Distinctive: line 114
If the history is thin or messages are vague, say "the history shows" and "likely" instead of inventing a design rationale.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commit Archaeologist
git blame names the last person to touch a line. This skill reconstructs the
reason the line exists. It traces a file or current line range through local git
history, identifies its origin and later edits, finds files that repeatedly
changed beside it, and extracts intent clues from commit messages.
Everything runs locally. No network calls, API keys, or repository writes.
When to use
- The user asks why a block, function, or file exists
- The user wants to know who introduced code and what changed afterward
- A rewrite or refactor needs historical constraints and change risks
- A workaround, temporary branch, or surprising design choice needs context
When not to use
- The user only wants raw blame output or a commit list
- The task is to squash, delete, or rewrite git history
- The repository is remote and has not been cloned locally
- The question is about project-wide architecture rather than one file or region
Gather the target
Get the repository path and tracked file path. Use a line range when the user names a current block or function. If either path is missing, ask only for the missing value. Do not scan sibling repositories.
Paths should be relative to the repository and use forward slashes. Line ranges
use inclusive current line numbers such as 40-72.
Run the dig
From this skill directory:
python3 scripts/archaeologist.py /path/to/repo src/cache.py --lines 40-72 --jsonFor the complete history of a file, omit --lines:
python3 scripts/archaeologist.py /path/to/repo src/cache.py --jsonThe script is read-only. With a range it uses git line-log; without one it uses file history with rename following. It also reads current authorship with blame. If it rejects a path or range, report that error and ask for a corrected target.
Before interpreting the JSON, read
references/reading-git-history.md. Its confidence rules prevent blame
ownership, correlation, and commit-message hints from becoming false certainty.
Read the JSON
region: normalized repository, current and historical paths, mode, range, and co-change thresholdintroduced_by: oldest commit in the selected historytimeline: commits ordered oldest to newest, with category, changed files, and detected renamesco_changed: files present beside the target in enough selected commitsauthors: current blamed lines and historical commit counts, kept separateintent_signals: issue references, reverts, workarounds, temporary markers, and unfinished-work markers found in commit messages
An empty signal list means the messages do not say why. It does not mean the change had no reason.
Write the report
Turn the JSON into a short "why this code exists" report:
- Bottom line. One or two sentences with the most likely explanation and a confidence label: high, medium, or low.
- Origin. Introducing hash, date, author, subject, and the neighboring files that make the initial purpose clearer.
- Timeline. Oldest to newest. Group mechanical edits when they do not change the story, but preserve reverts, fixes, and workarounds.
- Companion files. Explain repeated co-changes as a coupling clue. Do not
treat a one-off file in
changed_filesas a dependency. - Intent evidence. Quote short commit subjects or signal words. Label any conclusion beyond those facts as an inference.
- Change risk. Name the constraints, companion files, and unresolved temporary choices worth checking before an edit.
Keep hashes short in prose, but preserve enough characters to identify them. Do not dump the full JSON unless the user asks.
Evidence rules
- Current blame ownership is not proof of original authorship.
- The oldest selected commit is the region's introduction, not always the file's first commit.
- Repeated co-change suggests coupling; it does not prove a dependency.
- Commit categories are message heuristics, not verified issue types.
- "Temporary" and "workaround" are strong intent clues, but only the message author or linked discussion can confirm whether the constraint still applies.
- If the history is thin or messages are vague, say "the history shows" and "likely" instead of inventing a design rationale.
Follow-ups
End by offering one relevant follow-up, such as:
- "Want me to assess whether this looks deliberate or accidental?"
- "Want me to map what could break if this region changes?"
For a deliberate-choice question, weigh repeated edits, issue references, reverts, and explicit constraint words. For a change-risk question, inspect the repeated co-change files and the last behavior-changing commits before proposing edits. Do not modify code until the user asks.
Files
scripts/archaeologist.py: offline git history walker and JSON report builderreferences/reading-git-history.md: interpretation and confidence guide
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- jmcelreavey/devhub★ 498% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository383 other files it gives its agents.
- 37signals-waySkill
- ab-test-analysisSkill
- advisor-orchestrator-workerSkill
- ai-ml-engineeringSkill
- algorithmic-artSkill
- analyze-feature-requestsSkill
- animation-vocabularySkill
- apple-designSkill
- emil-design-engSkill
- find-animation-opportunitiesSkill
- improve-animationsSkill
- pick-ui-librarySkill
- prototypeSkill
- review-animationsSkill
- ansoff-matrixSkill
- api-and-interface-designSkill
- api-design-best-practicesSkill
- app-store-changelogSkill
- auth-authorizationSkill
- beachhead-segmentSkill
- blue-ocean-strategySkill
- brainstorm-experiments-existingSkill
- brainstorm-experiments-newSkill
- brainstorm-ideas-existingSkill
- brainstorm-ideas-newSkill
- brainstorm-okrsSkill
- brand-guidelinesSkill
- browser-testing-with-devtoolsSkill
- bug-hunt-swarmSkill
- business-modelSkill
- canvas-designSkill
- ci-cd-and-automationSkill
- claude-apiSkill
- clean-architectureSkill
- clean-codeSkill
- cli-creatorSkill
- code-review-and-qualitySkill
- code-review-skillSkill
- code-simplificationSkill
- cohort-analysisSkill
- cold-start-problemSkill
- competitive-battlecardSkill
- competitor-analysisSkill
- contagiousSkill
- context-engineeringSkill
- continuous-discoverySkill
- architecture-blueprint-generatorSkill
- azure-architecture-autopilotSkill
- cli-masterySkill
- codeqlSkill
- conventional-commitSkill
- create-implementation-planSkill
- csharp-asyncSkill
- diagnoseSkill
- dotnet-best-practicesSkill
- draw-io-diagram-generatorSkill
- git-commitSkill
- github-actions-efficiencySkill
- java-springbootSkill
- mcp-cliSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

