module-extraction

Carves a bounded context into a module with an explicit port within the same repository.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/paulingham/.claude --skill module-extraction
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: module-extraction
Source: https://github.com/paulingham/.claude/tree/main/skills/module-extraction
Command: npx skills add https://github.com/paulingham/.claude --skill module-extraction

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Carves a bounded context out of the host codebase within the same repository and produces a new package/namespace with an explicit port (interface), enabling in-process modularization without a new runtime or deploy unit.

Core Features & Use Cases

  • Extracts a bounded context into a separate module within the same repo and generates a public port
  • Produces artifacts like a boundary-analysis document and a contract interface to guide follow-on pipeline phases
  • Supports MVP phases for boundary analysis, contract design, and future seam enforcement without leaving the repository

Quick Start

Invoke the module-extraction skill to carve a bounded context within the same repo and generate a new public port for its interface.

Frequently Asked Questions about module-extraction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract a bounded context from a monolithic codebase without creating a new repository?

To extract a bounded context without a new repository, carve the module out of the host codebase to create a separate package with an explicit port. This enables in-process modularization within the same repo without requiring a new deploy unit.

What is in-repo modularization and when do I need an explicit port for my module?

In-repo modularization separates a bounded context into a distinct namespace within the same repository. You need an explicit port when a module has grown and requires a defined contract interface to manage dependencies without adding a new runtime.

How do I design contracts and analyze boundaries for code modularization?

Analyze boundaries and design contracts by generating a boundary-analysis document alongside a contract interface file. These artifacts define the explicit ports and guide the modularization pipeline across MVP phases.

Can I enforce seams and move directories for an in-repo bounded context after defining the interface?

Yes, seam enforcement and directory moves are supported as future phases after you complete boundary analysis and contract design. The initial phases generate the interface and analysis artifacts needed to enable these subsequent modularization steps.

What is the best way to modularize code in-process without introducing a new runtime or deploy unit?

The best way to modularize code without a new runtime is extracting the bounded context into a separate package within the existing repository. This approach generates a public port interface, providing architectural separation while maintaining in-process execution.