code-archaeology
Skill0 starsChanged 4 months agoMITView on GitHub
Understand an unfamiliar or legacy module before changing it. Use whenever the user asks what code does, asks to modify/refactor/migrate code in a module with no tests or docs, mentions "legacy", "old code", "nobody knows how this works", or before any change to a module the session has not read. Produces a findings document and a change plan; never writes production code during archaeology.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- SWEStash/swe-workflow-skillstheir own version, first seen Nov 8, 2026
- flonat/flonat-researchtheir own version, first seen Nov 3, 2026
- tstapler/dotfilestheir own version, first seen Oct 10, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- flonat/flonat-research★ 150same name
- tstapler/dotfiles★ 8same name
- SWEStash/swe-workflow-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 repository11 other files it gives its agents.
- angular-enterpriseSkill
- angular-migrationSkill
- characterization-testsSkill
- claude-md-architectSkill
- feature-flag-changeSkill
- frontend-review-checklistSkill
- rxjs-modernizeSkill
- session-hygieneSkill
- session-stateSkill
- strangler-migrationSkill
- tdd-loopSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
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 10
Do NOT write or edit production code in this skill.
- Very specific: line 24
Write docs/archaeology/<module>-findings.md with sections: Surface, Data flow, Touchpoints, Oddities, Open questions.
- Distinctive: line 32
If the module has no tests: require characterization tests first (consult the characterization-tests skill) and say so in the plan.
- Distinctive: line 39
Commit message references the findings doc.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- owner: Muskan, added: 2026-07-16, model: claude-sonnet-5, review: quarterly -->Code Archaeology (Explore → Plan → Code → Commit)
Phase gate
Do NOT write or edit production code in this skill. Output of this skill is understanding + a plan. Announce phase transitions explicitly.
Explore
- Map the surface: exported functions/classes/components, who calls them (grep call sites; use LSP tools for symbol references if available — prefer LSP over grep for symbols).
- Trace one primary data flow end to end (input → transformations → output/ side effect). Name every state mutation.
- Touchpoints: list DB tables, HTTP endpoints, files, env vars, globals, events. Exact file:line for each.
- Oddity hunt: magic numbers, date/timezone math, rounding, locale assumptions, catch-and-ignore blocks, commented-out code, TODOs older than 1 year. For each: "looks wrong / probably load-bearing / evidence".
- Write
docs/archaeology/<module>-findings.mdwith sections: Surface, Data flow, Touchpoints, Oddities, Open questions. This file is the documentation byproduct — always write it, even for small digs.
Plan
- State the change as: goal, acceptance criteria (machine-checkable: commands that must pass), files to touch (explicit allowlist), blast radius (dependents that could break), and rollback (how to revert).
- If the module has no tests: require characterization tests first (consult the characterization-tests skill) and say so in the plan.
- Present the plan and STOP for user approval before any code phase.
Code / Commit (after approval)
- Touch only allowlisted files. After each logical edit, run the acceptance commands. Never claim they pass without running them.
- Commit message references the findings doc. If any oddity was intentionally preserved, say which and why.
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.

