dry

Distinguish knowledge duplication from incidental text duplication in code review.

Updated May 28, 2026
One-click install
npx skills add https://github.com/syntropic137/harness-app-template --skill dry-syntropic137
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dry
Source: https://github.com/syntropic137/harness-app-template/tree/main/.claude/skills/dry
Command: npx skills add https://github.com/syntropic137/harness-app-template --skill dry-syntropic137

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common problem of misapplying the DRY (Don't Repeat Yourself) principle, which leads to either unaddressed knowledge duplication causing cross-layer defect drift, or premature speculative abstractions that are more expensive to maintain than the duplication they were intended to fix.

Core Features & Use Cases

  • Calibrated DRY distinction: Guides users to differentiate between knowledge duplication (same authoritative rule implemented in multiple places, a true violation) and incidental text duplication (similar-looking code that represents different knowledge, not a violation) to avoid over-extraction.
  • Safe abstraction guidelines: Enforces the rule-of-three for extracting new abstractions, and provides clear criteria for when to tolerate duplication to avoid coupling unrelated code paths.
  • Practical review guardrails: Includes red flags, rationalization prevention tables, and pattern examples for common DRY failure modes like magic constants, copy-pasted test fixtures, and configuration drift.
  • Use Case: When reviewing a polyglot codebase with repeated business logic across service layers, use this Skill to identify actual knowledge duplication, avoid merging unrelated similar code, and ensure abstractions are only extracted when validated by three concrete use cases.

Quick Start

Use the dry skill to review your current codebase for DRY violations, flag knowledge-level duplication of business rules or configuration values, and identify any premature abstractions that should be inlined to reduce coupling.

Frequently Asked Questions about dry

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

FAQPage Schema
What is the difference between knowledge duplication and incidental text duplication in code review?

Knowledge duplication is the same authoritative rule implemented in multiple places, a true DRY violation. Incidental text duplication is similar-looking code representing different knowledge, which should be tolerated to avoid coupling unrelated code paths.

How do I identify and fix premature speculative abstractions during refactoring?

Identify premature speculative abstractions by locating couplings that increase long-term maintenance cost, then inline them to preserve code optionality. Enforce the rule-of-three to ensure abstractions are only extracted when validated by three concrete use cases.

When should I apply the rule-of-three to extract abstractions in software architecture?

Apply the rule-of-three to extract abstractions only when a duplicated pattern is validated by three concrete use cases. This prevents merging unrelated similar code and ensures safe abstraction guidelines are met before coupling code paths.

How do I review a polyglot codebase for cross-layer defect drift caused by DRY violations?

Review a polyglot codebase by flagging repeated business logic across service layers to identify actual knowledge duplication. This prevents cross-layer defect drift by avoiding the merging of unrelated similar code and ensuring proper architectural governance.

What are common DRY failure modes when refactoring magic constants and test fixtures?

Common DRY failure modes include magic constants, copy-pasted test fixtures, and configuration drift. Use practical review guardrails and red flags to prevent rationalization and avoid over-extraction of these duplicated elements.

Can I use this DRY review approach for both prototypes and production services?

Yes, this DRY review approach applies to codebases of any maturity level, from prototypes to production services. It provides calibrated guidance to distinguish knowledge duplication from incidental text duplication across any software engineering workflow.