Generates or audits a modular monolith structure across .NET, Java/Kotlin, TypeScript, Python, and Go. Sets up business-capability modules with enforced boundaries, internal-by-default code, public contracts, and guardrail tests.
Ships in AI for Developers Toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set up (or tighten) a modular monolith: each module owns its domain and data, exposes a small public contract, keeps everything else internal, and talks to other modules through that contract or in-process events - module independence without microservice overhead.
Works on a target: a file, folder, project/repo, or GitHub URL. If modules exist, audit their boundaries (who imports whose internals, who reads whose tables); if not, propose a split by business capability, not by technical layer.
| Manifest | Stack | Module unit | Boundary mechanism | Guardrail |
|---|---|---|---|---|
*.csproj / *.sln | C# / .NET | project per module (+ .Public contracts project) | internal by default, project references | NetArchTest / ArchUnitNET |
pom.xml / build.gradle(.kts) | Java / Kotlin | top-level package per module (Spring Modulith) or Gradle/Maven module | package-private, internal subpackages | Spring Modulith verify(), ArchUnit |
package.json | TypeScript / Node | folder or workspace package per module; NestJS @Module | index.ts public API, NestJS exports, package exports field | dependency-cruiser, eslint-plugin-boundaries, @nx/enforce-module-boundaries |
pyproject.toml | Python | top-level package per module | __init__.py re-exports the public API, _private naming | import-linter (independence, forbidden) |
go.mod | Go | directory per module | internal/ under each module (compiler-enforced) | depguard / go-arch-lint |
Map the current structure with the manifest files, directory tree, and an import scan before proposing anything.
src/
├── Modules/
│ ├── Orders/
│ │ ├── Orders.Public/ # contracts other modules may use (DTOs, integration events, a facade interface)
│ │ └── Orders/ # internal: domain, handlers, EF - internal by default
│ ├── Billing/
│ │ ├── Billing.Public/
│ │ └── Billing/
├── Shared/ # truly shared kernel only (Result, base types)
└── Host/ # composition root: wires every module
public interface IModule
{
IServiceCollection RegisterModule(IServiceCollection services, IConfiguration config);
void MapEndpoints(IEndpointRouteBuilder app);
}
// Host discovers and calls every IModule - no module references another module's internals.
.Public projects. Its own types are internal; use InternalsVisibleTo only for its test project.System.Threading.Channels; for reliability, an outbox per module.DbContext and schema per module (modelBuilder.HasDefaultSchema("orders")).Guardrail (NetArchTest):
[Fact]
public void Billing_does_not_reference_Orders_internals()
{
var result = Types.InAssembly(typeof(BillingModule).Assembly)
.Should().NotHaveDependencyOn("Company.Modules.Orders") // internal assembly, not Orders.Public
.GetResult();
Assert.True(result.IsSuccessful);
}
com.acme.shop
├── ShopApplication.java
├── orders/ # module: public types here are the API
│ ├── OrderService.java # public facade
│ ├── OrderPlaced.java # public integration event
│ └── internal/ # implementation, not accessible to other modules
└── billing/
└── internal/
@Test
void verifiesModularStructure() {
ApplicationModules.of(ShopApplication.class).verify();
}
Events: publish with ApplicationEventPublisher, consume with @ApplicationModuleListener (async, after commit, tracked by the event publication registry so failed listeners can be retried). Prefer package-private classes. Without Spring Modulith, use ArchUnit slices().matching("com.acme.shop.(*)..").should().notDependOnEachOther() plus explicit allowed-dependency rules.
src/modules/
├── orders/
│ ├── index.ts # public API: facade, DTO types, event types - the only importable file
│ ├── orders.module.ts # NestJS: exports only the facade provider
│ ├── domain/ application/ infrastructure/
└── billing/
NestJS: a module exports only its facade; other modules import the module, not its providers' files. In-process events via @nestjs/event-emitter or the EventBus from @nestjs/cqrs; plain Node via a typed EventEmitter wrapper. Enforce "import only modules/<x>/index.ts" with dependency-cruiser or eslint-plugin-boundaries; in an Nx or pnpm workspace, make each module a package with an exports field and tag-based @nx/enforce-module-boundaries. One schema or table prefix per module (Prisma multi-schema or separate clients if the project already does that).
shop/
├── orders/
│ ├── __init__.py # re-exports the public API only (facade functions, DTOs, events)
│ ├── _domain.py _service.py _repository.py
└── billing/
In-process events: a simple publish/subscribe registry, or Django signals in Django projects (keep handlers in the subscribing module). Django: one app per module, no cross-app model imports or foreign keys except through the public API (store foreign IDs as plain values). Guardrail with import-linter:
# Fully independent modules (they talk only via events/the host):
[[tool.importlinter.contracts]]
name = "Modules are independent"
type = "independence"
modules = ["shop.orders", "shop.billing", "shop.catalog"]
# Or, when billing may call the orders public API but not its internals:
[[tool.importlinter.contracts]]
name = "Billing uses only the Orders public API"
type = "forbidden"
source_modules = ["shop.billing"]
forbidden_modules = ["shop.orders._domain", "shop.orders._service", "shop.orders._repository"]
internal/
├── orders/
│ ├── orders.go # public API: Service interface, DTOs, events
│ └── internal/ # domain, storage - importable only from internal/orders/...
├── billing/
│ ├── billing.go
│ └── internal/
└── platform/ # shared kernel: config, db, eventbus
cmd/shop/main.go # composition root
The compiler enforces orders/internal for free. For sibling rules ("billing must not import orders except its root package"), add depguard or go-arch-lint. In-process events: a small typed pub/sub in platform/eventbus, or Watermill with its in-memory Go channel pub/sub if the project may later move to a broker.
## Detected
<stack, current modules (or proposed split), boundary violations found>
## Structure
<tree + what is public vs internal per module>
## Files
<module registration/wiring, contracts, event bus, data ownership changes>
## Guardrail
<the test/config that fails CI when a module reaches into another, and how to run it>
## Leaks to fix
<existing cross-module imports, shared tables, cross-module joins - with the fix for each>
"Structure this app as a modular monolith", "audit my module boundaries", "split this monolith into Orders/Billing/Catalog modules with contracts", "set up Spring Modulith for this app", "NestJS modules that only expose a facade", "import-linter contracts so my Django apps stay independent", "Go module layout with internal/ packages", "add a guardrail test so modules can't reach into each other". Pairs with architecture-test-generator (more rules) and the architecture-reviewer agent.
What SKILL.md sets; muted values are Claude Code's defaults
/ai-dev-toolkit:modular-monolith-generatorfrom AI for Developers Toolkit
npx claudepluginhub stefanthecode/ai-for-developers --plugin ai-dev-toolkit45 skills in this plugin
/api-endpoint-scaffolderScaffold HTTP API endpoints in any stack - ASP.NET Core Minimal APIs or controllers, Express, Fastify, NestJS, FastAPI, Django REST Framework, Spring Boot controllers, Go net/http, chi, Gin - one feature per endpoint (REPR style) with request validation, typed responses, route grouping, auth, and OpenAPI metadata. Use this skill whenever the user wants to add an endpoint or route, convert controllers to minimal APIs, structure routes or routers, set up endpoint groups, TypedResults, route handlers, request DTOs/schemas (zod, Pydantic, Bean Validation, binding tags), or asks "how do I add an endpoint / structure my API routes". Always use this skill for endpoint scaffolding; it generates a complete, validated endpoint that matches the project's conventions./architecture-test-generatorGenerate architecture tests / fitness functions that fail the build when architectural rules are violated - layer dependencies, module boundaries, cycles, naming, and visibility conventions - in any stack: NetArchTest or ArchUnitNET (.NET), ArchUnit or Konsist (Java/Kotlin), dependency-cruiser or eslint-plugin-boundaries (TypeScript/JavaScript), import-linter (Python), go-arch-lint or depguard (Go). Use this skill whenever the user wants architecture tests, to enforce layering or the dependency rule, dependency rules as tests, import rules, forbidden imports, no circular dependencies, naming conventions, fitness functions, or asks "how do I stop people breaking the architecture / enforce my layers / keep modules from importing each other". Always use this skill for architecture-test requests; it generates rules matching the project's real structure.Other plugins' skills for the same job