github avatar

Java Refactoring Remove Parameter

Claude Code's java-refactoring-remove-parameter skill identifies and removes unused or redundant parameters from Java methods to improve code readability and maintainability. It is designed for Java developers who want to refactor their codebase by eliminating unnecessary method parameters that can be derived from class fields, constants, or other method calls. The skill solves the problem of parameter bloat and complexity by analyzing methods, removing superfluous parameters from both method definitions and their internal calls, while ensuring the refactored code remains functionally equivalent and compilable.

skills.sh installs
8.9K
GitHub stars
41K
last updated
Aug 21, 2026

Install

$ npx -y skills add github/awesome-copilot --skill java-refactoring-remove-parameter --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

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));
    }
}

Sponsors

Details

Repository
github.com/github/awesome-copilot
Categories
Git & Pull Requests, Code Review & Quality, AI & Agent Building, Java & JVM

More from github/awesome-copilot

All 318
1github avatarlegacy-circuit-mockupsgithub/awesome-copilotGenerate breadboard circuit mockups and visual diagrams using HTML5 Canvas drawing techniques. Use when asked to create circuit layouts, visualize electronic co8.9Kskills.sh installs
2github avatarpower-bi-performance-troubleshootinggithub/awesome-copilotSystematic Power BI performance troubleshooting prompt for identifying, diagnosing, and resolving performance issues in Power BI models, reports, and queries.8.9Kskills.sh installs
3github avatarcontainerize-aspnetcoregithub/awesome-copilotContainerize an ASP.NET Core project by creating Dockerfile and .dockerfile files customized for the project.8.9Kskills.sh installs
4github avatarphp-mcp-server-generatorgithub/awesome-copilotGenerate a complete PHP Model Context Protocol server project with tools, resources, prompts, and tests using the official PHP SDK8.9Kskills.sh installs
5github avatarvscode-ext-localizationgithub/awesome-copilotGuidelines for proper localization of VS Code extensions, following VS Code extension development guidelines, libraries and good practices8.9Kskills.sh installs
6github avatarmake-skill-templategithub/awesome-copilotCreate new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a ski8.9Kskills.sh installs