Module design
Design or improve module boundaries, interfaces, dependency direction, cohesion, coupling, test seams, and responsibility ownership when a code change exposes unclear or unstable structure.From its SKILL.md
npx -y skills add martonpaulo/skills --skill module-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.6 KB, 456 tokens by cl100k_base, as published. Nobody here has run it
Module Design
Use these criteria when a module's responsibilities, interface, dependencies, or test seams are unclear. Adapt them to the repository's language, framework, and established architecture.
Workflow
- Inspect callers, implementation, tests, data flow, lifecycle, and existing conventions.
- State the behavior the module should own and the knowledge callers should not need.
- Map dependencies and direction: which dependencies are stable, which vary, and which side should own the abstraction.
- Consider at least two plausible designs when the boundary is consequential. See DESIGN-IT-TWICE.md.
- Compare designs by interface size, cohesion, coupling, locality, dependency direction, testability, migration risk, and fit with the codebase.
- Recommend the smallest design that gives clear ownership and a stable behavioral seam.
Decision criteria
- Prefer a deep module: substantial behavior behind a small, stable interface.
- Keep behavior and the state or rules it governs local when that improves understanding.
- Put tests at stable behavioral seams so internal refactoring does not rewrite them.
- Inject dependencies when substitution, isolation, or lifecycle ownership requires it; avoid indirection that has only one fixed implementation and no testing value.
- Make dependency direction reflect ownership of policy rather than incidental call direction.
- Avoid abstractions that merely rename or forward calls.
- Reduce scattered business rules and parallel sources of truth.
- Preserve familiar repository vocabulary. Names such as service, component, API, manager, and helper are normal; criticize them only when they conceal unclear responsibility.
These are decision criteria, not universal laws. A small function, local helper, framework component, or direct dependency may be the best design.
Framework fit
Apply the same criteria using native conventions: Spring services and beans, React or Next.js components and hooks, Swift types and protocols, or equivalent structures in other ecosystems. Do not force one ecosystem's layering or terminology onto another.
For dependency categories and test strategies, see DEEPENING.md.
Completion
A design recommendation is complete when ownership, interface, dependencies, test seam, migration scope, tradeoffs, and repository fit are explicit.
What ships with it: 4 files
4.8 KB alongside SKILL.md
agents/
- openai.yaml233 B
- DEEPENING.md1.1 KB
- DESIGN-IT-TWICE.md871 B
- THIRD_PARTY_NOTICES.md2.6 KB