dry-principle
CommunityEliminate duplicated logic, simplify maintenance
Software Engineering#typescript#refactoring#configuration#abstraction#code-duplication#dry#rule-of-three
AuthorBrunoAMSilva
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Reduce maintenance overhead and bugs caused by duplicated domain knowledge and scattered configuration by guiding when and how to extract shared code and data definitions into single sources of truth.
Core Features & Use Cases
- Rule of Three trigger: extract logic after it appears in three or more places to avoid premature abstraction.
- Centralize configuration: move endpoints, constants, and auth settings to a single config module.
- Consolidate shared types: define TypeScript interfaces and domain types once and import them everywhere.
- Extract repeated UI/fetch patterns: convert repeated component logic into custom hooks or utilities.
- Decision tree & edge cases: includes guidance to avoid merging code that looks similar but represents different concepts, and when duplication is acceptable (tests, single-use cases).
- Real-world example: extract a validateEmail utility used across registration, login, and profile forms into a shared utils/validation module.
Quick Start
Identify code or configuration repeated in three or more places and propose a safe extraction plan that centralizes the logic as a shared utility, type, or config module.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dry-principle Download link: https://github.com/BrunoAMSilva/my-config/archive/main.zip#dry-principle Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.