module-design

module-design is a command for GitHub Copilot from yuri-semenenko/ai-engineering-workspace. It costs 17 tokens per session (557 once invoked), scanned A, original, MIT.

A design prompt for deciding what a software module should expose and what it should hide. It focuses on small interfaces, clear boundaries, dependency injection, and whether an abstraction is justified.

In plain words
What is it for?
Use it when creating or reviewing a module, interface, helper, or wrapper, especially when deciding its public functions and testing seam.
Why use it?
It helps prevent wrappers and layers that add complexity without hiding useful details. It also gives a way to identify a boundary that is too large or unnecessary.

Command for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt.

Good fit Use it when creating or reviewing a module, interface, helper, or wrapper, especially when deciding its public functions and testing seam.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/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.

Clone the repo
git clone --depth 1 https://github.com/yuri-semenenko/ai-engineering-workspace

Made for: GitHub Copilot.

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/commands/yuri-semenenko/ai-engineering-workspace/module-design/github.svg)](https://agentmods.dev/commands/yuri-semenenko/ai-engineering-workspace/module-design)
Your own site
<a href="https://agentmods.dev/commands/yuri-semenenko/ai-engineering-workspace/module-design"><img src="https://agentmods.dev/badge/commands/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/commands/yuri-semenenko/ai-engineering-workspace/module-design"><img src="https://agentmods.dev/badge/commands/yuri-semenenko/ai-engineering-workspace/module-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 557 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.00017 $0.00557
Opus 5.5 $0.00007 $0.00223
Sonnet 5.5 $0.00003 $0.00111
Haiku 4.5 $0.00002 $0.00056

Measured 5d ago against content hash 6456ab6a5746, 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 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.

copilot/workspace-template/.github/prompts/module-design.prompt.md · 38 lines

What it actually says

Module Design Prompt

Role: Act as a senior engineer designing or reviewing a module boundary. The unit of design is the interface a caller sees, not the code behind it.

Context: A module, interface, helper, or wrapper is being created or reviewed, and the question is what it should expose and whether an abstraction is worth it.

Task: Recommend a concrete module shape: the interface, what stays hidden, and where the test seam is. When reviewing, name the boundary that is wrong and give the smaller shape.

Constraints:

  • Prefer a small, stable interface over a wide one. Expose what the caller needs; hide how it works. Mutable state is part of the how: give each caller its own when they do not need to share it, otherwise make the module its single writer, and only then reach for locks or synchronization.
  • Depth is a property of the interface, not the line count. A layer that only forwards calls hides nothing — flag it.
  • Apply the deletion test: if removing the module scatters its knowledge back into callers, it encapsulates nothing; inline it.
  • One implementation behind an abstraction is a hypothetical seam; introduce the interface when the second appears, not before.
  • Inject dependencies and return results rather than reaching for globals or firing hidden side effects. Settle the data shape before the logic: where it can be in more than one state, name the valid states and transitions, and let a type rule out an impossible combination where that is simpler than a runtime check.
  • Parse outside data 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 at a new trust boundary, such as a separately deployed service that consumes it.
  • Prefer composition of small functions over inheritance and framework hooks.
  • A boundary you cannot test through cheaply is the wrong boundary. Fix the boundary rather than mocking around it.
  • Present the simplest shape first and justify every layer against its indirection cost, a state machine, validation schema, or adapter included; a plain union and one parse function are often enough.

Output Format:

  1. The recommended interface (signatures and types)
  2. What stays hidden behind it
  3. Where the test seam is
  4. For a review: the specific interface that is too wide, the forwarding-only layer, or the single-implementation adapter, and the smaller shape

Success Criteria:

  • The interface exposes what callers need and no more.
  • The module can be tested through its interface without reaching inside.
  • Every abstraction present is justified by a real second use, not a hypothetical one.
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 Changed · +1 lines 6456ab6a5746
  2. 6d ago First seen · 37 lines · 17 tokens per session scan A 356c6240dba3

Subscribe to this mod's changes

module-design is a command published in the GitHub repository yuri-semenenko/ai-engineering-workspace (4 stars, last pushed 3d ago), licensed MIT. It adds 17 tokens to every session and 557 once invoked, about $0.0001 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-10-31.

Related

module-design compared with commands from other repositories

module-design next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
module-designyuri-semenenko/ai-engineering-workspaceCommand43d agoMITA17GitHub Copilot
pr-quality-gate-qarjmurillo/ai-agentsCommand49yesterdayMITA0GitHub Copilot
pr-quality-gate-agent-safetyrjmurillo/ai-agentsCommand49yesterdayMITA0Claude Code, GitHub Copilot
pr-quality-gate-code-qualityrjmurillo/ai-agentsCommand49yesterdayMITA0GitHub Copilot
pr-quality-gate-decision-rigorrjmurillo/ai-agentsCommand49yesterdayMITA0GitHub Copilot
pr-quality-gate-reliabilityrjmurillo/ai-agentsCommand49yesterdayMITA0GitHub Copilot
pr-quality-gate-roadmaprjmurillo/ai-agentsCommand49yesterdayMITA0GitHub Copilot