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.mdQuality
Discovery
92%Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.
This is a strong skill description that clearly articulates specific refactoring capabilities and provides explicit trigger guidance with the 'Use this skill when' clause. It uses appropriate third-person voice and includes natural developer terminology. The only minor weakness is potential overlap with other code improvement or review skills, though the refactoring focus helps distinguish it.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Lists multiple specific concrete actions: 'improving existing code structure, eliminating code smells, applying design patterns, simplifying complex logic, extracting duplicated code, renaming for clarity, preparing code for new features' plus outputs like 'before/after examples, explains benefits, identifies risks, ensures behavior preservation through tests.' | 3 / 3 |
Completeness | Clearly answers both what ('Suggest and apply code refactorings to improve readability, maintainability, and code quality') AND when ('Use this skill when improving existing code structure, eliminating code smells, applying design patterns...'). Has explicit 'Use this skill when' clause with multiple trigger scenarios. | 3 / 3 |
Trigger Term Quality | Includes natural keywords users would say: 'refactoring', 'code smells', 'design patterns', 'duplicated code', 'renaming', 'readability', 'maintainability', 'code quality'. These are terms developers naturally use when seeking refactoring help. | 3 / 3 |
Distinctiveness Conflict Risk | While focused on refactoring specifically, there's potential overlap with general code review skills, code improvement skills, or design pattern skills. The refactoring focus is clear but 'improving code' and 'code quality' are somewhat broad terms that could trigger alongside other code-related skills. | 2 / 3 |
Total | 11 / 12 Passed |
Implementation
42%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
This skill has excellent actionability with concrete, executable code examples and clear before/after patterns. However, it severely violates token efficiency by explaining concepts Claude already knows (code smells, basic refactoring definitions) and presenting everything in one massive file. The content would be far more effective if condensed to essential patterns with references to detailed guides.
Suggestions
Reduce content by 70-80% by removing explanations of concepts Claude already knows (what code smells are, basic OOP principles, why refactoring matters)
Split into multiple files: keep SKILL.md as a concise overview with links to PATTERNS.md, ANTI_PATTERNS.md, and LANGUAGE_SPECIFIC.md
Remove the 'Benefits' and 'When to use' sections for each pattern - Claude can infer these; keep only the before/after code examples
Add specific validation commands in the workflow (e.g., 'Run: pytest --tb=short' or 'Run: git diff --stat') instead of generic 'run tests' guidance
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | Extremely verbose at ~600+ lines. Explains basic concepts Claude already knows (what code smells are, what Extract Method means, basic OOP). Contains extensive examples that could be condensed significantly. Much content is textbook-level explanation rather than actionable guidance. | 1 / 3 |
Actionability | Provides fully executable, copy-paste ready code examples throughout. Before/after patterns are concrete and complete. The refactoring patterns section contains real, working Python code that demonstrates each technique clearly. | 3 / 3 |
Workflow Clarity | Has a 5-step workflow with checklists, but validation steps are generic ('run tests', 'code review') rather than specific commands. Missing explicit feedback loops for error recovery. The workflow is present but could be tighter with specific validation commands. | 2 / 3 |
Progressive Disclosure | Monolithic wall of text with no references to external files. All content is inline despite being far too long for a single skill file. No navigation structure or links to separate detailed guides for specific refactoring patterns. | 1 / 3 |
Total | 7 / 12 Passed |
Validation
90%Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.
Validation — 10 / 11 Passed
Validation for skill structure
| Criteria | Description | Result |
|---|---|---|
skill_md_line_count | SKILL.md is long (979 lines); consider splitting into references/ and linking | Warning |
Total | 10 / 11 Passed | |
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.