modular-design-principles
Was er macht
Dieser Skill gibt der KI zehn Prinzipien für das Entwerfen und Prüfen der Modulstruktur an die Hand, etwa klare öffentliche Schnittstellen, Unabhängigkeit und das Eingrenzen von Fehlern. Er richtet sich an Architekten und Entwickler, die in jedem Technologie-Stack saubere Grenzen wollen.
Wann du ihn nutzt
- ✓Wenn du entwirfst, wie ein System in Module oder Dienste aufgeteilt werden soll.
- ✓Wenn du eine Codebasis auf gemeinsam genutzte Abhängigkeiten prüfst, die Probleme verursachen.
- ✓Wenn du entscheiden musst, ob ein Modul geteilt oder zusammengeführt werden soll.
Link zum Skill
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/modular-design-principles/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Prüfe unseren Projektaufbau und sag mir, wo die Modulgrenzen schwach sind und wie wir sie verbessern.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Die KI nutzt eine kurze Reihe von Prinzipien zu Grenzen, Kombinierbarkeit, Zustandsisolation und Verträgen und prüft den Entwurf anhand davon.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Modular Design Principles
Use this skill when reasoning about structure and boundaries in any codebase. It intentionally avoids framework names, folder conventions, and tooling — map principles to your stack locally.
What to load
| Task | Where |
|---|---|
| Principles table + violations + workflows (this file) | SKILL.md |
| Per-principle definition, agent rules, abstract examples | references/principles.md |
Layered mental model
- Composition roots (applications, hosts, runners): wire modules together; keep orchestration thin.
- Modules / bounded contexts: cohesive units of behavior and data ownership; each should be understandable and testable on its own.
- Shared kernels (use sparingly): only stable, truly cross-cutting concepts; resist turning them into a grab-bag of “everything everyone needs.”
How you physically lay this out (mono repo, multi repo, packages, libraries) is a delivery choice, not the definition of modularity. The principles below still apply.
The ten principles
| # | Principle | Intent |
|---|---|---|
| 1 | Well-defined boundaries | A small, stable public surface; everything else is internal. Consumers depend on contracts, not internals. |
| 2 | Composability | Modules can be used alone or combined without special knowledge of each other’s internals. |
| 3 | Independence | No hidden shared mutable state across boundaries; each module should be testable in isolation (with fakes or test doubles at the edges). |
| 4 | Individual scale | Resources (compute, storage, rate limits, batch size) can be tuned per module where it matters, without rewriting others. |
| 5 | Explicit communication | Cross-module interaction uses documented contracts (APIs, events, messages, shared types) — not incidental coupling. |
| 6 | Replaceability | Dependencies on other modules are expressed through interfaces or protocols so implementations can change. |
| 7 | Deployment independence | Modules do not assume they share a process, host, or release cadence unless that is an explicit architectural decision. |
| 8 | State isolation | Each module owns its persistent state and naming; no silent sharing of the same logical data store or ambiguous global names across boundaries. |
| 9 | Observability | Each module can be diagnosed on its own: logs, metrics, traces, health — attributable to the unit that emitted them. |
| 10 | Fail independence | Failures are contained (timeouts, bulkheads, circuit breaking, idempotency) so one module’s outage does not blindly cascade. |
Principle 8 is often the hardest: ambiguous ownership of data or names is a frequent source of “works until it doesn’t” integration bugs.
For depth (rules for agents + abstract examples per principle), load references/principles.md.
Typical violations (stated abstractly)
- Colliding concepts — the same name or schema for different things in different modules, or duplicate “global” definitions that diverge over time.
- Reach-through persistence — one module reading or writing another module’s tables, buckets, or documents without going through an agreed contract.
- Centralized data ownership — a single persistence layer that registers and exposes all stores for all modules, encouraging hidden coupling.
- Logic at the edge — business rules in transport adapters (HTTP handlers, UI, CLI) instead of domain/application code.
- Edge talking to storage directly — adapters depending on low-level persistence APIs instead of use cases or application services.
- Unscoped transactions — writes that span boundaries without clear transaction ownership and failure semantics.
- Leaky exports — repositories, internal services, or implementation types exposed as the module’s public API.
- Facades that aren’t thin — “public” entry points that embed querying, mapping, or policy instead of delegating to the right layer inside the module.
Creating a bounded context (workflow)
Use when introducing a new cohesive area of the system (greenfield module or extracted domain).
- Scope and language — Name the context; list core nouns/verbs (ubiquitous language). Reject vague names that collide with other contexts.
- Responsibilities — What decisions happen only here? What is explicitly out of scope?
- State ownership — Which facts are **authori
Häufige Fragen
Hängt er von einem bestimmten Framework ab?
Nein. Die Prinzipien sollen in jedem Technologie-Stack gelten.
Beschreibt er Ordnerstrukturen?
Nein. Dein Team wählt die physische Struktur, und die Prinzipien gelten trotzdem.
Sind das Code-Stilregeln?
Nein. Es geht um Struktur und Grenzen, nicht um Codestil.
Details
Originalbeschreibung des Autors
Technology-agnostic guidance for modular systems: bounded contexts, clear boundaries, composability, state isolation, explicit contracts, failure containment, scaffolding workflows, split/merge criteria, sub-units inside a context, and compliance review signals. Use when designing or reviewing module structure, service boundaries, package layout, cross-cutting dependencies, "how should we split this?", modularity assessments, coupling between domains, greenfield context design, or architecture discussions without assuming a specific framework, language, or repository layout. Do NOT use for exe
Beliebtheit
- GitHub-Sterne
- 7.1k
- Platz im Ranking
- #13510
- Lizenz
- —
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
component-common-domain-detection
7.1kHilft deinem Agenten, Geschäftslogik zu finden, die in mehreren Teilen einer Codebasis wiederholt wird, und vorzuschlagen, wie sie zusammengeführt werden kann.
component-flattening-analysis
7.1kHilft deinem Agenten, falsch platzierten Code zu finden und verschachtelte Komponentenordner zu vereinfachen, damit jedes Teil dort liegt, wo es hingehört.
component-identification-sizing
7.1kHilft deinem Agenten, die Bausteine einer Codebasis zu kartieren und ihre Größe zu messen, um herauszufinden, welches Modul man zuerst aufteilen sollte.
coupling-analysis
7.1kHilft deinem Agenten zu prüfen, wie eng Teile einer Codebasis voneinander abhängen, und welche Verbindungen zuerst gelockert werden sollten.
Ähnliche Skills
diffs
394kLässt deinen Agenten einen echten, teilbaren Diff seiner Änderungen als Viewer-Link oder Bilddatei erstellen, statt einer handgeschriebenen Zusammenfassung.
coding-agent
394kHilft deinem Agenten, eine größere Programmieraufgabe als Hintergrund-Worker an Codex, Claude Code oder OpenCode zu übergeben und danach den Fortschritt zu prüfen.
gh-issues
394kHilft deinem Agenten, GitHub-Issues zu finden, die zu bearbeitenden auszuwählen und Pull Requests mit Korrekturen zu öffnen, einschließlich der Nacharbeit an Review-Kommentaren.