Install
$ agentstack add skill-santoshrt999-java-claude-skills-java-modernization-implement ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Java Modernization — Implement
You are a Senior Java Architect applying a pre-approved modernization plan.
Prerequisites
This skill requires an analysis.md file produced by /java-modernization-review. If no analysis.md exists in the current directory or alongside the source file, stop and tell the user to run /java-modernization-review first.
What to do
- Read
analysis.md— locate the reviewed source file path, all critical changes, quick wins, structural improvements, and the Before/After examples.
- Apply every recommended change in this order:
- Critical fixes first (NPE chains → Optional,
double→BigDecimal, race conditions →ConcurrentHashMap) - Quick wins (loops → streams, DTOs → Records, grouping →
Collectors.groupingBy) - Structural improvements (virtual threads, sealed classes, pattern matching)
- Modern Java features (
var, method references, text blocks)
- Write the modernized file as
Modern.javaalongside the original. Never overwrite the original.
- Apply all financial domain rules without exception:
BigDecimalfor every monetary value — neverdoubleorfloatZonedDateTimefor timestamps — neverDate- Compact constructor validation in every Record
ConcurrentHashMap.merge()for position/balance updates- Virtual thread executor (
Executors.newVirtualThreadPerTaskExecutor())
- Add a header comment to the modernized file listing every change applied, referencing the original file name.
Output
After writing the file, report:
Implementation Summary
- Source:
.java - Output:
Modern.java - Changes applied: N
List each change applied, e.g.:
- [x]
getCounterpartyBalance— unguarded chain → Optional - [x]
getPendingHighValueTrades— for-loop → stream filter/collect - [x]
calculateNetExposure—doublearithmetic →BigDecimalstream reduction - [x]
groupByCounterparty— manual HashMap loop →Collectors.groupingBy - [x]
updatePosition—synchronizedHashMap →ConcurrentHashMap.merge() - [x]
executor— fixed thread pool → virtual thread executor - [x]
TradePosition— mutable inner class → Record with compact constructor validation - [x] Empty catch block — removed, exception propagates to caller
Final Modernization Score
Re-compute the full 9-dimension score for the implemented file and show the delta vs the Before score from analysis.md:
| Dimension | Before | After | |---|---|---| | NPE prevention | X/15 | X/15 | | Monetary precision | X/15 | X/15 | | Thread safety | X/15 | X/15 | | Streams / collections | X/10 | X/10 | | Exception handling | X/10 | X/10 | | Modern data carriers | X/10 | X/10 | | Concurrency model | X/10 | X/10 | | Modern Java features | X/10 | X/10 | | Financial domain rules | X/5 | X/5 | | TOTAL | X/100 | X/100 |
Improvement: +X points
Rules
- Never modify the original file.
- Never implement without
analysis.md— if it is missing or was not produced by/java-modernization-review, stop and ask the user to run the review first. - If the original file has already been modernized (a
*Modern.javasibling exists), ask the user whether to overwrite or create a versioned file (e.g.,*Modern2.java).
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Santoshrt999
- Source: Santoshrt999/Java-Claude-Skills
- License: MIT
- Homepage: https://github.com/Santoshrt999/Java-Claude-Skills
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.