← ClaudeAtlas

dry-principlelisted

Enforces DRY (Don't Repeat Yourself) thinking across all programming tasks — writing new code, reviewing code, fixing bugs, refactoring, editing config, schemas, tests, and documentation. Use this skill for ANY coding or programming-related task: feature implementation, bug fixes, code review, refactoring, writing tests, editing configuration, database schema changes, build system modifications, or documentation updates. This skill should trigger whenever Claude is about to write, modify, or review code or code-adjacent files. Even if the user doesn't mention "DRY" or "duplication", this skill applies to all software engineering work.
Stoica-Mihai/claude-skills · ★ 0 · AI & Automation · score 70
Install: claude install-skill Stoica-Mihai/claude-skills
# DRY Principle Apply DRY thinking to every programming task — not as a pedantic rule, but as a design instinct. DRY means every piece of **knowledge** has a single, authoritative representation in the system. The key word is knowledge, not code. Two identical-looking code blocks might represent different knowledge (and should stay separate). Two different-looking blocks might encode the same business rule (and should be unified). The test: "If this knowledge changes, how many places do I need to update?" If the answer is more than one, that's a DRY violation worth examining. ## Run this as a multi-pass sweep The different kinds of duplication don't just *look* different — they're found by different search motions, and that's the catch. Magic values surface when you *scan literals*. Knowledge duplication surfaces when you *ask what changes together*. Wiring duplication surfaces when you *compare interaction shapes* across siblings. Symbol↔label duplication surfaces when you *match a typed token against a bare string in another file*. Same-file scattered duplication surfaces when you *read look-alike function bodies side by side*. Per-instance duplication surfaces only when you *picture the component multiplied across every screen, row, or tab it renders into* — it's invisible in the source, which appears exactly once. These are genuinely different mental questions, and the moment you lock onto one — say, hunting magic numbers — you stop seeing the others, because you're n