convention-dry

Centralize duplicated validators, utilities, and rules into shared components.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sunLeee/optimization --skill convention-dry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convention-dry
Source: https://github.com/sunLeee/optimization/tree/main/.claude/skills/reference/philosophy/principles/dry
Command: npx skills add https://github.com/sunLeee/optimization --skill convention-dry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DRY (Don't Repeat Yourself) 원칙은 시스템 내에서 지식과 로직을 하나의 명확한 표현으로 관리하게 하여 중복과 불일치를 줄이는 것을 목표로 한다.

Core Features & Use Cases

  • 중앙화된 검증 유틸리티: 반복되는 검증 로직을 재사용 가능한 함수로 추출한다.
  • 일관된 구성 패턴: 하드코딩 값을 제거하고 구성 파일에서 참조하도록 한다.
  • 반패턴 탐지: 카피 앤 페이스트 패턴을 찾아 리팩토링을 촉진한다.
  • 사용 사례: create_user와 update_user에 동일한 검증이 필요할 때 단일 유효성 검증 함수로 통합한다.

Quick Start

Identify duplicated logic in a module and move it into a shared function called by all affected code paths.

Frequently Asked Questions about convention-dry

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

FAQPage Schema
How do I eliminate duplicated validation logic across multiple API modules?

To eliminate duplicated validation logic, you extract the repeated rules into a centralized, reusable utility function. All affected code paths then call this single validator to ensure consistent behavior and reduce redundancy.

What is the DRY principle in software engineering?

The DRY principle aims to centralize knowledge and logic into a single, authoritative representation within a system. This practice significantly reduces code duplication and prevents inconsistencies across software projects and APIs.

How do I detect copy and paste anti-patterns for refactoring?

Detecting copy and paste anti-patterns requires tooling support to scan modules and files for repeated patterns. Identifying these duplicated code blocks promotes targeted refactoring into shared, reusable components.

When should I centralize hardcoded values into a configuration pattern?

You should centralize hardcoded values into a configuration pattern when the same constants appear across multiple modules. Referencing a configuration file removes duplication and maintains consistent application rules.

Does applying the DRY principle require specific tooling support?

Applying the DRY principle effectively requires a centralized guideline and tooling support to detect duplication consistently. These tools scan for repeated patterns across files to prompt necessary refactoring.