modular-monolith

modular-monolith is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 52 tokens per session (1,355 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 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,355 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.00052 $0.01355
Opus 5.5 $0.00021 $0.00542
Sonnet 5.5 $0.00010 $0.00271
Haiku 4.5 $0.00005 $0.00136

Measured 24d ago against content hash 124a1a0d36f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 24d 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 · 157 lines

How it starts

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

Modular Monolith

A Modular Monolith structures a single deployment artifact into discrete, loosely-coupled domain modules with strict encapsulation boundaries, balancing microservice-level separation with monolithic operational simplicity.

When to Use

  • Medium-to-Large Engineering Teams: Scaling a codebase across multiple teams without the operational overhead of microservices.
  • Single-Deployment Velocity: Retaining simple CI/CD pipelines, single-transaction database migrations, and local Docker setups.
  • Clear Domain Boundaries: Preventing spaghetti code by enforcing strict module encapsulation and public API boundaries at compile-time.
  • Pre-Microservice Preparation: Architecting systems that can be cleanly sliced into separate microservices later if scaling demands it.

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

Strict Module Encapsulation & Public API Facades

Modules interact exclusively through explicit public facades; internal repositories, models, and helpers are unexported:

src/modules/
  ├── billing/
  │   ├── internal/        # Private tables, services, entities
  │   └── index.ts         # Public Interface & Facade ONLY
  └── shipping/
      ├── internal/
      └── index.ts

In-Process Domain Events

Modules communicate asynchronously across boundaries using in-memory event buses:

// modules/common/event-bus.ts
import EventEmitter from "events";
export const inProcessBus = new EventEmitter();

// modules/orders/internal/order.service.ts
inProcessBus.emit("order.created", { orderId: "123", customerId: "456" });

// modules/notifications/internal/notification.listener.ts
inProcessBus.on("order.created", (payload) => {
  // Executes in same process, decoupled from order module code
});

Read the full file on GitHub · 157 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. 24d ago Changed · +1 lines 124a1a0d36f5
  2. 28d ago Changed · +65 lines · +32 tokens per session c7b658b52e60
  3. 1mo 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 (15 stars, last pushed 25d ago), licensed MIT. It adds 52 tokens to every session and 1,355 once invoked, about $0.0002 per session on Opus 5.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

api-design

Design stable, versioned, self-documenting APIs. Easy to use correctly, hard to use incorrectly. Apply Hyrum's Law from day one.

DevelopersGlobal/ai-agent-skills · 34 tokens

api-and-interface-design

Guidance for designing stable, clearly documented interfaces between software parts, such as web APIs, GraphQL schemas, modules, and component properties. It covers defining the contract first, limiting accidental dependencies, and planning safe changes.

vinvcn/addyosmani-agent-skills-zh · 51 tokens

deprecation-and-migration

A guide for retiring old code, systems, or interfaces and moving users to replacements. Deprecation means marking something as no longer preferred; migration means switching its users safely.

vinvcn/addyosmani-agent-skills-zh · 77 tokens

awesome-performance-audit

Read-only performance and reliability audit: event loop, backpressure, memory and CPU, timeouts, retries, queues, Core Web Vitals, bundles, with a verdict. Use when something is slow, memory climbs or latency spikes.

khasky/awesome-agent-skills · 52 tokens

awesome-error-standards

Applies consistent error handling: typed errors, operational vs programmer errors, API error envelopes, HTTP status mapping, user-facing messages. Use when adding or refactoring error handling or designing an error contract.

khasky/awesome-agent-skills · 46 tokens