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-javagit 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-java)<a href="https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/code-modernization-java"><img src="https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/code-modernization-java/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/code-modernization-java"><img src="https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/code-modernization-java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.5 | $0.00011 | $0.00489 |
| Sonnet 5.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 1mo 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.
This is a copy
100% identical to code-modernization-expert — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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.
- 1mo 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 (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 28 tokens to every session and 1,223 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to code-modernization-expert, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
debug-optimize-lcp
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…
systematic-debugging
Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.
log-error-digest
Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…
deck-retro
Run a fully local agent-deck retrospective over the user's own transcripts, Recall index and logs. Use when a user wants to find recurring failures or take their own finding from investigation through synthetic reproduction, a user-filed issue, a test-first fix and contributor PR handoff. Also use for weekly usage…
incident-response-incident-response
Coordinate production incident triage, mitigation, investigation, recovery, and follow-up. Use when responding to outages or other incidents that require structured operational coordination.
cwv-optimizer
Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and…