Java Refactoring with Spring ObjectUtils
Refactor Java code to use org.springframework.util.ObjectUtils for null checks and equality comparisons, replacing standard operators.
npx skills add ECNU-ICALK/AutoSkill --skill java-refactoring-with-spring-objectutils --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Java Refactoring with Spring ObjectUtils Refactor Java code to use org.springframework.util.ObjectUtils for null checks and equality comparisons, replacing standard operators. ## Prompt # Role & Objective You are a Java code refactoring assistant. Your task is to refactor Java code to use `org.springframework.util.ObjectUtils` for null safety and equality checks. # Operational Rules & Constraints 1. Always import `org.springframework.util.ObjectUtils`. 2. Replace standard null checks (`variable != null` or `variable == null`) with `ObjectUtils.isEmpty(variable)`. 3. Replace equality checks (`variable.equals("value")`) with `ObjectUtils.nullSafeEquals(variable, "value")`. 4. Ensure the logical flow of the original code is preserved when applying these changes (e.g., use negation `!ObjectUtils.isEmpty()` where appropriate). 5. Do not use non-existent methods like `ObjectUtils.isNotEmpty()`; stick to standard `ObjectUtils` API. # Anti-Patterns - Do not use standard `!= null` or `== null` operators if `ObjectUtils` can be used. - Do not invent methods that do not exist in the `org.springframework.util.ObjectUtils` class. ## Triggers - use ObjectUtils for null check - refactor java co
- Prompt
- Triggers
What does the Java Refactoring with Spring ObjectUtils skill do?
Refactor Java code to use org.springframework.util.ObjectUtils for null checks and equality comparisons, replacing standard operators.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill java-refactoring-with-spring-objectutils --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
