skywalkskills

CatalogueArchitecture & Code Health

D2Ready

Monolith Decomposition & Seam Analysis

Finds the seams where a monolith can be split, and names the data and calls that cross each one.

What it examines

  • Candidate seams in the current structure
  • Data that would have to move or be shared
  • Calls that would become network calls
  • What is safe to separate first

What you get back

A findings file. Each item has the evidence, how serious it is, and a fix.

Dependencies

  • An AI coding agent that reads SKILL.md files, such as Claude Code, Codex or Gemini CLI
  • Read access to the repository
  • Git history. A snapshot of the files without history is not enough.
  • Node.js, to run the analysis tool that ships in the package’s tool folder
  • Optional: a graph file from the D1 audit. It adds a folder-by-folder plan for the order to extract code. Without it, that check is recorded as insufficient evidence.
  • Python 3 with the jsonschema package, to check findings.json before fixing anything

How it works

The audit is read-only. It groups files by how they change together in your commit history, because that shows where the codebase can already be split.

If you supply the D1 graph, it also looks at imports between folders and sorts them into extraction waves. It highlights where the two views disagree.

On a young repository, or one with squashed history, the history view often finds little. The audit says so. You get findings.json and findings.md. The remediate skill reads findings.json. It can propose a file move for you to approve, and everything else is a plan.

Setup

  1. Unzip the download and keep the whole folder. Copy its audit and remediate folders into your agent's skills folder (for Claude Code, .claude/skills/) in the repository you want to check.
  2. Confirm Node.js is installed and the repository is a full clone with history. For the extraction plan, run the D1 audit first and keep its graph file.
  3. Open the repository in your agent and ask it to run the d2-monolith-decomposition-seam-audit skill.
  4. Check the result with the validator: pip install jsonschema, then python3 path/to/the-unzipped-folder/schema/validate.py findings.json.
  5. Ask your agent to run the d2-monolith-decomposition-seam-remediate skill using findings.json. Fix some findings and leave the rest open if you like.

Run it with your agent

Copy the prompt, fill in the parts in square brackets, and paste it into your agent.

Audit prompt

Run the d2-monolith-decomposition-seam-audit skill on this repository. Run the bundled tool with Node.js against this repository, and use the full git history. D1 graph file: [path, or none]. Mode: audit only. Do not change any code. Write findings.json and findings.md in the repository root.

Fix prompt, after you have findings.json

Run the d2-monolith-decomposition-seam-remediate skill using findings.json. Work through the findings I choose, and leave the rest open.

What is inside

The files that make up this skill, as your agent reads them.

packages/d2-monolith-decomposition-seam

audit › SKILL.md

Sign in to download

Use the email and password you signed up with.