dry

dry is a skill for Claude Code, Codex from JordanCoin/codingskills. It costs 60 tokens per session (1,176 once invoked), scanned A, original, MIT.

A coding principle called “Don’t Repeat Yourself.” It says each business rule or piece of knowledge should have one authoritative home in the code.

In plain words
What is it for?
It helps review or restructure duplicated business logic, choose a single source of truth, and avoid combining code that only looks similar but serves different purposes.
Why use it?
It prevents copies of the same rule from drifting apart when the rule changes. This reduces inconsistent behavior and makes updates easier to trace.

Skill for Claude CodeCodex

Part of the coding-skills plugin — 9 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jordancoin/codingskills/dry
Any agent
npx skills add JordanCoin/codingskills --skill dry
Clone the repo
git clone --depth 1 https://github.com/JordanCoin/codingskills

Made for: Claude Code, Codex.

Or install coding-skills, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dry

README.md
[![agentmods](https://agentmods.dev/badge/skills/jordancoin/codingskills/dry.svg)](https://agentmods.dev/skills/jordancoin/codingskills/dry)
Your own site
<a href="https://agentmods.dev/skills/jordancoin/codingskills/dry"><img src="https://agentmods.dev/badge/skills/jordancoin/codingskills/dry.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,176 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.01176
Opus 5 $0.00030 $0.00588
Sonnet 5 $0.00012 $0.00235
Haiku 4.5 $0.00006 $0.00118

Measured 4d ago against content hash 76363c88f736, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dry scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dry/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DRY — Don't Repeat Yourself

Before Applying

If .agents/stack-context.md exists, read it first. Apply this principle using idiomatic patterns for the detected stack. For framework-specific details, use context7 MCP or web search — don't guess.

Principle

Every piece of knowledge in a system should have a single, authoritative representation. When that knowledge changes, you should only need to change it in one place.

Why This Matters in Production

Duplicated logic is a ticking time bomb. When a business rule changes and you update it in one place but miss the copy in another, you get inconsistent behavior that's hard to detect and harder to debug. The more copies exist, the more likely one diverges silently.

DRY is not about eliminating similar-looking code. It's about eliminating duplicated knowledge — the same business rule, the same decision, the same source of truth expressed in multiple places.

Rules

  1. Distinguish knowledge duplication from code duplication. Two functions that look identical but represent different business concepts should stay separate. Two functions that encode the same business rule should be unified.
  2. Single source of truth for data. Configuration, constants, schema definitions, and validation rules should each live in exactly one place. Everything else should derive from that source.
  3. Extract when the pattern is stable. Don't extract on the first occurrence — you don't yet know the right shape of the abstraction. Extract when you've seen the pattern repeat with the same semantics at least twice.
  4. Centralize business rules. Tax calculations, permission checks, pricing logic — these must live in one module, not scattered across handlers, frontends, and scripts.
  5. Use code generation over manual sync. If two representations must stay in sync (e.g., API types and client types, schema and documentation), generate one from the other rather than maintaining both by hand.

Anti-Patterns

  • Shotgun surgery: Changing one business rule requires edits in 5+ files because the rule is duplicated everywhere
  • Copy-paste-modify: Cloning a function and tweaking it instead of parameterizing the original
  • Parallel hierarchies: Maintaining matching structures in multiple layers (e.g., identical type definitions in backend and frontend that aren't generated from a shared schema)
  • Magic strings repeated across files: The same status code, error message, or config key hardcoded in multiple locations
  • Documentation that restates the code: Comments or docs that repeat what the code says (and inevitably drift out of sync)

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 96 lines · 60 tokens per session scan A 76363c88f736

Subscribe to this mod's changes

dry is a skill published in the GitHub repository JordanCoin/codingskills (7 stars, last pushed 6mo ago), licensed MIT. It adds 60 tokens to every session and 1,176 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

karpathy-coding-principles

Use when andrej Karpathy's 4 coding principles — think before coding, simplicity first, surgical changes, goal-driven execution. Use when coding, reviewing code quality, reducing overengineering,.

oyi77/1ai-skills · 46 tokens

refactoring-patterns

Apply safe refactoring patterns to improve code structure without changing behavior. Use when cleaning up code, reducing technical debt, or improving maintainability.

summarybotng/summarybot-ng · 33 tokens

refactor

Automated iterative code refactoring with swarm-orchestrated specialist agents including deep codebase discovery, confidence-scored code review, and security analysis. Use this skill when the user wants to improve existing code quality, clean up messy code, restructure, simplify, reduce tech debt, or perform…

zircote-plugins/refactor · 112 tokens

refactoring

Improve code structure without changing behavior using proven refactoring patterns. Use when cleaning up code, reducing duplication, improving readability, or restructuring modules.

asgarovf/locusai · 31 tokens

feature-dev

Guided feature development with swarm-orchestrated codebase exploration, multi-perspective architecture design, implementation, and quality review.

zircote-plugins/refactor · 27 tokens

feature-dev

Guided feature development with swarm-orchestrated codebase exploration, multi-perspective architecture design, implementation, and quality review. Use this skill when the user wants to build a new feature, add new functionality, implement a capability, or create something that doesn't exist yet. Triggers on requests…

zircote-plugins/refactor · 101 tokens