Agent skill
legacy-modernization
Modernize legacy applications and codebases. Use for COBOL conversion, framework upgrades, and technical debt reduction.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/legacy-modernization
SKILL.md
🏗️ Legacy Modernization Skill
Modernization Patterns
Strangler Fig Pattern
1. Create new service alongside legacy
2. Route new features to modern service
3. Gradually migrate existing features
4. Eventually retire legacy system
Anti-Corruption Layer
// Legacy API returns old format
const legacyResponse = await legacyApi.getUser(id);
// { usr_id: 1, usr_nm: 'John', usr_email: 'john@example.com' }
// Transform to modern format
const modernUser = {
id: legacyResponse.usr_id,
name: legacyResponse.usr_nm,
email: legacyResponse.usr_email
};
Common Modernization Tasks
JavaScript Upgrades
// ES5 → ES6+
// var → const/let
var name = 'John'; // ❌
const name = 'John'; // ✅
// function → arrow
function add(a, b) { return a + b; } // Old
const add = (a, b) => a + b; // Modern
// Callback → Promise → Async/Await
// Callback
getData(function(err, data) { ... });
// Promise
getData().then(data => ...).catch(err => ...);
// Async/Await
const data = await getData();
jQuery → Vanilla JS
// jQuery
$('.button').click(function() { ... });
$('#result').html(data);
// Vanilla JS
document.querySelector('.button').addEventListener('click', () => { ... });
document.getElementById('result').innerHTML = data;
Class → Functional (React)
// Class Component
class Counter extends Component {
state = { count: 0 };
componentDidMount() { ... }
render() { return <div>{this.state.count}</div>; }
}
// Functional + Hooks
function Counter() {
const [count, setCount] = useState(0);
useEffect(() => { ... }, []);
return <div>{count}</div>;
}
Database Modernization
| From | To | Strategy |
|---|---|---|
| SQL Server | PostgreSQL | pg_chameleon |
| MySQL | PostgreSQL | pgloader |
| Oracle | PostgreSQL | ora2pg |
| MongoDB → SQL | Prisma | Custom scripts |
Modernization Checklist
- Document current architecture
- Identify pain points
- Create incremental plan
- Set up parallel testing
- Migrate with feature flags
- Monitor and validate
- Roll back if needed
- Decommission legacy
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?