Agent skill

dry-principle

This rule enforces the Don't Repeat Yourself principle to avoid code duplication and improve maintainability.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/dry-principle

SKILL.md

Dry Principle Skill

  • Follow the DRY (Don't Repeat Yourself) Principle and Avoid Duplicating Code or Logic.
  • Avoid writing the same code more than once. Instead, reuse your code using functions, classes, modules, libraries, or other abstractions.
  • Modify code in one place if you need to change or update it.

Memory Protocol (MANDATORY)

Before starting:

bash
cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results