用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill modular-monolith命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | modular-monolith |
| description | Modular monolith with bounded contexts. Use for scalable monoliths. |
A Modular Monolith is a single deployable unit (Monolith) where the code is structured into independent modules (like Microservices) with strict boundaries. In 2025, this is the recommended default architecture for most startups and medium-scale apps.
/src
/Modules
/Catalog <-- Public Interface defined here
/Core <-- Internals (Classes, Logic) hidden
/API <-- Public Contracts (DTOs)
/Ordering
/Core
/Shipping
/Core
/Shared <-- Infrastructure, Event Bus
// Communication via In-Process Interfaces or Events
public class OrderService {
private readonly ICatalogModule _catalog; // In-memory reference, but strict contract
public async Task Checkout(string productId) {
var product = await _catalog.GetProduct(productId); // Fast 0ms call
// ...
}
}
Code in Module A cannot access internal classes of Module B. It can only use Module B's "Public API" (Interfaces/DTOs). Enforced by compiler tools (ArchUnit, NetArchTest).
Modules are compiled together into one binary/container and deployed to one server/cluster. Simplifies Ops.
Ideally, each module has its own DB schema (or at least different tables). Cross-module Joins are forbidden.
Using a mediator (like MediatR in .NET or Spring Events) to decouple modules. Module A publishes OrderCreated, Module B listens. No Kafka needed (yet).
Defining strict interfaces that act as "Gateways" between modules. Changing the internals of Module A doesn't break Module B as long as the interface holds.
Do:
Ordering cannot depend on Shipping").Don't: