Back to skills
SKILL.md
Code Modernization
ASecurityLegacy modernization — assessment (hotspots, test gaps, dead code), strangler fig for modules, incremental typing, runtime and framework upgrades, codemods, replacing obsolete libraries, tracking progress. Use to modernize legacy code incrementally (legacy, modernization, codemod, framework upgrade, strangler).
- 5 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Security analysis
100/100npx -y skills add vectora-os/kit --skill code-modernization --agent claude-codeAre you the author of Code Modernization?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-code-modernization)---
name: code-modernization
description: Legacy modernization — assessment (hotspots, test gaps, dead code), strangler fig for modules, incremental typing, runtime and framework upgrades, codemods, replacing obsolete libraries, tracking progress. Use to modernize legacy code incrementally (legacy, modernization, codemod, framework upgrade, strangler).
metadata:
category: engineering-excellence
---
# Code modernization
## Purpose
Modernize legacy systems incrementally while they keep working.
**Use when:** legacy code or obsolete technology.
**Not for:** big-bang rewrites (council decision needed).
## Inputs
- Legacy code, change and defect history.
## Outputs
- Assessment, incremental plan, PRs.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "code modernization"` for prior decisions, patterns and anti-patterns.
- [Migration plan template](../../../templates/migration-plan.md)
## Steps
1. **Assess.** Hotspots (churn × complexity), test coverage, dead code.
Done when priorities ranked.
2. **Seams.** Add tests and seams around hotspots.
Done when safe to change.
3. **Replace.** Strangle module by module; codemods for mechanical changes.
Done when each step ships.
4. **Track.** Progress metrics.
Done when trend visible.
## Best practices
- Delete dead code first.
- Automate mechanical changes.
## Common mistakes
- Rewrite from scratch.
- Modernizing rarely changed code first.
## Example
JS monolith: checkJs on hotspots, 2 modules to TypeScript, deprecated HTTP library replaced via codemod.
## Reusable prompt
```text
Apply the Code modernization skill (.agents/skills/code-modernization/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Assess the legacy code, rank modernization targets and plan incremental steps.
Return: Assessment, incremental plan, PRs..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.