/java-kotlin-development:java-refactoring-remove-parameterfrom java-kotlin-development
Refactors Java 17 methods by removing unused or redundant parameters, updating signatures and call sites, and returning complete compilable code.
Ships in java-kotlin-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply the Remove Parameter refactoring to Java methods by identifying parameters that are unused or redundant, updating signatures and internal calls, and returning complete Java 17 code that preserves behavior.
A parameter qualifies for removal only when at least one condition is true and no blocker applies.
| Condition | Evidence | Example |
|---|---|---|
| Unused | The parameter is never referenced in the method body, nested lambdas, anonymous classes, or delegated calls. | firstRel and firstProp are not used in NodeImpl(long id, long firstRel, long firstProp). |
| Redundant | The same value is already available from a trusted object, field, constant, or method call. | isCloud can be removed when the callee can derive cloud state from context.getCloudCluster(). |
| Always ignored downstream | The parameter is passed only to calls whose matching parameter is also removed. | getGroupCommitLoadBeId(tableId, context.getCloudCluster(), isCloud) becomes getGroupCommitLoadBeId(tableId, context.getCloudCluster()). |
| Blocker | Why it blocks removal |
|---|---|
| Public API compatibility is required | Removing a parameter changes binary/source compatibility. Provide an overload instead if compatibility is required. |
| Reflection, serialization, framework binding, or annotations depend on the signature | Frameworks may call the method by exact signature. |
| Parameter participates in overload resolution | Removing it can create ambiguity or call a different overload. |
| Parameter is documented as part of behavior | Update documentation and callers only when behavior is truly redundant. |
LoadException and DdlException.java code block when the user asks for code transformation.Before:
public Backend selectBackendForGroupCommit(long tableId, ConnectContext context, boolean isCloud)
throws LoadException, DdlException {
if (!Env.getCurrentEnv().isMaster()) {
try {
long backendId = new MasterOpExecutor(context)
.getGroupCommitLoadBeId(tableId, context.getCloudCluster(), isCloud);
return Env.getCurrentSystemInfo().getBackend(backendId);
} catch (Exception e) {
throw new LoadException(e.getMessage());
}
} else {
return Env.getCurrentSystemInfo()
.getBackend(selectBackendForGroupCommitInternal(tableId, context.getCloudCluster(), isCloud));
}
}
After:
// Removed isCloud because cloud state is derived from context.getCloudCluster().
public Backend selectBackendForGroupCommit(long tableId, ConnectContext context)
throws LoadException, DdlException {
if (!Env.getCurrentEnv().isMaster()) {
try {
long backendId = new MasterOpExecutor(context)
.getGroupCommitLoadBeId(tableId, context.getCloudCluster());
return Env.getCurrentSystemInfo().getBackend(backendId);
} catch (Exception e) {
throw new LoadException(e.getMessage());
}
} else {
return Env.getCurrentSystemInfo()
.getBackend(selectBackendForGroupCommitInternal(tableId, context.getCloudCluster()));
}
}
Before:
NodeImpl( long id, long firstRel, long firstProp )
{
this( id, false );
}
After:
// Removed firstRel and firstProp because this constructor delegates without using them.
NodeImpl(long id)
{
this(id, false);
}
```java
// Removed <parameter> because <reason>.
<complete refactored Java 17 method or constructor>
## Quality gate
- [ ] Every removed parameter is unused or redundant by explicit evidence.
- [ ] No behavior, exception, return value, or side effect is removed.
- [ ] Method signatures and visible internal call sites are updated consistently.
- [ ] A one-line comment above each modified method explains the removed parameter and reason.
- [ ] Output is a single `java` code block containing complete compilable Java 17 code.
- [ ] Compatibility, reflection, framework binding, and overload blockers were considered.
What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/create-spring-boot-kotlin-projectCreate a Spring Boot Kotlin project skeleton from Spring Initializr with Gradle Kotlin DSL, Java 21, WebFlux, reactive data dependencies, SpringDoc, ArchUnit, and local Redis/PostgreSQL/MongoDB Docker services. Use when asked to create or scaffold a Spring Boot Kotlin project./java-add-graalvm-native-image-supportGraalVM Native Image expert that adds native image support to Java applications, builds the project, analyzes build errors, applies fixes, and iterates until successful compilation using Oracle best practices. Use this skill when the user asks for graalvm native image agent./java-helidonApply Helidon 4 SE and MP best practices for Java 21 applications, including routing, DB Client, Jakarta and MicroProfile APIs, configuration, security, observability, and tests. Use when working with Helidon SE, Helidon MP, HttpService, HttpRules, MicroProfile Config, Helidon DB Client, Helidon Security, or Helidon testing./java-refactoring-extract-methodRefactor Java 17 methods with the Extract Method technique to improve readability, testability, maintainability, reusability, modularity, cohesion, low coupling, and consistency. Use when the user asks to identify long or complex Java methods, extract helper methods, preserve behavior, and return complete compilable refactored code./javax-to-jakarta-migrationMigrate Java applications from `javax.*` APIs to `jakarta.*` APIs for Tomcat 11, Jakarta EE 10+, and framework upgrades. Use this skill when `javax` imports are detected, dependencies need Jakarta coordinates, `web.xml` namespaces must change, or compile errors follow a Jakarta migration./kotlin-springbootBuild, review, and test idiomatic Spring Boot applications written in Kotlin. Use this skill when the user asks for Spring Boot with Kotlin best practices, Kotlin JPA entities, coroutine controllers, configuration properties, validation, logging, or test slices.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin java-kotlin-developmentOther plugins' skills for the same job