modular-monolith

modular-monolith is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 20 tokens per session (663 once invoked), scanned A, original, MIT.

A way to organize one application into separate business modules while keeping it as a single deployable program. Each module hides its internal code and exposes defined ways for other modules to communicate.

In plain words
What is it for?
Use it when building or restructuring applications with areas such as catalog, ordering, and shipping, especially when future separation into multiple services is possible.
Why use it?
It keeps a growing codebase from becoming tangled while preserving the simpler deployment of a monolith, a single application released as one unit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building or restructuring applications with areas such as catalog, ordering, and shipping, especially when future separation into multiple services is possible.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/g1joshi/agent-skills/modular-monolith
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add G1Joshi/Agent-Skills --skill modular-monolith
Clone the repo
git clone --depth 1 https://github.com/G1Joshi/Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modular-monolith

README.md
[![agentmods](https://agentmods.dev/badge/skills/g1joshi/agent-skills/modular-monolith/github.svg)](https://agentmods.dev/skills/g1joshi/agent-skills/modular-monolith)
Your own site
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/modular-monolith"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/modular-monolith/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modular-monolith

Your own site · 80×15
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/modular-monolith"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/modular-monolith.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00663
Opus 5 $0.00010 $0.00331
Sonnet 5 $0.00004 $0.00133
Haiku 4.5 $0.00002 $0.00066

Measured 8d ago against content hash 3516bc2b79c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

modular-monolith scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/architecture/modular-monolith/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modular Monolith

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.

When to Use

  • Starting a new project (Greenfield).
  • Domain boundaries are not yet fully clear.
  • Wanting the speed of simple deployment (one CI pipeline, one DB instance) but preventing "spaghetti code".
  • Precursor to Microservices.

Quick Start

/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
        // ...
    }
}

Core Concepts

Module Boundaries

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).

Single Deployment

Modules are compiled together into one binary/container and deployed to one server/cluster. Simplifies Ops.

Data Isolation (Virtual)

Ideally, each module has its own DB schema (or at least different tables). Cross-module Joins are forbidden.

Common Patterns

In-Memory Events

Using a mediator (like MediatR in .NET or Spring Events) to decouple modules. Module A publishes OrderCreated, Module B listens. No Kafka needed (yet).

Internal APIs

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.

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 91 lines · 20 tokens per session scan A 3516bc2b79c3

Subscribe to this mod's changes

modular-monolith is a skill published in the GitHub repository G1Joshi/Agent-Skills (12 stars, last pushed 7mo ago), licensed MIT. It adds 20 tokens to every session and 663 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

addyosmani/agent-skills · 49 tokens

nestjs-modular-monolith

Specialist in designing and implementing scalable modular monolith architectures using NestJS with DDD, Clean Architecture, and CQRS patterns. Use when building modular monolith backends, designing bounded contexts, creating domain modules, implementing event-driven module communication, or when user mentions "modular…

tech-leads-club/agent-skills · 131 tokens

component-identification-sizing

Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use…

tech-leads-club/agent-skills · 81 tokens

evolutionary-modular-architecture

Guides design and implementation of evolutionary modular-monolith platforms with DDD (strategic + tactical), flat-by-aggregate organization, an Anti-Corruption Layer for vendor independence, a transactional outbox for events, smart resilience (backoff with jitter, circuit breakers, idempotency), and a polished…

tech-leads-club/agent-skills · 208 tokens

modular-decomposition

Runs a sequenced monolith-to-modular pipeline that sizes and inventories components, finds shared domain duplication, addresses flattening and hierarchy issues, analyzes coupling, then groups components into candidate domain-aligned units, with optional embedded DDD strategic analysis for bounded contexts. Use when…

tech-leads-club/agent-skills · 158 tokens

rails-dev

Opinionated Rails conventions: rich models, concerns, CRUD-everything, state-as-records, minimal dependencies, Minitest with fixtures. Load this skill BEFORE any code-level thinking, not only before editing a file. It is required the moment a task touches Rails code in ANY way: designing or even just discussing a data…

tech-leads-club/agent-skills · 199 tokens