module-design

module-design is a skill for Claude Code from yuri-semenenko/ai-engineering-workspace. It costs 0 tokens per session (1,001 once invoked), scanned A, original, MIT.

A guide to designing software modules with a small, stable interface that hides complex implementation details. An interface is the set of functions and data a caller can use.

In plain words
What is it for?
Use it when designing or reviewing a module, extracting a helper or wrapper, or deciding whether a new interface is worthwhile.
Why use it?
It helps prevent abstractions that add extra layers, expose too much internal code, or provide flexibility nobody needs.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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/yuri-semenenko/ai-engineering-workspace/module-design
Any agent
npx skills add yuri-semenenko/ai-engineering-workspace --skill module-design
Clone the repo
git clone --depth 1 https://github.com/yuri-semenenko/ai-engineering-workspace

Made for: Claude Code.

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 module-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/yuri-semenenko/ai-engineering-workspace/module-design.svg)](https://agentmods.dev/skills/yuri-semenenko/ai-engineering-workspace/module-design)
Your own site
<a href="https://agentmods.dev/skills/yuri-semenenko/ai-engineering-workspace/module-design"><img src="https://agentmods.dev/badge/skills/yuri-semenenko/ai-engineering-workspace/module-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,001 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.1 $0.00000 $0.01001
Opus 5 $0.00000 $0.00500
Sonnet 5 $0.00000 $0.00200
Haiku 4.5 $0.00000 $0.00100

Measured 5d ago against content hash 4ca974089e7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

module-design 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 5d 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.

claude-code/.claude/skills/module-design/SKILL.md · 56 lines

How it starts

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

Module Design

Shape modules so a small, stable interface hides substantial implementation. The unit of design is the interface a caller sees, not the code behind it. Favor composition and explicit data flow; add an abstraction only when it earns the indirection it introduces.

Rationalizations

Rationalization Rebuttal
"I'll wrap it now so it's easy to swap later." One implementation is a hypothetical seam. Wrap it when the second arrives, not before.
"More layers means cleaner separation." Layers are cost. A layer that only forwards calls adds surface without hiding anything.
"The interface should expose everything, just in case." A wide interface leaks the implementation and freezes it. Expose what the caller needs; hide how.
"It's more flexible with a config object or a strategy." Configurable indirection is complexity you pay for on every read. Flexibility no caller uses is dead weight.

What a deep module looks like

  • Small interface, substantial body. The value is the ratio: much hidden behind little exposed. Depth is a property of the interface, not the line count.
  • Information hiding. Callers depend on what it does, never on how. A change to the implementation must not ripple outward.
  • The interface is the test surface. A small, honest interface is the natural seam to test through. If it is hard to test without reaching inside, the boundary is wrong.

Design moves

  • Deletion test. If you removed the module, would its knowledge scatter back into callers? If nothing leaks, it was not encapsulating anything — inline it.
  • Adapter rule. One implementation behind an abstraction is a hypothetical seam; two is a real one. Introduce the interface when the second appears, not in anticipation of it.
  • Inject dependencies, return results. Prefer functions that take what they need and return a value over ones that reach for globals or fire hidden side effects. Testability follows for free.
  • Push complexity down, not out. A module earns its keep by absorbing hard cases so callers do not repeat them. A module that hands its edge cases back to every caller is shallow.

Read the full file on GitHub · 56 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. 5d ago First seen · 56 lines · 0 tokens per session scan A 4ca974089e7a

Subscribe to this mod's changes

module-design is a skill published in the GitHub repository yuri-semenenko/ai-engineering-workspace (1 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,001 tokens. 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.