CtrlK
BlogDocsLog inGet started
Tessl Logo

refactor

Safely refactor code while preserving behavior

59

1.00x
Quality

40%

Does it follow best practices?

Impact

91%

1.00x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./music-analytics-api-with-db-routed/.claude/skills/refactor/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

57%

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

This is a reasonably structured refactoring skill with a clear before/during/after workflow and a concrete example. However, it stays at a generic instruction level without specifying concrete tool usage (e.g., specific test commands, diff review commands) and lacks explicit error recovery steps when tests fail after refactoring. Some content states things Claude already knows about good engineering practice.

Suggestions

Add specific tool/command examples for running tests and reviewing diffs (e.g., `pytest path/to/tests.py`, using Bash tool to check diffs) instead of generic 'run tests' instructions.

Add an explicit feedback loop: what to do when tests fail after refactoring (revert the change, diagnose, fix, re-run), which is critical for a 'safe refactoring' skill.

Trim generic advice Claude already knows (e.g., 'Understand the current behavior completely', 'Add clear docstrings') to focus on the specific refactoring protocol and constraints.

DimensionReasoningScore

Conciseness

Mostly efficient but includes some unnecessary phrasing like 'Use this skill when you need to refactor existing code' and 'Understand the current behavior completely' which are things Claude already knows. Some bullet points could be tightened.

2 / 3

Actionability

Provides a concrete Python example for helper extraction, but the workflow steps are generic instructions rather than executable commands. 'Run tests' and 'Review the diff' lack specific commands or tool invocations. The example code is illustrative but uses undefined functions (transform, valid, calculate).

2 / 3

Workflow Clarity

The before/during/after structure provides a clear sequence, but validation checkpoints are implicit ('run tests again') without specifying how to run them or what to do on failure. There's no explicit feedback loop for when tests fail after refactoring.

2 / 3

Progressive Disclosure

For a simple, single-purpose skill under 50 lines with no bundle files, the content is well-organized into clear sections (When to Use, Before, During, After, Example) with logical flow. No external references are needed for this scope.

3 / 3

Total

9

/

12

Passed

Description

22%

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

The description is a brief, high-level tagline that fails to enumerate specific refactoring actions, lacks a 'Use when...' clause, and provides minimal trigger term coverage. While 'refactor' is a useful keyword, the description is too vague and incomplete to reliably distinguish this skill from general coding or code-review skills in a large skill library.

Suggestions

Add a 'Use when...' clause with explicit triggers, e.g., 'Use when the user asks to refactor, restructure, rename, extract methods, reduce duplication, or clean up code.'

List specific concrete actions the skill performs, such as 'extract functions/methods, rename symbols, inline variables, move modules, simplify conditionals, and remove dead code.'

Include natural keyword variations users might say, like 'clean up', 'restructure', 'DRY up', 'simplify', 'decompose', or 'modularize'.

DimensionReasoningScore

Specificity

The description uses vague language — 'safely refactor code while preserving behavior' names a general goal but lists no concrete actions (e.g., extract method, rename variable, inline function, move class). It reads more like a tagline than a capability list.

1 / 3

Completeness

The description partially addresses 'what' (refactor code) but is vague, and there is no 'Use when...' clause or equivalent explicit trigger guidance. Per the rubric, a missing 'Use when' clause caps completeness at 2, and the weak 'what' brings it to 1.

1 / 3

Trigger Term Quality

The term 'refactor' is a natural keyword users would say, but the description misses common variations and related terms like 'rename', 'extract method', 'restructure', 'clean up code', 'DRY', 'reduce duplication', or specific language contexts.

2 / 3

Distinctiveness Conflict Risk

The word 'refactor' provides some specificity, but 'code' is extremely broad and could overlap with general coding assistance, code review, or code optimization skills. Without scoping to a language, pattern, or toolchain, conflict risk is moderate.

2 / 3

Total

6

/

12

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.

Validation11 / 11 Passed

Validation for skill structure

No warnings or errors.

Repository
datacamp/files-software-development-claude-code
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.