CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

refactoring-expert

Systematic code refactoring following Martin Fowler's catalog. Methodologies: characterization tests, Red-Green-Refactor, incremental transformation. Capabilities: SOLID compliance, DRY cleanup, code smell detection, complexity reduction, legacy modernization, design patterns, functional programming patterns. Actions: refactor, extract, inline, rename, move, simplify code. Keywords: refactor, SOLID, DRY, code smell, complexity, extract method, inline, rename, move, clean code, technical debt, legacy code, design pattern, characterization test, Red-Green-Refactor, functional programming, higher-order function, immutability, pure function, composition, currying, side effects. Use when: improving code quality, reducing technical debt, applying SOLID principles, fixing DRY violations, removing code smells, modernizing legacy code, applying design patterns.

Quality

84%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

63%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is well-structured with an excellent progressive-disclosure architecture (verified against the actual bundle: four real reference files, one level deep) and a clear phased workflow. It is weakened by redundant/padded sections that restate frontmatter or common knowledge, and by methodological guidance that never becomes concrete — no example refactoring, no specific metrics commands.

Suggestions

Cut the 'Triggers' section (it duplicates the frontmatter description), the 'Technical Debt Types' concept explanation, and the 'Automated Tooling' tool name-drops; link each reference once at its point of use instead of three times.

Add one concrete before/after example (e.g., an Extract Method or loop-to-map/filter/reduce transformation) and a specific metrics command (e.g., `radon cc file.py` or an ESLint complexity flag) so Phases 1 and 5 are executable rather than directional.

Add an explicit failure-recovery step to the protocol, such as 'If any test fails after a micro-step, revert that step before proceeding', to close the validation feedback loop.

DimensionReasoningScore

Conciseness

The protocol, boundaries, and output format earn their place, but the Triggers section duplicates the frontmatter description, 'Technical Debt Types' explains a concept Claude already knows, 'Automated Tooling' merely names familiar tools, and each reference is linked three times (Protocol, Quick Reference/section body, Resources). This is more than minor trimming, matching the 'mostly efficient but includes some unnecessary explanation' anchor rather than anchor 4's 'minor instances'.

3 / 5

Actionability

The only executable commands are the grep examples in 'Finding Specific Content'; the phases give direction ('Measure baseline metrics (complexity, duplication, coupling)') without any concrete tool or command, and there is no before/after code example of any refactoring. This matches anchor 3 ('some concrete guidance but incomplete; missing key details') rather than 4, since the guidance is methodological rather than executable.

3 / 5

Workflow Clarity

The 5-phase protocol is clearly sequenced with explicit validation checkpoints ('Run full test suite after each micro-step', Phase 5 compares metrics to baseline and verifies behavior preservation). It falls short of anchor 5 because there is no explicit error-recovery branch (e.g., 'if tests fail after a step, revert before continuing').

4 / 5

Progressive Disclosure

All four referenced files exist as substantive one-level-deep resources, are clearly signaled with contextual markdown links at the point of need, and are supported by a grep-based discovery section; inline content is orientation-level summary only, with bulk detail correctly pushed to references. This matches the anchor 5 example structure.

5 / 5

Total

15

/

20

Passed

Description

96%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, highly triggerable description that explicitly covers what the skill does and when to use it with comprehensive natural keywords. Its only weakness is mild keyword-list verbosity and a few broad terms ('improve code quality', 'simplify code') that slightly raise conflict risk with adjacent skills.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions ('refactor, extract, inline, rename, move, simplify code') plus specific capabilities ('SOLID compliance, DRY cleanup, code smell detection, complexity reduction, legacy modernization'), giving comprehensive coverage with no vague filler.

5 / 5

Completeness

It explicitly answers both questions: a clear 'what' (systematic refactoring with named methodologies and capabilities) and an explicit 'Use when: improving code quality, reducing technical debt, applying SOLID principles, fixing DRY violations, removing code smells, modernizing legacy code, applying design patterns' trigger clause.

5 / 5

Trigger Term Quality

The keyword list is comprehensive and natural — 'refactor', 'technical debt', 'legacy code', 'code smell', 'clean code', 'extract method', 'characterization test', 'currying' — with synonyms covered, matching what users would actually say when needing this skill.

5 / 5

Distinctiveness Conflict Risk

The Fowler/Red-Green-Refactor/characterization-test identity is a distinct niche, but broad phrases like 'improving code quality' and 'simplify code' create minor overlap risk with general code-quality, code-review, or clean-code skills.

4 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

samhvw8/dot-claude

Path

skills/refactoring-expert/SKILL.md

Reviewed

Table of Contents

Is this your skill?

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.