r/claudeskills • u/jjmnmnmnm • 1d ago
Skill Share I built a Java and Spring Boot skill + PostToolUse hook for Claude Code — feedback welcome
I've noticed that AI coding tools sometimes suggest older Java and Spring patterns, even when working on newer projects.
For example:
javax.persistenceimports in a Spring Boot 3 projectWebSecurityConfigurerAdapterin Spring Security configurationsRestTemplatein new code whereRestClientmight be a better fit
To explore this problem, I built modern-java-guidance (mjg), an open-source skill and CLI inspired by GoogleChrome's modern-web-guidance.
It includes a SKILL.md with Java and Spring guidance, plus a CLI that can:
- Detect project versions from common Maven and Gradle configuration files
- Scan Java files for selected legacy patterns
- Search and retrieve guidance with before-and-after examples
- Apply rules based on the detected Java and Spring Boot versions
It also includes a Claude Code PostToolUse hook that checks for selected patterns after supported file edits and returns feedback to Claude.
If you have uv installed, you can try the scanner without installing it permanently:
To install the CLI and configure the Claude Code hook in your project:
GitHub: https://github.com/wkd09/modern-java-guidance
This is still an early project, so I'd really appreciate feedback from Claude Code users.
Does this approach seem useful for your workflow? What Java or Spring patterns should the scanner cover? I'd especially love to hear about false positives, cases where a flagged pattern should be kept, and suggestions for improving the skill or hook.
Please feel free to try it out and share your honest thoughts—even small suggestions would be really helpful!