PlugWiki

Java Remove Parameter skill for Claude Code: safe refactoring of unused parameters

A skill that makes Claude apply the Remove Parameter refactoring to Java methods, with tests run before and after.

Installs
8.9K
on skills.sh
Stars
40.7K
on GitHub
Updated
Oct 2026
last repo commit

java-refactoring-remove-parameter makes Claude find Java methods with unused or derivable parameters, remove each one from the declaration and every caller, then compile and run the tests. It opens with two before-and-after examples, then a list of safety rules.

It runs your Maven or Gradle test commands and edits your source files. It stops if the baseline tests are red or the code has no tests, and it asks before changing public or protected API.

Good for

  • Java developers cleaning up methods with unused parameters
  • Reviewers who want small, one-parameter-at-a-time refactoring changes
  • Teams that want a refactor to stop when there are no tests

Install java-refactoring-remove-parameter

Claude Code

  1. 1

    Copy this prompt.

    Install the java-refactoring-remove-parameter skill in Claude Code. Run this command:
    
    npx skills add https://github.com/github/awesome-copilot --skill java-refactoring-remove-parameter
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

The skills CLI and folder routes copy this one skill folder.

From the vendor's docs. Source.

What's in the skill

When it loads

Refactoring using Remove Parameter in Java Language

Sections in SKILL.md

  1. Role
  2. Code Before Refactoring 1:
  3. Code After Refactoring 1:
  4. Code Before Refactoring 2:
  5. Code After Refactoring 2:
  6. Safety Rules
  7. Task
  8. Code to be Refactored:

Key facts

Installs on skills.sh
8,918 as of 2026-11-02
Last change to this skill
2026-10-30
What is inside
1 file: SKILL.md

What it includes

  • Finds parameters that are unused or derivable from a field, constant or other parameter.

    Identify unused parameters

  • Runs the narrowest green test command first, and stops if the baseline is red.

    SKILL.md gives ./mvnw -q -Dtest=MyTest test, ./gradlew test --tests MyTest, ./mvnw verify and ./gradlew build as examples. It re-runs them after the change.

    Runs code · Baseline first

  • Searches all modules and tests, with LSP find-references and grep.

    SKILL.md also lists overrides, reflection and string lookups, Spring/CDI/Quarkus/Jakarta annotated methods, serialization constructors, XML/properties/YAML config, AOP pointcuts and public or protected API.

    Read · Find every usage

  • Edits the declaration and all callers together, one parameter per step.

    Try: “Use java-refactoring-remove-parameter on the OrderService class and remove its unused parameters.”

    Write · Remove the parameter

  • Asks you first for public, protected or published API and generated code.

    Ask before public API changes

  • Stops and proposes characterization tests when the code has no tests.

    Stop without tests

  • Reports parameters removed, callers updated, commands run and anything left unverified.

    Report

From the official docs

Permissions

Medium risk

It edits Java source files across your project and runs your build. Use a clean branch, name the class you want cleaned up, and review the diff.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It edits many files at once

    Removing a parameter changes the declaration, callers, overrides and implementors across modules. Use a clean branch and review the diff. github.com

  • The compiler will not catch every caller

    SKILL.md names reflection, string lookups, annotated framework methods, serialization constructors and XML, properties or YAML config as places a compiler will not flag. It asks the agent to report anything left unverified. github.com

  • It runs your build and test commands

    SKILL.md gives ./mvnw and ./gradlew commands as examples, before and after the change. Those run whatever your project configures. github.com

Technical details
Scopes
  • Edits Java method declarations and every caller, including tests

  • Runs Maven or Gradle commands such as ./mvnw verify and ./gradlew build

Questions

What does the Java Remove Parameter skill do?

It makes Claude remove unused or derivable parameters from Java methods. It updates the declaration and all callers, compiles, runs the tests and reports what it did.

How do I install it in Claude Code or Codex?

Use the install box above. It copies this one skill folder, or you can use the gh skills install command from the awesome-copilot skills index.

What counts as a parameter it may remove?

One that is truly unused or derivable from a field, a constant or another parameter. SKILL.md says never to remove one that is read, even if it looks redundant.

What does it do when there are no tests?

It stops and reports, and proposes characterization tests first. SKILL.md also says never to delete or weaken tests.

Will it change my public API?

Not without asking. SKILL.md says to ask before changing public, protected or published API, and prefers deprecating the old method and adding an overload.

Does it commit for me?

It works one parameter per step, with one commit each when you ask for commits.

Is it safe?

It edits Java source files and runs your build and test commands. SKILL.md ends by asking the agent to assess all methods with unused parameters. Our advice: run it on a branch with a clean working tree, name the class or package you want cleaned up, and read the diff.

Information

updated Nov 2, 2026

Folder
skills/java-refactoring-remove-parameter

github/awesome-copilotskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. awesome-copilot skills index · github.com
  2. java-refactoring-remove-parameter SKILL.md · github.com
  3. awesome-copilot LICENSE · github.com
  4. skills.sh listing · skills.sh

Updated Nov 2, 2026.