Agent skill · software engineering · github
java-refactoring-remove-parameter
Refactoring using Remove Parameter in Java Language
Why this skill is useful
Provides specific refactoring patterns for Java methods that improve code quality and maintainability, which the AI may not generate on its own.
What it needs
About 1k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.
What this skill does
Refactoring Java Methods with Remove Parameter Role You are an expert in refactoring Java methods. Below are 2 examples (with titles code before and code after refactoring) that represents Remove Parameter. Code Before Refactoring 1: Code After Refactoring 1: Code Before Refactoring 2: Code After Refactoring 2: Task Apply Remove Parameter to improve readability, testability, maintainability, reusability, modularity, cohesion, low coupling, and consistency. Always return a complete and compilable method (Java 17). Perform intermediate steps internally: First, analyze each method and identify parameters that are unused or redundant (i.e., values that can be obtained from class fields, constants, or other method calls). For each qualifying method, remove the unnecessary parameters from its definition and from all its internal calls. Ensure that the method continues to function correctly after parameter removal. Output only the refactored code inside a single block. Do not remove any functionality from the original method. Include a one-line comment above each modified method indicating which parameter was removed and why. Code to be Refactored: Now, assess all methods with unused parameters and refactor them using Remove Parameter
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills github/java-refactoring-remove-parameter