Don't Repeat Yourself — Rule of Three, when duplication is fine, extracting the right abstraction.
From devkitnpx claudepluginhub 5uck1ess/devkitThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Don't abstract on the first duplication. Wait for three instances.
Premature abstraction is worse than duplication. Wrong abstractions are expensive to undo.
Not all duplication is bad. Duplication is acceptable when:
The test: if one copy changes, must the other change too? If yes, extract. If maybe not, leave it.
When you do extract, get the abstraction right:
formatCurrency not extractedFromOrderPage.DRY is about knowledge, not code. The principle says every piece of knowledge should have a single authoritative source. Two functions with identical code but representing different business rules are not a DRY violation.
"Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." — Andy Hunt & Dave Thomas