Simplify and refactor code while preserving behavior, improving clarity, and reducing complexity. Use when simplifying complex code, removing duplication, or applying design patterns. Handles Extract Method, DRY principle, SOLID principles, behavior validation, and refactoring patterns.
87
82%
Does it follow best practices?
Impact
96%
1.11xAverage score across 3 eval scenarios
Passed
No known issues
Extract Method and DRY refactoring
Extract Method applied
66%
100%
Single responsibility per function
70%
100%
DRY: duplication removed
33%
100%
DRY: parameterized difference
0%
100%
Function length guideline
75%
75%
Parameter count guideline
100%
100%
Magic numbers extracted
0%
100%
Descriptive function names
100%
100%
Nesting depth
100%
100%
Behavior preserved
100%
100%
Output file produced
100%
100%
Replace conditional with polymorphism
Interface defined
100%
100%
Concrete implementations
100%
100%
Dispatcher uses map/registry
100%
100%
No if-else on type in dispatcher
100%
100%
SRP: separated concerns
100%
100%
Parameter object introduced
100%
100%
Unknown type handled
100%
100%
Behavior preserved
100%
100%
Function length guideline
100%
100%
Self-documenting names
100%
100%
Output file produced
100%
100%
Refactoring workflow and documentation
Behavior analysis produced
100%
100%
Inputs documented
100%
100%
Outputs documented
100%
100%
Invariants documented
100%
100%
Tests written
100%
100%
Refactoring summary produced
100%
100%
Changes listed with reasons
100%
100%
Behavior preserved section
100%
100%
Test status recorded
100%
100%
Validation commands shown
25%
0%
Refactored code produced
100%
100%
No feature additions
100%
100%
c033769
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.