You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
SkillScore91Maintained
Automatic
◆Coding pack
Last verified 8/29/2026
What it changes
Passed 20 of 22 test cases with the skill, and 19 of 22 without it.
Without skill86%
With skill91%
Checks it passed that the model alone missed
References the implementation playbook resource file
Includes test or verification notes addressing regression checking
Includes a section detailing proposed changes and expected structural impact
3 fixed17 passed either way0 still failing2 broke
Pass-rate lift
+5 pp
Tokens
+21%
Agent turns
0%
Response time
+3%
Model gemini-3.6-flashMeasured 8/29/2026v120 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
When advanced structural patterns or detailed refactoring playbooks are needed for complex object-oriented redesigns in this repository, where should developers look?
What was checked, without and with the skill
Checked
Without skill
With skill
References the implementation playbook resource file
Missed
Passed
case-14 · gemini-3.6-flash · 8/29/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md51 linessingle file
Refactor and Clean Code
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
Use this skill when
Refactoring tangled or hard-to-maintain code
Reducing duplication, complexity, or code smells
Improving testability and design consistency
Preparing modules for new features safely
Do not use this skill when
You only need a small one-line fix
Refactoring is prohibited due to change freeze
The request is for documentation only
Context
The user needs help refactoring code to make it cleaner, more maintainable, and aligned with best practices. Focus on practical improvements that enhance code quality without over-engineering.
Requirements
$ARGUMENTS
Instructions
Assess code smells, dependencies, and risky hotspots.
Propose a refactor plan with incremental steps.
Apply changes in small slices and keep behavior stable.
Update tests and verify regressions.
If detailed patterns are required, open resources/implementation-playbook.md.
Safety
Avoid changing external behavior without explicit approval.