module-design

module-design is a skill for Claude Code from yuri-semenenko/ai-engineering-workspace. It costs 94 tokens per session (1,160 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/.

Good fit Use it when designing or reviewing a module, extracting a helper or wrapper, or deciding whether a new interface is worthwhile.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yuri-semenenko/ai-engineering-workspace/module-design
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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for module-design

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,160 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00094 $0.01160
Opus 5.5 $0.00038 $0.00464
Sonnet 5.5 $0.00019 $0.00232
Haiku 4.5 $0.00009 $0.00116

Measured 1mo ago against content hash bd9c5600ca3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. Whether the code should exist at all is /lazy, a whole-tree over-engineering scan is /complexity-audit, and system-level decisions are /rfc.

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. Mutable state is part of the how: if callers do not need the same state, give each its own; if they do, the module is its single writer. Reach for locks or synchronization only after both.
  • 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. Settle the shape of that data before the logic: where it can be in more than one state, name the valid states and transitions, and where a type (a discriminated union, say) rules out an impossible combination more simply than a runtime check, let it.
  • 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. Outside data is the common case: parse it once where it crosses a trust boundary and pass the checked value inward. A TypeScript type or an as cast is not runtime validation; re-check inside only where a new trust boundary appears, such as a separately deployed service that consumes it.

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. 1mo ago Changed · +94 tokens per session bd9c5600ca3e
  2. 3mo 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 (4 stars, last pushed 3d ago), licensed MIT. It adds 94 tokens to every session and 1,160 once invoked, about $0.0004 per session on Opus 5.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

module-design compared with skills from other repositories

module-design next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
module-designyuri-semenenko/ai-engineering-workspaceSkill43d agoMITA94Claude Code
spec-kitty-charter-doctrinePriivacy-ai/spec-kittySkill1.7k13d agoMITA135Claude Code, Codex
110-java-maven-best-practicesjabrena/plinthSkill4702d agoApache-2.0A115Claude Code, Codex
128-java-genericsjabrena/plinthSkill4702d agoApache-2.0A147Claude Code, Codex
322-frameworks-spring-boot-testing-integration-testsjabrena/plinthSkill4702d agoApache-2.0A123Claude Code, Codex
422-frameworks-quarkus-testing-integration-testsjabrena/plinthSkill4702d agoApache-2.0A190Claude Code, Codex
521-frameworks-micronaut-testing-unit-testsjabrena/plinthSkill4702d agoApache-2.0A150Claude Code, Codex