Monolith Decomposer

Monolith Decomposer is a skill for Claude Code, Codex from SkillMedev/legacy-modernization. It costs 151 tokens per session (1,778 once invoked), scanned A, original, MIT.

A workflow for finding one safely separable part of a monolithic application and planning its gradual extraction. A monolith is one application containing many areas of functionality; a bounded context is a clearly owned area of behavior with defined boundaries.

In plain words
What is it for?
Use it to assess a proposed extraction using coupling, code-change patterns, data ownership, and transaction boundaries, then sequence a gradual strangler-fig migration when the evidence supports it.
Why use it?
It reduces the risk of splitting the wrong module and creating a distributed monolith, where separate services remain tightly dependent on each other.

Skill for Claude CodeCodex

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

Good fit Use it to assess a proposed extraction using coupling, code-change patterns, data ownership, and transaction boundaries, then sequence a gradual strangler-fig migration when the evidence supports it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skillmedev/legacy-modernization/monolith-decomposer
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 SkillMedev/legacy-modernization --skill monolith-decomposer
Clone the repo
git clone --depth 1 https://github.com/SkillMedev/legacy-modernization

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 Monolith Decomposer

README.md
[![agentmods](https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/monolith-decomposer/github.svg)](https://agentmods.dev/skills/skillmedev/legacy-modernization/monolith-decomposer)
Your own site
<a href="https://agentmods.dev/skills/skillmedev/legacy-modernization/monolith-decomposer"><img src="https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/monolith-decomposer/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 Monolith Decomposer

Your own site · 80×15
<a href="https://agentmods.dev/skills/skillmedev/legacy-modernization/monolith-decomposer"><img src="https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/monolith-decomposer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,778 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.00151 $0.01778
Opus 5 $0.00076 $0.00889
Sonnet 5 $0.00030 $0.00356
Haiku 4.5 $0.00015 $0.00178

Measured 9d ago against content hash 7e4b29645c71, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

Monolith Decomposer 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 9d 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/monolith-decomposer/SKILL.md · 98 lines

How it starts

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

Monolith Decomposer

Extract one bounded-context seam at a time, only after data ownership and coupling evidence prove the cut is clean. Cut along the wrong seam and you get a distributed monolith: the latency, failure modes, and operational cost of microservices with the coupling of a monolith - the single most expensive architecture mistake a team can make.

Operating procedure

Evidence gates come before design, and design before sequencing, because a seam that fails the data-ownership veto in Step 3 makes every downstream step wasted work.

Step 1: Gather inputs and confirm the motive

Collect: the candidate context (if any), the driver (independent scaling, deploy cadence, team ownership - the only three valid ones), team size, and current deploy pain. If the driver is slow deploys, flaky tests, or unclear modules, stop: modularize in-process first. A well-modularized monolith beats a badly-cut set of services on nearly every axis. Label an unverified driver as a guess and verify it before proceeding.

Step 2: Pick a candidate bounded context

Name one cluster of behavior with high internal cohesion and a thin, stable interface to the rest - a domain concept (DDD bounded context / aggregate), not an org-chart team or a technical layer. Extract exactly one per effort.

Step 3: Run the seam-finding procedure - three artifacts, then the veto

Do not prescribe a cut without all three:

  1. Coupling graph. Run madge / dependency-cruiser (or the language equivalent) scoped to the candidate. Count inbound call sites and shared symbols. Practitioner heuristic: a good seam has inbound call sites countable on one hand routing through few entry points and a shared vocabulary of a dozen types or fewer; dozens of scattered inbound edges means the seam is wrong or needs in-process consolidation first.
  2. Co-change report. From history: git log --format= --name-only | sort | uniq -c | sort -rn, then check which files outside the candidate change in the same commits as files inside it. Files that always change together belong together - high cross-boundary co-change is a seam smell. Working thresholds: cross-boundary co-change in more than ~25% of the candidate's commits is a smell to resolve before extracting; under ~10% the seam reads clean (the artifact below shows both readings).
  3. Transaction boundaries. List every transaction the candidate participates in and every table it reads/writes, with who else touches each.

Read the full file on GitHub · 98 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. 9d ago First seen · 98 lines · 151 tokens per session scan A 7e4b29645c71

Subscribe to this mod's changes

Monolith Decomposer is a skill published in the GitHub repository SkillMedev/legacy-modernization (2 stars, last pushed 2mo ago), licensed MIT. It adds 151 tokens to every session and 1,778 once invoked, about $0.0008 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-31.