Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
madebymlai avatar

Design Principles

  • 1 installs
  • Updated July 8, 2026
  • madebymlai/agentstack

Pick structural design rules (module depth, hiding, Demeter) and paste the chosen principles into AGENTS.md before agents implement features.

About

Design Principles is an architecture catalog from AgentStack that helps developers and small teams document structural choices agents should follow before and during implementation. Instead of mechanical checks, it offers named patterns—deep modules, information hiding, tell-don't-ask, Law of Demeter, and related coupling guidance—each with a short “pick when” signal so you apply judgment consistently. The intended output lands in AGENTS.md under Design Principles, giving Claude Code, Cursor, and similar agents stable boundaries while they write or refactor. Use it when wrappers multiply, the same schema leaks across files, or callers interrogate object state instead of issuing commands. It pairs naturally with planning and review phases when you want architectural intent written down once, not rediscovered in every PR.

  • Architecture decision catalog for judgment-heavy rules not covered by linters
  • Module boundary patterns: deep modules, information hiding, tell-don't-ask
  • Coupling guidance including Law of Demeter and when to apply each principle
  • Explicit destination: AGENTS.md Design Principles section
  • Pick-when cues for classitis, duplicated format knowledge, and feature envy

Design Principles by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #14,102 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 9, 2026 (Skillselion catalog sync)
npx skills add https://github.com/madebymlai/agentstack --skill design-principles

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedJuly 8, 2026
Repositorymadebymlai/agentstack

What it does

Pick structural design rules (module depth, hiding, Demeter) and paste the chosen principles into AGENTS.md before agents implement features.

Files

SKILL.mdMarkdownGitHub ↗

<purpose> A design principles writer. Probe the codebase, propose principles one menu at a time, let the user accept or reject each, then append the accepted set to AGENTS.md. These are pre-implementation design decisions that require judgment — they shape how work is structured before and while it is written. Line-level coding style lives elsewhere (the coding-standards skill / CODING_STANDARDS.md), enforced at diff-review time. </purpose>

<rules>

  • All user interaction via direct questions — one catalog section at a time.
  • Accumulate accepted items in memory; write the file only at the end.
  • Explain what you found in the codebase before each recommendation.
  • Recommend, don't gatekeep: surface the full menu, flag the items the code argues for, but let the user pick freely (including items you didn't flag, and skipping ones you did).
  • Principles are judgment calls a designer applies — not mechanically checkable lint rules. If a tool can enforce it, it does not belong here.

</rules>

<phase name="locate"> The target is an agent-managed block at the bottom of AGENTS.md at the repo root, bounded by <design-principles></design-principles> tags. The tags mark the block as managed by this skill so it can be located and rewritten on later runs without disturbing the rest of AGENTS.md.

  • If the `<design-principles>` block exists — read it. Treat its current principles as already-decided: do not re-propose them. The session is then an update — you are adding to (or, if the user asks, revising) the existing set.
  • If it is missing — this is a fresh write; you will append a new <design-principles></design-principles> block at the end of AGENTS.md at the end of the session. If AGENTS.md itself does not exist, create it.

Tell the user whether you're creating the block or updating it. </phase>

Catalogs

Read both for the full menu. Each item carries a one-line definition and a > Pick when: signal describing the design smell it addresses.

  • catalogs/ARCHITECTURE.md — module boundaries, coupling
  • catalogs/DESIGN.md — SOLID, simplicity, domain modeling, robustness

<phase name="present"> Show the user each catalog's items, grouped by section, with the name and its one-line definition. Skip any item already present in the target section (from the locate phase). Keep it scannable — the user is choosing from a menu, not reading an essay. </phase>

<phase name="recommend"> Probe the codebase before recommending. Use the codebase-memory MCP tools first (get_architecture, search_code, search_graph). Flag the catalog items whose > Pick when: signal matches evidence you actually found — and say what evidence. Do not hide the items you didn't flag. </phase>

<phase name="select"> The user picks which principles they want. They may pick items you didn't recommend, or skip ones you did. Confirm the final set before writing. </phase>

<phase name="write"> Write the selected principles into a <design-principles></design-principles> block at the bottom of AGENTS.md. Inside the tags, the principles sit directly under the same ## section headers as the catalogs, each as - **Name** — definition in 1–2 sentences.. Do not include the > Pick when: signals or source links — only the principle and its definition.

<design-principles>
## Module Design
- **SRP** — A module should have one, and only one, reason to change.
...
</design-principles>

When updating, rewrite the existing block in place — merge new items under their sections without disturbing the tags, the rest of AGENTS.md, or the items already inside. </phase>

<phase name="summary"> Report what was written: the path, whether the <design-principles> block was created or updated, and the list of principles grouped by section. Note that this block guides design decisions at planning time, not the diff-review loop. </phase>

Related skills

AI & Agent Buildingintegrationsdocs

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.