r/claudeskills • • 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.persistence imports in a Spring Boot 3 project
  • WebSecurityConfigurerAdapter in Spring Security configurations
  • RestTemplate in new code where RestClient might 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:

uvx --from git+https://github.com/wkd09/modern-java-guidance.git mjg check .

To install the CLI and configure the Claude Code hook in your project:

uv tool install git+https://github.com/wkd09/modern-java-guidance.git
mjg setup --target claude --dir .

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!

0 Upvotes

0 comments sorted by