refactor-method-complexity-reduce
Refactor a method to reduce cognitive complexity by extracting helper methods.
What it does
- Nested conditional statements
- Multiple if-else or switch chains
- Repeated code blocks
- Multiple loops with conditions
- Complex boolean expressions
- Validation logic that can be extracted into a separate method
- Type-specific or case-specific processing that repeats
Requirements & configuration
- Make helper methods static when they don't need instance state
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
Refactor a method to reduce cognitive complexity by extracting helper methods.
Source
Repository: https://github.com/github/awesome-copilot
refactor-method-complexity-reduce FAQ
What does the refactor-method-complexity-reduce skill do?
Refactor given method `${input:methodName}` to reduce its cognitive complexity to `${input:complexityThreshold}` or below, by extracting helper methods. Nested conditional statements Multiple if-else or switch chains
What does refactor-method-complexity-reduce require?
Make helper methods static when they don't need instance state
How do I install refactor-method-complexity-reduce?
Run: npx -y skills add https://github.com/github/awesome-copilot --skill refactor-method-complexity-reduce --agent claude-code — the source lives at github.com/github/awesome-copilot.
Maintain refactor-method-complexity-reduce?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/github-awesome-copilot-refactor-method-complexity-reduce?ref=badge) npx agentictools info skills/github-awesome-copilot-refactor-method-complexity-reduce The second line is the CLI lookup for this page — handy in READMEs and docs.