java-refactoring-extract-method

Java method extraction refactoring for improved readability and maintainability.

github ↓ 9.1k
Claude Code
View source ↗

What it does

  • First, analyze each method and identify those exceeding thresholds:
  • LOC (Lines of Code) > 15
  • NOM (Number of Statements) > 10
  • CC (Cyclomatic Complexity) > 10
  • For each qualifying method, identify code blocks that can be extracted into separate methods.
  • Extract at least one new method with a descriptive name.
  • Output only the refactored code inside a single java block.

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

Java method extraction refactoring for improved readability and maintainability.

Source

Repository: https://github.com/github/awesome-copilot

java-refactoring-extract-method FAQ

What does the java-refactoring-extract-method skill do?

Refactoring using Extract Methods in Java Language First, analyze each method and identify those exceeding thresholds: LOC (Lines of Code) > 15

How do I install java-refactoring-extract-method?

Run: npx -y skills add https://github.com/github/awesome-copilot --skill java-refactoring-extract-method --agent claude-code — the source lives at github.com/github/awesome-copilot.

Maintain java-refactoring-extract-method?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

java-refactoring-extract-method on getagentictools
[![java-refactoring-extract-method on getagentictools](https://getagentictools.com/badge/skills/github-awesome-copilot-java-refactoring-extract-method.svg)](https://getagentictools.com/skills/github-awesome-copilot-java-refactoring-extract-method?ref=badge)
npx agentictools info skills/github-awesome-copilot-java-refactoring-extract-method

The second line is the CLI lookup for this page — handy in READMEs and docs.