modular-decomposition▌
tech-leads-club/agent-skills · updated May 23, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
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 asking how to split a monolith, size components before extraction, find duplicated domain logic, clean up module hierarchy, measure coupling between modules, or group components into services. Do NOT use for phased extraction roadmaps or prioritization without the prior analysis steps (use decomposition-planning-roadmap after this pipeline), end-to-end legacy migration strategy writeups (use legacy-migration-planner), pure infrastructure capacity sizing, or when you only need DDD without the structural pipeline (install domain-analysis standalone).
| name | modular-decomposition |
| description | 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 asking how to split a monolith, size components before extraction, find duplicated domain logic, clean up module hierarchy, measure coupling between modules, or group components into services. Do NOT use for phased extraction roadmaps or prioritization without the prior analysis steps (use decomposition-planning-roadmap after this pipeline), end-to-end legacy migration strategy writeups (use legacy-migration-planner), pure infrastructure capacity sizing, or when you only need DDD without the structural pipeline (install domain-analysis standalone). |
Modular Decomposition
This skill runs the Patterns 1–5 analysis pipeline before service extraction. Each pattern is plain markdown under references/; load the file for that step and execute it against the user’s codebase.
How to Use
Quick start (what users can say)
- Full pipeline: “Run modular decomposition Patterns 1 through 5 on this repo,” “Analyze this monolith for splitting—inventory, coupling, and domain grouping.”
- Single early step: “Identify and size components here,” “Find duplicated domain logic across modules,” “Analyze coupling between our packages.”
- With DDD lens: “Group components into domains and check bounded contexts,” “Use DDD strategic design on this codebase before we group services.”
If the user only wants extraction order, phases, or migration roadmap after analysis exists, use decomposition-planning-roadmap instead. If they need a full legacy migration plan (strangler fig, research, multi-stack), use legacy-migration-planner as well or instead of this skill when that is the primary ask.
How the agent should run it
- Scope: Confirm the task is structural analysis (inventory → coupling → grouping), not roadmap authoring. If unclear, ask once whether they want the full ordered pipeline or a subset.
- Order: Run patterns 1 → 2 → 3 → 4 → 5 in that order. Do not skip a step unless the user explicitly limits scope; if they do, state which patterns were skipped and how that limits later conclusions.
- Load references: For each pattern, open the matching
references/pattern-NN-*.mdfile and follow its instructions. Use the optional*-quick-reference.mdfor the same number when a short checklist is enough. - Carry context forward: Reuse outputs from earlier patterns in later ones (e.g. component inventory from Pattern 1 informs coupling in 4 and grouping in 5). Reference concrete paths, modules, or tables from previous steps.
- Domain language (Pattern 5): If subdomains or bounded contexts need grounding beyond structure, read
references/domain-analysis.mdbefore or alongside Pattern 5. Optionally openreferences/domain-analysis-quick-reference.mdorreferences/domain-analysis-examples.mdfor condensed rules or illustrations. - Deliver: Produce clear, actionable findings per pattern or one consolidated report—always tied to evidence from the repository (files, dependencies, metrics), not generic advice.
Usage examples
Example 1 — Full pipeline
User: "We're going to split this monolith—run the full decomposition analysis (Patterns 1–5)."
Agent: Execute patterns 1→5 in order, loading each references/pattern-NN-*.md, preserving outputs between steps, then summarize cross-cutting recommendations.
Example 2 — Coupling after inventory
User: "We already have a rough module list—focus on coupling (Pattern 4) and then domain grouping (Pattern 5)."
Agent: If no prior inventory exists in the thread, either run Pattern 1 briefly or derive an explicit module list from the repo before 4 and 5. State any assumptions.
Example 3 — DDD before grouping
User: "Map bounded contexts and language, then group components into domains."
Agent: Read references/domain-analysis.md (and optional quick reference/examples) in parallel with or immediately before Pattern 5; align Pattern 5 groupings with linguistic boundaries where evidence supports it.
Prerequisites
- Complete Pattern N before starting Pattern N+1 unless the user explicitly narrows scope. Later patterns depend on earlier results (for example, inventory and structure inform coupling and grouping).
- If business vocabulary, subdomains, or bounded contexts are uncertain, use
references/domain-analysis.mdbefore or alongside Pattern 5 (see Bounded contexts below).
Ordered workflow (Patterns 1–5)
| Step | Pattern | Primary reference |
|---|---|---|
| 1 | Identify and size components | references/pattern-01-identify-and-size.md (optional: pattern-01-identify-and-size-quick-reference.md) |
| 2 | Common domain detection | references/pattern-02-common-domain.md (optional: pattern-02-common-domain-quick-reference.md) |
| 3 | Flattening / hierarchy | references/pattern-03-flattening.md (optional: pattern-03-flattening-quick-reference.md) |
| 4 | Coupling analysis | references/pattern-04-coupling.md |
| 5 | Domain identification and grouping | references/pattern-05-domain-grouping.md (optional: pattern-05-domain-grouping-quick-reference.md) |
Pattern 6 — planning and extraction
Pattern 6 (create domain services / extraction) is not duplicated here. After Pattern 5, switch to decomposition-planning-roadmap for phased extraction order, milestones, and migration-style planning. For full legacy migration strategy (strangler-fig, cross-stack rewrites, research-heavy plans), optionally use legacy-migration-planner in addition.
Bounded contexts and DDD strategic design
- Patterns 1–4 focus on structural inventory, duplication, hierarchy, and coupling between parts of the codebase.
- Pattern 5 produces candidate groupings aligned with solution-space boundaries (which components belong together as services).
- Strategic DDD (subdomains, bounded contexts, ubiquitous language) is covered in
references/domain-analysis.md, with optionaldomain-analysis-quick-reference.mdanddomain-analysis-examples.md. Use it when you need to validate or refine boundaries against business language, not only folder structure.
How to use modular-decomposition on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add modular-decomposition
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches modular-decomposition from GitHub repository tech-leads-club/agent-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate modular-decomposition. Access the skill through slash commands (e.g., /modular-decomposition) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★69 reviews- ★★★★★Chen Jain· Dec 20, 2024
Solid pick for teams standardizing on skills: modular-decomposition is focused, and the summary matches what you get after install.
- ★★★★★Mateo Garcia· Dec 16, 2024
We added modular-decomposition from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Anaya Srinivasan· Dec 12, 2024
Solid pick for teams standardizing on skills: modular-decomposition is focused, and the summary matches what you get after install.
- ★★★★★Alexander Iyer· Dec 8, 2024
Registry listing for modular-decomposition matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Advait Thompson· Dec 4, 2024
modular-decomposition fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Sofia Mensah· Dec 4, 2024
We added modular-decomposition from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Xiao Martinez· Nov 27, 2024
modular-decomposition reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Sofia Robinson· Nov 27, 2024
modular-decomposition fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Xiao Robinson· Nov 23, 2024
modular-decomposition is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Anika Ndlovu· Nov 23, 2024
Useful defaults in modular-decomposition — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 69