Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ibm-self-serve-assets/building-blocks --skill code-modernization-expertgit clone --depth 1 https://github.com/ibm-self-serve-assets/building-blocksWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/code-modernization-expert)<a href="https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/code-modernization-expert"><img src="https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/code-modernization-expert.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.01223 |
| Opus 5 | $0.00014 | $0.00611 |
| Sonnet 5 | $0.00006 | $0.00245 |
| Haiku 4.5 | $0.00003 | $0.00122 |
Grade A, and why
code-modernization-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- code-modernization-expert — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Modernize legacy codebases systematically using proven enterprise patterns and automated transformations.
Supported Migrations
- Languages: Python 2→3, Java 8→21, JavaScript ES5→ES6+, TypeScript
- Frameworks: React Class→Hooks, Vue 2→3, Spring Boot 2→3, Django, Rails, Angular
- Architecture: Monolith→Microservices, REST→GraphQL, Callbacks→Async/Await
Use Glob to find all source files. Use Grep to identify:
- Framework versions (package.json, requirements.txt, pom.xml)
- Deprecated APIs and imports
- Code smells (TODO, FIXME, HACK)
- Security vulnerabilities
Generate Current State Report with:
- Languages, frameworks, versions
- Dependency health (outdated, vulnerable)
- Test coverage percentage
- Technical risks
See assessment-checklist.md for detailed items.
Categorize debt by severity and effort:
- Code quality (God classes, long methods, duplicates)
- Dependencies (EOL frameworks, vulnerable libraries)
- Testing gaps (low coverage, missing tests)
- Architecture issues (tight coupling, monolithic design)
Use prioritization matrix in debt-prioritization.md to rank items.
Create inventory with: Severity, Effort, Risk, Impact on velocity.
Choose based on context:
- Strangler Fig: Large monoliths, zero downtime required →
patterns/strangler-fig.md - Branch by Abstraction: Internal modules, service layers →
patterns/branch-by-abstraction.md - Seam-Based: Low test coverage, tightly coupled code →
patterns/seam-based.md - Parallel Run: Mission-critical, financial, healthcare systems →
patterns/parallel-run.md
Generate phased roadmap:
Preparation (1-2 weeks):
- Set up feature flags
- Implement monitoring/alerting
- Generate characterization tests
- Create rollback procedures (see
rollback-template.yaml)
Execution (Iterative per module):
- Read source files
- Generate tests capturing current behavior
- Apply transformations with Edit/MultiEdit
- Update imports and dependencies
- Run tests to validate
- Deploy incrementally (1% → 5% → 25% → 100%)
Validation:
- Run test suite
- Perform shadow testing
- Monitor error rates and latency
Cleanup:
- Remove legacy code
- Remove feature flags
- Update documentation
Apply language-specific changes:
Python 2→3: See migrations/python.md
- print statements → print()
- dict.iteritems() → dict.items()
- Add type hints, dataclasses, f-strings
Java 8→21: See migrations/java.md
- javax.* → jakarta.*
- Date → java.time.*
- POJOs → Records
- Add pattern matching, text blocks
JavaScript ES5→ES6+: See migrations/javascript.md
- var → let/const
- callbacks → async/await
- prototypes → classes
- Add template literals, modules
React Class→Hooks: See migrations/react.md
- constructor+state → useState
- componentDidMount → useEffect
- lifecycle methods → hooks
Create comprehensive coverage:
Characterization Tests: Capture current behavior (even if buggy) Golden Master Tests: Record production inputs/outputs Approval Tests: Snapshot complex outputs
See testing-strategies.md for examples.
Use Task tool to delegate test generation when needed.
Implement mitigation:
Risk Registry: Track risks with likelihood, impact, mitigation, owners
Rollback Plan: Define triggers (error rate, latency, bugs), immediate actions, validation steps
Monitoring: Track error rates, latency, business metrics, set alerts
See rollback-template.yaml for complete template.
Generate migration report with:
- Executive summary (current vs target, approach, timeline)
- Technical details (files modified, dependencies updated, tests added)
- Results (statistics, test results, performance impact)
- Lessons learned and next steps
What ships with it
15 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assessment-checklist.md 1.3 KB
- debt-prioritization.md 2.8 KB
- migrations/angular-to-react.md 3.4 KB
- migrations/java.md 2.2 KB
- migrations/javascript.md 2.4 KB
- migrations/php.md 3.0 KB
- migrations/python.md 3.4 KB
- migrations/react.md 3.6 KB
- migrations/ruby.md 3.1 KB
- patterns/branch-by-abstraction.md 1.8 KB
- patterns/parallel-run.md 2.0 KB
- patterns/seam-based.md 1.9 KB
- patterns/strangler-fig.md 2.5 KB
- rollback-template.yaml 2.5 KB
- testing-strategies.md 3.8 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 195 lines · 28 tokens per session scan A a916bb723100
code-modernization-expert is a skill published in the GitHub repository ibm-self-serve-assets/building-blocks (24 stars, last pushed 14d ago), licensed Apache-2.0. It adds 28 tokens to every session and 1,223 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.
omh-code-review
This is a Hermes-native code-review workflow skill.
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
code-reviewer
Code review specialist focused on patterns, bugs, security, and performance.
agent-teams-simplify-and-harden
Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests pass, and auditors find zero issues or…