Skip to content
Back to skills

Design Mod

ASecurity

Design module interfaces, choose seams and improve testability. Use real callers to assess depth and compare interface costs.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 20, 2026
developmentgoperformance

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 20, 2026

npx -y skills add songzhuozhu/PeterFlow --skill design-mod --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Mod?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Mod
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/songzhuozhu-design-mod/badge)](https://www.skillsdirectory.com/skills/songzhuozhu-design-mod)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-mod
description: Design module interfaces, choose seams and improve testability. Use real callers to assess depth and compare interface costs.
---

# Design a module around its callers

Start with one real call. List what its author must know to get a correct result. Good interfaces let callers do useful work with little knowledge and let maintainers change one rule in one place.

| Term | Meaning |
| --- | --- |
| Module | A unit of behavior with an interface and an implementation. A function, class, package or vertical feature can qualify. |
| Interface | Everything a caller must know, including parameters, sequencing, constraints, errors, configuration and performance characteristics. |
| Implementation | What the module does behind its interface. |
| Depth | Useful behavior and test coverage obtained per unit of interface knowledge. Line count measures something else. |
| Seam | A place where behavior can change without editing its consumer. |
| Adapter | A concrete implementation of the interface at a seam. |
| Leverage | Work that one implementation does for multiple callers or tests. |
| Locality | How closely the knowledge, change, defect and verification for one rule live together. |

Use the project's domain language for business behavior. Apply the **deletion test**: mentally inline or delete a layer. If only forwarding disappears, simplify. If several callers now have to reproduce ordering, recovery or pricing logic, the layer hides valuable knowledge.

Call the same external interface from a behavior test and a production consumer. If tests must reach through it to manipulate internals, reconsider the seam. A real production transport and a necessary test double can justify an adapter. With one implementation and no replacement need, a concrete function may be enough.

Look for operations the consumer always calls in a fixed order or values the module could determine for itself. Show the same call before and after the proposed change. For a pure discount calculation, a cart and returned amount may be the whole interface. A payment authorization may need a controllable gateway response at a seam.

Read [deepening by dependency type](DEEPENING.md) when combining shallow modules or planning behavior tests; use [design it twice](DESIGN-IT-TWICE.md) when the user wants competing interfaces for a selected problem. Return the trade-off and concrete call example within the requested design scope.

Files in this skill

  • DEEPENING.md1.3 KB
  • DESIGN-IT-TWICE.md1.1 KB
  • LICENSE2.1 KB
  • SKILL.md2.4 KB
  • agents/openai.yaml114 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.