agentleFS
jscott3201jscott3201/yet-more-skills/skills/module-design/SKILL.md

module-design

Skill4 starsChanged 2 months agoApache-2.0View on GitHub

Analyze or improve module boundaries, interfaces, ownership, and test seams for a requested design or refactor. Prefer simpler callers and local invariants; not automatic abstraction or permission to rewrite.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the relevant source, consumers, tests, and repository terminology.

    line 16
  2. Distinctive:

    Put invariants with the state that owns them.

    line 24

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Module Design

Seek interfaces that give callers useful behavior without making them coordinate internal details. Keep related state, invariants, failure handling, and change together. This is design guidance, not a mandate to create architecture documents.

Inspect the current pressure

Read the relevant source, consumers, tests, and repository terminology. Use code-index tools when available and useful; direct source inspection is a complete fallback. Identify the specific cost: duplicated decisions, leaky lifecycle rules, difficult testing, tightly coupled changes, or surprising failure behavior.

List what callers currently need to know: types, ordering, ownership, errors, configuration, and important performance promises. Ask what would happen if the module disappeared. Would complexity disappear with it, or merely move into every caller?

Compare proportionate alternatives

Consider deletion, consolidation, a clearer concrete API, or an adapter at a real variation boundary before adding generic machinery. One implementation does not automatically forbid an interface; a faithful test adapter or likely independent consumer can justify a seam. Conversely, an imagined future consumer does not automatically justify one.

Put invariants with the state that owns them. Keep volatile integration details behind an appropriate boundary while preserving required control, observability, recovery, and portability. Avoid hiding blocking behavior, ownership transfers, or durability tradeoffs behind a superficially small API.

For a material open interface choice, compare genuinely different options and explain the tradeoff. For an obvious local cleanup, act within the authorized scope rather than inventing alternatives or a formal design approval.

Ground the proposal in evidence

Identify the affected callers, preserved behavior, useful test seam, and any migration needed. Distinguish current pain from a speculative benefit. Demonstrate performance claims with representative measurements; interface elegance alone is not a benchmark.

Return a concise recommendation and the decisions that remain. Write a design note only when requested or when a consequential tradeoff needs durable context in the existing project format. Do not implement, change public compatibility, or broaden scope merely because this skill was invoked.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.