java-refactoring-remove-parameter
Refactoring using Remove Parameter in Java Language
Best use case
java-refactoring-remove-parameter is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Refactoring using Remove Parameter in Java Language
Teams using java-refactoring-remove-parameter should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/java-refactoring-remove-parameter/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How java-refactoring-remove-parameter Compares
| Feature / Agent | java-refactoring-remove-parameter | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Refactoring using Remove Parameter in Java Language
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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:
```java
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:
```java
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:
```java
NodeImpl( long id, long firstRel, long firstProp )
{
this( id, false );
}
```
## Code After Refactoring 2:
```java
NodeImpl( long id)
{
this( id, false );
}
```
## 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 ```java``` 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**Related Skills
hexagonal-architecture-layers-java
Hexagonal architecture layering for Java services with strict boundaries. Trigger: When structuring Java apps by Domain/Application/Infrastructure, or refactoring toward clean architecture.
code-refactoring-tech-debt
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti
azure-monitor-query-java
Azure Monitor Query SDK for Java. Execute Kusto queries against Log Analytics workspaces and query metrics from Azure resources.
azure-monitor-opentelemetry-exporter-java
Azure Monitor OpenTelemetry Exporter for Java. Export OpenTelemetry traces, metrics, and logs to Azure Monitor/Application Insights.
azure-monitor-ingestion-java
Azure Monitor Ingestion SDK for Java. Send custom logs to Azure Monitor via Data Collection Rules (DCR) and Data Collection Endpoints (DCE).
azure-identity-java
Azure Identity Java SDK for authentication with Azure services. Use when implementing DefaultAzureCredential, managed identity, service principal, or any Azure authentication pattern in Java applic...
azure-eventhub-java
Build real-time streaming applications with Azure Event Hubs SDK for Java. Use when implementing event streaming, high-throughput data ingestion, or building event-driven architectures.
azure-eventgrid-java
Build event-driven applications with Azure Event Grid SDK for Java. Use when publishing events, implementing pub/sub patterns, or integrating with Azure services via events.
azure-data-tables-java
Build table storage applications with Azure Tables SDK for Java. Use when working with Azure Table Storage or Cosmos DB Table API for NoSQL key-value data, schemaless storage, or structured data at...
azure-cosmos-java
Azure Cosmos DB SDK for Java. NoSQL database operations with global distribution, multi-model support, and reactive patterns.
azure-compute-batch-java
Azure Batch SDK for Java. Run large-scale parallel and HPC batch jobs with pools, jobs, tasks, and compute nodes.
azure-communication-sms-java
Send SMS messages with Azure Communication Services SMS Java SDK. Use when implementing SMS notifications, alerts, OTP delivery, bulk messaging, or delivery reports.