dry

Reviews session code diffs for duplication and applies obvious DRY fixes.

Updated Nov 17, 2025
One-click install
npx skills add https://github.com/vzakharov/vovazakharov.com --skill dry-vzakharov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dry
Source: https://github.com/vzakharov/vovazakharov.com/tree/main/.claude/skills/dry
Command: npx skills add https://github.com/vzakharov/vovazakharov.com --skill dry-vzakharov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code written in a working session often accumulates copy-pasted logic, repeated magic strings, and duplicated CSS rules. Manually auditing a diff for these DRY violations is tedious, and blanket refactoring advice tends to over-abstract code that was fine as-is. ## Core Features & Use Cases - Scoped Diff Review: Automatically determines the review scope from uncommitted changes, session commits ahead of upstream, or a restored session's SHA range. - Three-Way Triage: Sorts every duplication candidate into OBVIOUS (applied immediately), AMBIGUOUS (surfaced for your decision), or NON-ISSUE (silently skipped) based on callsite count, coupling, abstraction cost, and distance. - Surgical Edits: Applies only the clear wins — extracting constants, predicates, or Sass placeholders — without renaming, reordering, or unrelated cleanups, then commits the fixes. - Use Case: After implementing a feature spanning several files, invoke the skill to dedupe a repeated provider-namespacing string into a shared constant while it flags a borderline two-callsite helper extraction for your call. ## Quick Start Invoke the skill with /dry after finishing a coding task, optionally adding focus guidance such as a specific area of the changes to prioritize.

Frequently Asked Questions about dry

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review session code for DRY violations?

Invoke the skill with /dry after completing a coding task. It determines the diff scope from git status or commit history, reads the changed files, applies obvious deduplication fixes, and lists only the ambiguous candidates for your decision.

What counts as an obvious DRY fix versus an ambiguous one?

Obvious fixes are real, coupled duplications with two or more callsites and cheap extraction cost, like a repeated magic string or duplicated CSS rule block. Ambiguous cases involve borderline cost, uncertain placement or naming, or unclear semantic intent.

Does the DRY review cover the whole codebase?

No, the scope is limited to the current session's work: uncommitted changes, commits ahead of upstream, or a restored session's SHA range. Duplication found outside the diff is mentioned once but not fixed.

When should I skip running a DRY review?

Skip it when the session involved no concrete code work, such as research-only, planning-only, or conversation-only sessions. The skill itself detects this case and reports there is nothing to review.

Why does the review ignore some repeated-looking code?

Intentional patterns like belt-and-suspenders error handling, framework boilerplate, same-shape code with different semantics, and test fixtures across files are classified as non-issues because merging them would hide intent rather than reduce real duplication.