Skip to content
Agentmart
Submit a tool

module-design

How to design a new module, or a change to an existing module's behaviour or contract, before coding it, and how to retire its build docs afterwards.

Skill by heartnetkung

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/heartnetkung-module-design

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

How to design a new module, or a change to an existing module's behaviour or contract, before coding it, and how to retire its build docs afterwards. Use when starting a new module or package, or changing an existing one's behaviour or contract (contract.md, then spec.md, then boundary.md, then two parallel review agents for simplification/reuse and design quality), and again when that module's implementation is about to be committed or pushed (promote what building taught you, then delete the spec and boundary). Also use when asked to prune, retire, or clean up an existing spec or module README.

Use cases: documents, design

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/module-design

What's inside

Skill name
module-design
Description
How to design a new module, or a change to an existing module's behaviour or contract, before coding it, and how to retire its build docs afterwards. Use when starting a new module or package, or changing an existing one's behaviour or contract (contract.md, then spec.md, then boundary.md, then two parallel review agents for simplification/reuse and design quality), and again when that module's implementation is about to be committed or pushed (promote what building taught you, then delete the spec and boundary). Also use when asked to prune, retire, or clean up an existing spec or module README.
License
MIT
Instructions
39 lines in SKILL.md · view on GitHub

Files (10)

  • LICENSE-design-philosophy
  • SKILL.md
  • design-philosophy.md
  • design.md
  • example-contract.md
  • merge.md
  • removal.md
  • reviewer-common.md
  • reviewer-design.md
  • reviewer-simplification.md

SKILL.md (first lines)

# Module docs: contract.md is permanent, the build docs are not

- **`contract.md`** — what the rest of the system may assume of this module, and the rules keeping
  it true. Permanent. Written *before* the spec.
- **`spec.md`** — scaffolding for writing the code. **Deleted when all PRs of the module land.** Never
  named `README.md`: a doomed file must not wear a durable name.
- **`boundary.md`** — everything the module touches on the outside. Written *after* the spec, in a
  separate pass. **Deleted when all PRs of the module land**, alongside the spec.

**Default home for a durable fact is the code it is about** — call-site comment, test, docstring,
`--help`, or the commit message that made the change. `contract.md` is the narrow exception; when in doubt it is not a clause.

**One-way citation:** the doomed files may cite the contract, never the reverse. A contract citing
`spec.md §Foo` breaks when the spec is deleted.

## Resolve this skill's directory first

The rest of this skill is in files next to this one, and the reviewers are spawned with their
rubrics named by path. **Resolve the directory to an absolute path now** — an agent starts cold
and cannot resolve "next to the skill you were spawned from". It is the "Base directory for this
skill" that Claude Code printed when this skill loaded — the same line whether it came from a
plugin or a symlink. **If there is no such line** (the skill arrived as text with no path
attached), **stop and tell the user** — never guess a path.

---

## Phase 1 — starting a module

`contract.md`, then `spec.md`, then `boundary.md`, then two review agents, then reconcile.
**Read `design.md` now**, before writing any of them. No implementation code until that sequence
has finished.

## Phase 2 — at merge / commit / push

The build docs are deleted here, but only after what could not be written in advance is captured —
and that is the part that gets skipped when it is done from memory. **Read `merge.md` and follow
its seven steps** in the module's last PR. Earlier PRs commit the build docs unchanged, so the
next PR's session reads them from `main`.

From heartnetkung/claude-skills, MIT.

More from heartnetkung/claude-skills

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Oct 23, 2026 (5 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from heartnetkung

Cite this page

module-design skill. Agent Mart. https://agentmart.dev/skills/heartnetkung-module-design (last updated 2026-10-24)