archaeology
Skill0 starsChanged 5 months agoMITView on GitHub
Investigate why code exists before changing it, using indexed git history (commit -> PR -> issue). Use when a git-fence warning fires, when the user asks why code exists or whether it is safe to delete, before removing a check/workaround/special case that looks unnecessary, or when simplifying old code.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ai-analyst-lab/ai-analysttheir own version, first seen Sep 10, 2026
- rana/skillstheir own version, first seen Apr 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ai-analyst-lab/ai-analyst★ 304same name
- rana/skills★ 1same name
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 repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
If git-fence is not on PATH (plugin-only install), substitute python3 "$CLAUDE_PLUGIN_ROOT/bin/git-fence" for git-fence in every command …
- Very specific: line 22
If git-fence stats errors with "no index", run the index command first.
- Distinctive: line 43
Decide with evidence: Only after you can state *what bug the code prevents* decide whether removal is safe.
- Very specific: line 50
When a [git-fence] warning appears during an edit, do not silently proceed or silently back off:
- Very specific: line 53
Run git-fence why on the flagged lines.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Code Archaeology
Old code that looks wrong is often a fence someone built on purpose. Before removing or simplifying it, recover the reason it exists.
Prerequisite
If git-fence is not on PATH (plugin-only install), substitute
python3 "$CLAUDE_PLUGIN_ROOT/bin/git-fence" for git-fence in every
command below (or locate the plugin under ~/.claude/plugins/).
The repo must be indexed once (fast - thousands of commits per second):
git-fence index --github # --github enriches with PR/issue data via ghIf git-fence stats errors with "no index", run the index command first.
Workflow
- Ask the index first.
git-fence why <file> <line>- full provenance of one line: commit, PR, linked issues.git-fence why <file>- all fix-linked commits that touched the file.git-fence check <file> <start> <end>- load-bearing commits in a line range.
- Read the actual discussion when stakes are high. The index gives you PR
and issue URLs. For security fixes, regressions, or anything you plan to
delete, fetch the PR/issue with
gh pr view <n>/gh issue view <n>and read why the change was made and what alternatives were rejected. - Dig deeper when the index has no answer.
git log -L <start>,<end>:<file>- full evolution of a line range, including commits that predate squash merges.git log --follow --oneline -- <file>- history across renames.- A test added in the same commit is the best spec for what the code
protects. Check with
git show <sha> --stat.
- Decide with evidence. Only after you can state what bug the code prevents decide whether removal is safe. If the original bug can no longer occur (dependency removed, API changed), say so explicitly and delete with confidence. If you cannot reconstruct the reason, keep the code and say why.
Responding to a git-fence hook warning
When a [git-fence] warning appears during an edit, do not silently proceed
or silently back off:
- Run
git-fence whyon the flagged lines. - State in one sentence what the original bug was.
- Confirm your edit does not reintroduce it (keep the guard, keep the test), or adjust the edit so it does not.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

