Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/Git & Pull Requests
github avatar

Java Refactoring Remove Parameter

github/awesome-copilotOfficial

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.

installs
8.9K
GitHub stars
40.5K
last updated
Aug 21, 2026
View on GitHubSave

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

Code After Refactoring 1:

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

Code Before Refactoring 2:

NodeImpl( long id, long firstRel, long firstProp )
{
     this( id, false );
}

Code After Refactoring 2:

NodeImpl( long id)
{
     this( id, false );
}

Safety Rules

  • Behaviour-preserving only. Remove a parameter only if it is truly unused or derivable (field, constant, other parameter); never remove one that is read, even if "redundant" by convention.
  • Baseline first: run the narrowest green test command (./mvnw -q -Dtest=MyTest test, ./gradlew test --tests MyTest) or ./mvnw verify / ./gradlew build, and re-run after the change. If the baseline is red, stop and report.
  • If the affected code has no tests, stop and report; propose characterization tests first. Never delete or weaken tests.
  • Find every usage before changing a signature: use LSP find-references (lsp-setup/jdtls) and grep across all modules, including tests. Also check:
    • overrides and interface implementors (@Override, abstract/default methods, functional interfaces, method references): the whole hierarchy must change together;
    • reflection and string-based lookups (getMethod, getDeclaredMethod, MethodHandle, proxies), and Spring/CDI/Quarkus/Jakarta annotated methods (@Bean, @EventListener, @Scheduled, @Inject, @Path, @Observes, @PostConstruct), which a compiler will not flag;
    • constructors used by serialization/deserialization or JPA/Jackson (@JsonCreator, @ConstructorBinding, readObject), and serialVersionUID impact;
    • XML/properties/YAML configuration and AOP pointcut expressions naming the method;
    • public or protected API consumed by other modules or published artifacts.
  • Ask the user before changing public/protected/published API (prefer deprecating and adding an overload) or touching generated code.
  • One parameter per step (one commit each when the user asks for commits). Prefer the jdtls Change Method Signature refactoring when available; otherwise update the declaration and all callers together.
  • Removing a parameter can make an overload collide with an existing signature or change overload resolution; check this. Evaluating the argument at the call site may have had side effects: keep them if they matter.

Task

Apply Remove Parameter to improve readability, coupling and consistency.

  1. Identify unused or derivable parameters.
  2. Remove each from the declaration and from all callers, then compile and run the tests.
  3. Add a one-line comment only where the removal is non-obvious; otherwise explain it in the report.
  4. Report parameters removed, callers updated, the commands run and their results, and anything left unverified (e.g. reflective or external callers).

Code to be Refactored:

Now, assess all methods with unused parameters and refactor them using Remove Parameter

SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

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
  • Create Github Issue Feature From Specification8.9K
  • Suggest Awesome Github Copilot Skills8.9K
  • Legacy Circuit Mockups8.9K
  • Containerize Aspnetcore8.9K
  • Power Bi Performance Troubleshooting8.9K
  • Vscode Ext Localization8.9K
  • Terraform Azurerm Set Diff Analyzer8.9K
  • Make Skill Template8.9K
  • Php Mcp Server Generator8.9K
  • Comment Code Generate A Tutorial8.9K
  • Csharp Mstest8.9K
  • Azure Resource Visualizer8.9K
  • Csharp Tunit8.8K
  • Code Exemplars Blueprint Generator8.8K
  • Structured Autonomy Plan8.8K
  • Update Llms8.8K
  • Workiq Copilot8.8K
  • Mcp Deploy Manage Agents8.8K
  • Bigquery Pipeline Audit8.8K
  • Create Tldr Page8.8K
  • Java Mcp Server Generator8.8K
  • Mkdocs Translations8.8K
  • Copilot Cli Quickstart8.8K
  • Suggest Awesome Github Copilot Agents8.8K

Recommended

More Git & Pull Requests
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.9Kinstalls
2github avatarcontainerize-aspnetcoregithub/awesome-copilotContainerize an ASP.NET Core project by creating Dockerfile and .dockerfile files customized for the project.8.9Kinstalls
3github 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.9Kinstalls
4github avatarvscode-ext-localizationgithub/awesome-copilotGuidelines for proper localization of VS Code extensions, following VS Code extension development guidelines, libraries and good practices8.9Kinstalls
5github 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.9Kinstalls
6github 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.9Kinstalls