dry

Identify duplicated knowledge in codebases and suggest DRY refactoring strategies.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/messeb/skills --skill dry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dry
Source: https://github.com/messeb/skills/tree/main/plugins/general-developer/skills/dry
Command: npx skills add https://github.com/messeb/skills --skill dry

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the problem of duplicated knowledge within a codebase, which leads to increased maintenance effort, higher bug rates, and inconsistent behavior.

Core Features & Use Cases

  • Identify Knowledge Duplication: Distinguishes between true knowledge duplication and coincidental code similarity.
  • Guidance on Extraction: Provides principles for when and how to extract duplicated knowledge into a single, authoritative source.
  • Use Case: Detects when the same business rule (e.g., discount eligibility) is implemented in multiple places and suggests a unified approach.

Quick Start

Analyze the current codebase for instances of duplicated knowledge and suggest refactoring strategies.

Frequently Asked Questions about dry

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

FAQPage Schema
What is the difference between true knowledge duplication and coincidental code similarity?

Knowledge duplication occurs when the same business rule is implemented in multiple places, whereas coincidental similarity is code that looks alike but serves different purposes. Distinguishing them prevents premature abstraction and unnecessary coupling.

How do I eliminate duplicated business logic across my codebase?

Eliminate duplicated business logic by extracting it into a single, authoritative source. Identify instances where the same rule is implemented multiple times and refactoring the logic into a unified structure to reduce maintenance effort and bug rates.

When should I extract duplicated constants and structural patterns during refactoring?

Extract duplicated constants and structural patterns during refactoring when the duplication represents true knowledge overlap. Focus on establishing a single authoritative source to ensure consistent behavior across the codebase without introducing premature abstractions.

Does applying the DRY principle lead to premature abstraction?

Applying the DRY principle can lead to premature abstraction if coincidental code similarity is mistaken for true knowledge duplication. Focus on distinguishing actual knowledge overlap before extracting business logic to avoid creating unnecessary coupling.

Why does duplicated knowledge increase maintenance effort and bug rates?

Duplicated knowledge increases maintenance effort and bug rates because changes must be applied across multiple implementations. If one instance is missed, it leads to inconsistent behavior, making the codebase harder to maintain and more prone to errors.