CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

refactor

Restructures code by extracting methods, renaming symbols, simplifying conditionals, removing duplication, and eliminating dead code — while running tests before and after each change to ensure behavior is preserved. Invoke immediately when user mentions refactor, refactoring, clean up, restructure, simplify, technical debt, code smell, DRY violations, or when code is messy, complex, or hard to maintain.

Quality

91%

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

82%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.

A tight, well-structured process skill: lean token usage, a clear staged workflow with explicit test validation checkpoints, and concrete commit conventions. The main gaps are the absence of an explicit failure/recovery path when tests break and a few under-specified steps (status update format, ./test.sh creation fallback).

Suggestions

Add an explicit recovery step to the refactoring loop: e.g., 'If tests fail after a change, revert the last commit (git revert HEAD) and choose a smaller refactoring' — this closes the workflow_clarity gap for error recovery.

Specify what a status update after each refactor should contain (e.g., refactoring name, file touched, tests green) and how to bootstrap ./test.sh when no test script exists, to firm up actionability.

Link references/credits.md from the body (e.g., a one-line Credits section) so the sole bundle file is discoverable rather than orphaned.

DimensionReasoningScore

Conciseness

The body is lean and imperative throughout — 'Prefer self-explanatory, readable code over comments', 'Extract paragraphs into methods', 'Keep consistent abstraction levels within methods' — with zero padding and no explanation of concepts Claude already knows. Every section earns its place, matching the level-5 anchor; level 4 would require trimmable over-explanation, which is absent.

5 / 5

Actionability

Mostly executable guidance: 'Find or create ./test.sh, verify all tests pass', commit format "- r <refactoring>" (the message must include the '- r' prefix), and a numbered test-change-test-commit loop. It falls short of level 5 because several directives remain high-level ('Look for opportunities to simplify', 'Consider blind spots', 'Provide a status update' without format) and 'find or create ./test.sh' gives no concrete fallback when no test script exists.

4 / 5

Workflow Clarity

A clear four-stage sequence (Prep → Main Refactoring → Final Evaluation → Summary) with explicit validation checkpoints — 'Ensure all tests pass' before and after each change and per-refactor commits — so the batch/destructive-operation cap of 3 does not apply. It misses level 5 because there is no explicit error-recovery branch (what to do when tests fail after a refactor, e.g., revert vs. fix) and Prep's comment-removal step lacks its own verification.

4 / 5

Progressive Disclosure

The body is well-organized into clearly signaled sections with no content that belongs in a separate file, and no nested references. It does not reach level 5 because the one bundle file (references/credits.md) is never referenced or signaled from the body, leaving a minor navigation gap, and at ~73 lines the under-50-line simple-skill exception does not strictly apply.

4 / 5

Total

17

/

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.

An exemplary description: third-person, concrete, and comprehensive on both capabilities and invocation triggers, with only minor breadth-related overlap risk from generic terms like 'simplify' and 'clean up'. It closely matches the rubric's good-overall examples in structure and quality.

DimensionReasoningScore

Specificity

The description lists multiple specific concrete actions — 'extracting methods, renaming symbols, simplifying conditionals, removing duplication, and eliminating dead code — while running tests before and after each change' — giving comprehensive coverage of refactoring capabilities with no vague filler. It matches the level-5 anchor ('multiple specific concrete actions; comprehensive coverage') and exceeds level 4, which permits minor gaps in coverage.

5 / 5

Completeness

Both 'what' and 'when' are explicitly answered: what is the enumerated restructuring actions plus test-verified behavior preservation; when is 'Invoke immediately when user mentions refactor, refactoring, clean up...'. This mirrors the level-5 example structure exactly, so it cannot be level 4 where the 'when' is only somewhat explicit.

5 / 5

Trigger Term Quality

Trigger terms are comprehensive and natural: 'refactor, refactoring, clean up, restructure, simplify, technical debt, code smell, DRY violations, or when code is messy, complex, or hard to maintain' — covering synonyms and informal phrasings a user would actually say. This matches the level-5 anchor for comprehensive natural-term coverage; level 4 would require noticeable missing terms, which is not the case here.

5 / 5

Distinctiveness Conflict Risk

The refactoring niche is well defined by distinctive triggers (DRY violations, code smell, technical debt), but broad terms like 'clean up', 'simplify', and 'messy' create minor overlap risk with closely related code-quality or cleanup skills. It fits the level-4 anchor ('mostly distinct; minor overlap risk') rather than level 5, whose example is anchored to a narrower file-type niche with minimal conflict.

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

ericjohnolson/tessl-test

Path

plugins/crafter/skills/refactor/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.