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 executing the full Patterns 1–5 repo decomposition pipeline or per-pattern inventories (use modular-decomposition), phased extraction roadmaps as the main deliverable (use decomposition-planning-roadmap), or end-to-end legacy migration strategy (use legacy-migration-planner).
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionmodular-design-principlesExecute the skills CLI command in your project's root directory to begin installation:
Fetches modular-design-principles from tech-leads-club/agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate modular-design-principles. Access via /modular-design-principles in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
4.4K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
4.4K
stars
| name | modular-design-principles |
| description | > 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 executing the full Patterns 1–5 repo decomposition pipeline or per-pattern inventories (use modular-decomposition), phased extraction roadmaps as the main deliverable (use decomposition-planning-roadmap), or end-to-end legacy migration strategy (use legacy-migration-planner). |
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.
| Task | Where |
|---|---|
| Principles table + violations + workflows (this file) | SKILL.md |
| Per-principle definition, agent rules, abstract examples | references/principles.md |
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.
| # | 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.
Use when introducing a new cohesive area of the system (greenfield module or extracted domain).
Cross-module interaction (while designing): prefer the minimal contract; define timeouts, retries, idempotency for async; avoid “temporary” direct store access as a shortcut.
Default: fewer boundaries until real pain appears — “flat is often better” than premature fragmentation. Splitting adds coordination, versioning, and operational cost.
| # | Criterion | Question |
|---|---|---|
| 1 | Language | Do the sub-areas use different vocabulary or conflicting definitions of the same word? |
| 2 | Rate of change | Do parts change on different cadences or for unrelated reasons (most edits touch one side)? |
| 3 | Scale / SLO | Do parts need different throughput, latency, or availability targets? |
| 4 | Consistency | Do they need different transaction boundaries (cannot share one atomic write model cleanly)? |
| 5 | Ownership | Would different teams or clear ownership lines reduce conflict and review churn? |
| 6 | Pain signal | Is there observable integration pain: ripple effects, fear of change, unclear who owns a bug? |
Cohesion / coupling (qualitative). Favor high cohesion inside a module and low, explicit coupling between modules. If the only motivation is “files got big” or “folder aesthetics,” merge or wait.
Sometimes one outer boundary is right, but inside it there are named sub-areas (subdomains, feature areas). Principles still apply within the context.
Ownership
Cross-sub-unit access
Shared kernel inside the context
Anti-pattern: A single “persistence” or “data” sub-module that becomes the only place that knows about all tables/documents for all sub-units, and everyone else reaches through it — same problems as cross-context reach-through, inside the boundary.
Use for reviews or audits without assuming tooling. Treat items as signals, not proof — confirm with domain experts.
| Tier | Meaning |
|---|---|
| P0 | Data corruption risk, security boundary violation, or cross-context persistence with no contract |
| P1 | Unclear ownership, leaky public API, missing failure semantics at boundaries |
| P2 | Observability gaps, composability smells, tech debt that increases future coupling |
Maturity note: Scoring is qualitative unless the team defines numeric gates. Use trends: fewer P0/P1 over time, clearer contracts.
When a project has concrete conventions (framework modules, DI, repository patterns, folder layout, codegen, CI checks), prefer those documents for how to implement. Use this skill for why boundaries exist and what good modular design optimizes for — so stack-specific advice stays aligned with the same principles.
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
tech-leads-club/agent-skills
tech-leads-club/agent-skills
tech-leads-club/agent-skills
tech-leads-club/agent-skills
tech-leads-club/agent-skills
sickn33/antigravity-awesome-skills
modular-design-principles is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
We added modular-design-principles from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
modular-design-principles reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: modular-design-principles is the kind of skill you can hand to a new teammate without a long onboarding doc.
Solid pick for teams standardizing on skills: modular-design-principles is focused, and the summary matches what you get after install.
We added modular-design-principles from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
modular-design-principles is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: modular-design-principles is focused, and the summary matches what you get after install.
I recommend modular-design-principles for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in modular-design-principles — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 52