Suggest and apply code refactorings to improve readability, maintainability, and code quality. Use this skill when improving existing code structure, eliminating code smells, applying design patterns, simplifying complex logic, extracting duplicated code, renaming for clarity, or preparing code for new features. Provides specific before/after examples, explains benefits, identifies risks, and ensures behavior preservation through tests.
76
67%
Does it follow best practices?
Impact
91%
1.26xAverage score across 3 eval scenarios
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/code-refactoring-assistant/SKILL.mdExtract Class and Parameter Object
Tests written first
50%
58%
Refactoring plan current state
100%
100%
Refactoring plan numbered steps
100%
100%
Refactoring plan risk and time
0%
40%
Address class extracted
100%
100%
Customer class extracted
100%
100%
Parameter object used in functions
100%
100%
Magic numbers replaced
0%
100%
Loop replaced with pipeline
0%
100%
Behavior preserved
100%
100%
Commit message Refactor prefix
50%
66%
Commit message Benefits section
0%
100%
Replace Conditional with Polymorphism and Guard Clauses
Tests before refactoring
100%
100%
Guard clauses applied
100%
100%
Polymorphism for payment types
100%
100%
Fee rates as named constants
0%
100%
Card number length as named constant
0%
100%
Refactoring plan structure
70%
70%
Behavior preserved
100%
100%
get_fee_description and get_required_fields refactored
100%
100%
Commit message Refactor prefix
50%
100%
Commit message Benefits section
0%
100%
Incremental refactoring workflow and documentation
Tests before changes
100%
100%
Multiple log steps
100%
100%
Tests-pass confirmation per step
100%
100%
Per-step commit messages
0%
0%
Guard clauses applied
100%
100%
Extract Method applied
100%
100%
Loops replaced with pipelines
100%
100%
Magic numbers as named constants
100%
100%
No new behavior added
100%
100%
Final commit Benefits section
0%
0%
No feature mixing
100%
100%
0f00a4f
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.