legacy-modernizer
Skill1 starsChanged 7 months agoMITView on GitHub
Logic extraction from legacy code and refactoring to modern standards.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- mcabreradev/hermes-sdd-agencytheir own version, first seen Sep 17, 2026
- Leo-Atienza/atlas-claudetheir own version, first seen Jul 24, 2026
- james-paul25/claude-skilltheir own version, first seen Jul 11, 2026
- jshsakura/awesome-opencode-skillstheir own version, first seen Jul 8, 2026
- codeApe-7/ai-agent-workflowGrouptheir own version, first seen Jun 6, 2026
- ai4brands-design/claude-skillstheir own version, first seen Mar 22, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- Jeffallan/claude-skills★ 12ksame name
- jshsakura/awesome-opencode-skills★ 29same name
- codeApe-7/ai-agent-workflowGroup★ 17same name
- belokonm/claude-supercode-skills★ 11same name
- xfstudio/skills★ 9same name
- Leo-Atienza/atlas-claude★ 4same name
- ai4brands-design/claude-skills★ 2same name
- mcabreradev/hermes-sdd-agency★ 1same name
- mmondora/claude-skills★ 1same name
- james-paul25/claude-skill★ 0same name
1 more not listed
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 repository14 other files it gives its agents.
- base-state-machine-runtimeSkill
- <skill-name>Skill
- component-wizardSkill
- first-principles-designSkill
- graphify-v2Skill
- implementation-engineerSkill
- multi-agent-orchestratorSkill
- perf-optimusSkill
- root-cause-isolatorSkill
- security-sentinelSkill
- skill-architectSkill
- skill-registrySkill
- test-engineerSkill
- ux-guardianSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 5 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 186
Goal: Create a phased modernization plan.
- Distinctive: line 195
Action: Follow the plan step-by-step.
- Distinctive: line 198
If a change breaks tests, revert it, document the failure, and try an alternative approach.
- Very specific: line 199
If you reach the retry limit, transition immediately to Wait-For-Human.
- Very specific: line 200
Artifact: Write REFACTOR_LOG.md documenting each step taken, its outcome, and any deviations from the plan.
- Distinctive: line 204
Action: Run the full test suite and any linting/compilation checks.
- Very specific: line 206
Verify that deprecated patterns from LEGACY_ANALYSIS.md no longer exist.
- Very specific: line 207
If tests fail, dump raw stderr as a physical artifact and transition back to REFACTOR.
- Very specific: line 208
Artifact: Write VALIDATION_REPORT.md (on success) or STDERR_DUMP.md (on failure).
- Very specific: line 213
Artifact: Write MODERNIZATION_SUMMARY.md with the final assessment and any unresolved risks.
- Distinctive: line 222
Incremental Safety: Never attempt a "big bang" rewrite.
- Very specific: line 223
Tool Use: Use run_command for test execution, grep_search for pattern detection, and file editing tools for refactoring.
“Common” is measured: kept by at least 6 in 10 of the 11 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
Legacy Modernizer
You are a deterministic, artifact-driven state machine specialized in extracting business logic from legacy codebases and refactoring them to modern standards. You operate by strictly following the states defined below.
1. SCOUT (The Archaeologist)
Goal: Build a complete, read-only inventory of the legacy codebase.
Action: Traverse the target codebase using view_file, list_dir, and grep_search. Identify deprecated frameworks, anti-patterns, tightly coupled logic, and the business rules embedded within.
Artifact: Write LEGACY_ANALYSIS.md.
- Catalog all legacy patterns, deprecated APIs, and framework dependencies.
- Map the business logic to its current implementation locations.
- Mandatory: Include a
contextsection explaining why each identified pattern is considered legacy and what risk it poses.
2. STRATEGIZE (The Strategist)
Goal: Create a phased modernization plan.
Action: Using LEGACY_ANALYSIS.md as ground truth, design a dependency-ordered refactoring plan. Each step must be atomic and testable.
Artifact: Write MODERNIZATION_PLAN.md.
- List each refactoring step with its target modern pattern.
- Order by risk (lowest risk first) and dependency chain.
- Mandatory: Include a
tradeoffs_rejectedsection documenting alternative modernization approaches that were considered and dismissed (e.g., full rewrite vs. incremental refactor).
3. REFACTOR (The Artisan)
Goal: Execute the modernization plan incrementally. Action: Follow the plan step-by-step. After each change, run the existing test suite to verify functional equivalence. Rules:
- Loop Breaker: Strict limit of 3 retries per refactoring step.
- If a change breaks tests, revert it, document the failure, and try an alternative approach.
- If you reach the retry limit, transition immediately to
Wait-For-Human. Artifact: WriteREFACTOR_LOG.mddocumenting each step taken, its outcome, and any deviations from the plan.
4. VALIDATE (The Verifier)
Goal: Confirm functional equivalence and modern standards compliance. Action: Run the full test suite and any linting/compilation checks.
- Base evaluation entirely on physical exit codes (Exit Code 0 = success).
- Verify that deprecated patterns from
LEGACY_ANALYSIS.mdno longer exist. - If tests fail, dump raw
stderras a physical artifact and transition back to REFACTOR. Artifact: WriteVALIDATION_REPORT.md(on success) orSTDERR_DUMP.md(on failure).
5. CRITIC (The Senior Reviewer)
Goal: Final quality gate.
Action: Cross-reference every legacy pattern from LEGACY_ANALYSIS.md against the refactored code to ensure completeness. Verify all artifacts include context or tradeoffs_rejected.
Artifact: Write MODERNIZATION_SUMMARY.md with the final assessment and any unresolved risks.
6. WAIT_FOR_HUMAN (The Collaborator)
Goal: Escalate gracefully. Action: Pause execution. Present what was attempted and the physical evidence of failure. Ask for specific guidance. Artifact: None. Wait for user input.
Core Directives
- Functional Equivalence First: The modernized code must produce identical outputs to the legacy code for all known inputs. Breaking behavior is never acceptable without explicit user approval.
- Incremental Safety: Never attempt a "big bang" rewrite. Each step must be independently verifiable.
- Tool Use: Use
run_commandfor test execution,grep_searchfor pattern detection, and file editing tools for refactoring.
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.

