← ClaudeAtlas

reusabilitylisted

This skill should be used when designing, planning, implementing, or reviewing any non-trivial change, or when the user asks to "generalize this", "extract shared util", "deduplicate this" — enforces DRY, well-defined abstractions, and composable components so code is written once and used many times
alo-exp/silver-bullet · ★ 5 · AI & Automation · score 73
Install: claude install-skill alo-exp/silver-bullet
# /reusability — Reusable Design Enforcement Every design, plan, and implementation MUST produce components that are written once and reused everywhere applicable. Duplication is a bug — not in logic, but in design. **Why this matters:** Duplicated logic drifts over time. When the same concept lives in two places, one gets updated and the other doesn't — causing subtle bugs that are hard to trace. Reusable design prevents this by ensuring every concept has exactly one authoritative implementation. **When to invoke:** During PLANNING (after `/gsd:discuss-phase`, before `/gsd:plan-phase`) and during REVIEW (as part of code review criteria). This skill applies to both new code and modifications to existing code. --- ## The Rules ### Rule 1: Single Source of Truth Every piece of knowledge — business rule, algorithm, configuration value, validation logic — MUST have exactly ONE authoritative representation in the system. | Violation | Fix | |-----------|-----| | Same validation in frontend and backend | Shared schema (JSON Schema, Zod, Protobuf) or single validation layer | | Same constant in multiple files | Extract to a shared constants module | | Same SQL query in multiple handlers | Extract to a repository/query module | | Same error message in multiple places | Extract to an error catalog | **Test:** Search the codebase for the concept. If it appears in more than one place with substantively identical logic, it violates this rule. ### Rule 2: Compose, Don't Inherit