CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

dry-refactoring

Guided workflow to eliminate copy-paste duplication detected by jscpd. Refactor exact, renamed and near-miss clones using extract function, parameterize, module, constant, or base class strategies, starting from the hotspots the summary ranks.

Quality

81%

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

85%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, highly actionable workflow skill: exact commands, clone-kind-specific strategies with thresholds, explicit re-run validation, and clean deferral of tool reference to the sibling jscpd skill. The only real weakness is the pseudocode Before/After blocks, which cost both conciseness and actionability at the margins.

DimensionReasoningScore

Conciseness

The body is dense with non-obvious, tool-specific guidance (flag combinations, token/similarity thresholds, triage heuristics) and wastes almost nothing on concepts Claude already knows. Not 5 because the placeholder Before/After comment blocks ("// Before: same block in two places") and a few very long sentences (workflow step 5) could be trimmed.

4 / 5

Actionability

Copy-paste-ready commands ("npx jscpd --reporters ai --ignore-identifiers --min-tokens 70 <path>") and concrete named examples (computeCartTotal/computeBasketTotal, buildInvoice/buildCreditNote) with precise thresholds (0.8, 0.9, 10 lines) make the guidance highly executable. Not 5 because the strategy code blocks are illustrative comment pseudocode rather than executable examples, and that flexibility is not explicitly justified.

4 / 5

Workflow Clarity

Nine explicitly sequenced steps include a concrete validation step ("Re-run jscpd with the same flags to confirm the clone is eliminated and the dup% ... went down", including the --ignore-identifiers re-check for renamed clones), an "Always ensure" checklist (all call sites updated, tests pass), and reporting of skipped candidates with reasons. Not 4 because validation checkpoints and the feedback loop are explicit, not implicit.

5 / 5

Progressive Disclosure

Well-organized sections (Prerequisites, Workflow, Refactoring Strategies, Tips) with the full jscpd option reference deferred one level deep to the clearly signaled sibling skill ("See the [jscpd](../jscpd/SKILL.md) skill for full option reference"); no bundle files exist, and nothing in the body clearly belongs in one. Not 4 because the split between this skill's workflow and the jscpd skill's option reference is clean and easy to navigate.

5 / 5

Total

18

/

20

Passed

Description

71%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 specific, action-dense description that clearly states what the skill does and names its strategies, held back by the absence of an explicit trigger clause. Adding a "Use after running jscpd..." or "Use when..." sentence would lift completeness and distinctiveness.

Suggestions

Add an explicit trigger clause, e.g. "Use when the user mentions duplicate code, copy-paste duplication, DRY violations, or after a jscpd report shows clones" — this addresses the completeness cap of 3.

Include natural synonyms users say ("duplicate code", "repeated code", "DRY") alongside "copy-paste duplication" to broaden trigger-term coverage.

State the entry condition explicitly ("Use after running jscpd") so the 'when' does not have to be inferred from "detected by jscpd".

DimensionReasoningScore

Specificity

"Refactor exact, renamed and near-miss clones using extract function, parameterize, module, constant, or base class strategies" lists multiple concrete actions with comprehensive coverage of both the clone kinds and the refactoring strategies. Not 4 because the action list covers the domain comprehensively rather than having minor gaps.

5 / 5

Completeness

The 'what' is clear (a guided workflow with named strategies), but 'when' is only weakly implied by "detected by jscpd" — there is no explicit "Use when..." clause, which caps completeness at 3 per the judging guidelines. Not 4 because the trigger condition must be inferred rather than read.

3 / 5

Trigger Term Quality

"copy-paste duplication", "duplication" and "refactor" are phrases users naturally say, alongside the tool name jscpd. Not 5 because common variations like "duplicate code", "repeated code" or "DRY" are missing; not 3 because the natural phrases present go beyond a single generic keyword.

4 / 5

Distinctiveness Conflict Risk

"copy-paste duplication detected by jscpd" carves out a clear niche distinct from general code-quality skills. Not 5 because a request like "refactor this duplicated code" could also plausibly route to a general refactoring skill, giving minor overlap risk.

4 / 5

Total

16

/

20

Passed

Validation

93%

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

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 2 suspicious

Warning

Total

15

/

16

Passed

Repository

kucherenko/jscpd

Path

skills/dry-refactoring/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.