legacy-purge
Skill1 starsChanged 3 months agoMITView on GitHub
Audit a codebase for legacy residue after a pivot, deprecation, or major migration. Produces a categorized table of suspect files / patterns / strings — never auto-deletes. Use when user says 'purge v1', 'clean up old API', 'find legacy residue', 'audit migration leftovers'.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- dawn840705/codex-code-studiosedited, first seen Aug 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- dawn840705/codex-code-studios★ 1799% 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 repository90 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adoptSkill
- api-cost-gateSkill
- architecture-decisionSkill
- architecture-reviewSkill
- art-bibleSkill
- asset-auditSkill
- asset-specSkill
- balance-checkSkill
- brainstormSkill
- bug-reportSkill
- bug-triageSkill
- changelogSkill
- code-reviewSkill
- consistency-checkSkill
- content-auditSkill
- create-architectureSkill
- create-control-manifestSkill
- create-epicsSkill
- create-prdSkill
- create-storiesSkill
- day-one-patchSkill
- design-reviewSkill
- design-systemSkill
- dev-storySkill
- doc-relinkSkill
- estimateSkill
- gate-checkSkill
- governance-bible-initSkill
- helpSkill
- hotfixSkill
- humanize-koreanSkill
- humanize-redoSkill
- humanizeSkill
- launch-checklistSkill
- lesson-logSkill
- lesson-reviewSkill
- localizeSkill
- map-systemsSkill
- milestone-reviewSkill
- onboardSkill
- patch-notesSkill
- perf-profileSkill
- playtest-reportSkill
- product-conceptSkill
- project-stage-detectSkill
- propagate-design-changeSkill
- prototypeSkill
- qa-planSkill
- quick-designSkill
- regression-suiteSkill
- release-checklistSkill
- remove-bgSkill
- retrospectiveSkill
- reverse-documentSkill
- review-all-gddsSkill
- scope-checkSkill
- security-auditSkill
- self-loopSkill
- setup-engineSkill
- The first 60 shown.
The file
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 32
If args missing, ask the user:
- Distinctive: line 60
Use this as a starter, then customize categories per migration.
- Very specific: line 71
If a category needs subtler detection (variable names, comment text, file naming patterns), use Glob for filenames + Grep for content …
- Distinctive: line 83
Not mentioned → keep severity, flag as "policy gap" in report
- Distinctive: line 115
If 🚨 findings exist, suggest:
- Distinctive: line 129
Before the migration is declared done — purging mid-migration deletes work-in-progress.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Purpose
After a major pivot — a version migration, a platform change, an API deprecation, an architectural rewrite — code, docs, assets, and config files inherit residue from the old world. Some residue is intentionally retained (recyclable code, archived docs); some is dead weight that creates confusion, breaks builds intermittently, or leaks deprecated assumptions into new code.
This skill produces a categorized audit report of suspect residue. It never auto-deletes — every finding is human-reviewed.
Examples of pivot/migration scenarios:
- Genre pivot — mobile vertical → PC horizontal
- API deprecation — legacy input system → new input system
- Platform change — mobile-only → multi-platform (must remove platform-specific dependencies)
- Architecture rewrite — monolith → modular, ECS adoption, server-authoritative refactor
- Library swap — one rendering pipeline → another, one networking lib → another
Phase 1: Identify the migration
From $ARGUMENTS:
$1= from-context (e.g.v1,legacy-input,mobile-only,monolith)$2= to-context (e.g.v2,input-system,cross-platform,modular)$3(optional) = scope glob (e.g.src/**,Assets/02.Scripts/**,docs/**)
If args missing, ask the user:
What pivot are we auditing?
- From: <e.g. mobile-vertical-Forward-Rush>
- To: <e.g. PC-horizontal-cover-shooter>
- Scope: <which directories — defaults to all source / docs>
Also ask for policy documents that define what stays vs goes (e.g. "v1 archived doc", "deprecation memo", "migration plan"). These determine residue severity.
Phase 2: Build a category checklist
For the named migration, brainstorm 4-8 residue categories. Each category = one type of legacy footprint.
Category template
| Category | Severity tier | Detection method |
| Deprecated API calls | 🚨 immediate removal | grep for API symbols |
| Platform-specific dependencies (when going cross-platform) | 🚨 immediate removal | grep for platform classes / namespaces |
| Old genre/mode-specific logic | ⚠️ context review | grep for genre-specific keywords / variable names |
| Old screen/input-mode constants | ⚠️ context review | grep for orientation / aspect ratio / input type literals |
| Migration-flag stubs | ⚠️ context review | grep for // TODO migrate, #if LEGACY, deprecated feature flags |
| Old asset references | ⚠️ context review | grep for old asset paths in scenes / prefabs / scripts |
| Stale doc sections | ℹ️ doc cleanup | grep in docs/, Documents/ for old version mentions |
| Archive directories | ℹ️ already isolated | check for _archive/, legacy/, v1/ paths |
Use this as a starter, then customize categories per migration. Ask the user to confirm or extend the category list before scanning.
Phase 3: Run categorized greps in parallel
For each confirmed category, run a Grep with:
- Pattern matching old-context symbols
- Glob restricting to the scope
- Output mode
countfor quick prevalence, thenfiles_with_matchesfor review
If a category needs subtler detection (variable names, comment text, file naming patterns), use Glob for filenames + Grep for content separately, then merge.
Parallelize all category scans — one tool call message with N greps.
Phase 4: Cross-reference policy docs
For each finding, check if the policy doc (from Phase 1) explicitly classifies it:
- "Discard" / "❌ remove" → keep at original severity
- "Recycle" / "♻️ adapt" → demote ⚠️ → ℹ️ (intentional retention)
- "Archive" → demote to ℹ️ (already known)
- Not mentioned → keep severity, flag as "policy gap" in report
This filters out "I already decided to keep this" findings, leaving only unknown drift.
Phase 5: Produce the residue report
Output a markdown table per category:
## Cat A: Deprecated API calls 🚨
| File | Line | Symbol | Policy | Action |
|---|---|---|---|---|
| src/Foo.cs | 42 | LegacyAPI.GetX() | "❌ remove" | Replace with NewAPI.GetX |
| src/Bar.cs | 13 | LegacyAPI.SetY() | not in policy | Investigate — policy gap |Include:
- Summary line per category —
N findings, S severity tier - Total counts by tier —
🚨 X / ⚠️ Y / ℹ️ Z - Action checklist — bulleted "do this next" by tier
- Policy gaps — findings not classified in any policy doc; recommend adding to policy
- What was NOT scanned — categories you considered but skipped, with reason
The report is advisory only — never auto-edit, never delete, never even stage changes for the user. They review file-by-file.
Phase 6: Suggest follow-up
If 🚨 findings exist, suggest:
- "Run a fix-up commit per category — keeps history readable"
- "Add a CI lint to prevent regression of fixed patterns"
If ⚠️ findings exist:
- "Schedule a review session before the next sprint to triage"
If only ℹ️ findings:
- "Update policy doc to explicitly classify these" — closes policy gaps
When NOT to use this skill
- Before the migration is declared done — purging mid-migration deletes work-in-progress.
- For simple one-symbol rename — just use IDE refactor or
Grep+Edit. - For currently-supported legacy paths (backwards-compat code) — those are intentional residue, not drift.
Generalises across game projects
The same audit pattern applies to: engine version upgrades (Unity 2022 → 6, Godot 3 → 4, Unreal 4 → 5), rendering pipeline swaps (built-in → URP, deferred → forward), networking refactors (P2P → server-auth, custom → relay), genre pivots (single-player → live-service, premium → F2P), platform additions or removals. Define the 4-8 categories specific to your migration; the workflow is identical.
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.

