New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Design a microservices decomposition for a monolith or new

Microservices Decomposition: [System Name]

by mohitagw15856 · MIT license · ★ 1,395 on GitHub · updated Sep 23

Microservices Decomposition: [System Name] cover

Design a microservices decomposition for a monolith or new system, defining service boundaries, ownership, communication patterns, and migration plan. Use when asked to decompose a monolith, define service boundaries, design a…

---
name: microservices-decomposition
description: "Design a microservices decomposition for a monolith or new system, defining service boundaries, ownership, communication patterns, and migration plan. Use when asked to decompose a monolith, define service boundaries, design a microservices architecture, or plan a strangler-fig migration. Produces a bounded context map, service inventory table, communication pattern decisions, data ownership matrix, migration roadmap, and risk register."
---

# Microservices Decomposition

Produce a complete microservices decomposition design for a system — whether decomposing an existing monolith or designing service boundaries for a new system. Ground the decomposition in Domain-Driven Design (DDD) concepts: identify bounded contexts first, then derive service boundaries from them. Include communication pattern decisions (sync vs. async, event vs. RPC), data ownership rules, and a pragmatic migration plan if decomposing a monolith. Conway's Law is real — include an organizational alignment section. The deliverable should be specific enough that a team can begin implementation, not an abstract architectural diagram.

## Required Inputs

Ask for these if not already provided:
- **System or domain description** — what the system does, its core domain, and the key business processes it supports
- **Current architecture** — monolith (describe the tech stack and rough module structure), partial services (list existing services), or greenfield
- **Team structure** — number of teams, team names if known, and approximate team sizes; this drives service ownership
- **Performance and scalability requirements** — any specific SLAs, load characteristics, or scaling constraints per domain area
- **Migration constraints** — what cannot be rewritten all at once, hard deadlines, zero-downtime requirements, budget constraints
- **Integration points** — external systems, third-party APIs, or legacy systems that cannot be changed

Overview

Produce a complete microservices decomposition design for a system — whether decomposing an existing monolith or designing service boundaries for a new system. Ground the decomposition in Domain-Driven Design (DDD) concepts: identify bounded contexts first, then derive service boundaries from them. Include communication pattern decisions (sync vs. async, event vs. RPC), data ownership rules, and a pragmatic migration plan if decomposing a monolith. Conway's Law is real — include an organizational alignment section. The deliverable should be specific enough that a team can begin implementation, not an abstract architectural diagram.

Manual install (npx, ZIP)
Claude Codenpx skills add mohitagw15856/pm-claude-skills --skill microservices-decomposition -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/mohitagw15856/pm-claude-skills/tar.gz/f6ca79348c55 \ | tar -xz -C ~/.claude/skills --strip-components=2 pm-claude-skills-f6ca79348c55/skills/microservices-decomposition
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/a2f981abc200444a3319/microservices-decomposition.zip" -OutFile "$env:TEMP\microservices-decomposition.zip"; Expand-Archive "$env:TEMP\microservices-decomposition.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md18.4 KB
Read the files here
mohitagw15856/f6ca7931 file
SKILL.md
Show the full text299 lines

Microservices Decomposition

Produce a complete microservices decomposition design for a system — whether decomposing an existing monolith or designing service boundaries for a new system. Ground the decomposition in Domain-Driven Design (DDD) concepts: identify bounded contexts first, then derive service boundaries from them. Include communication pattern decisions (sync vs. async, event vs. RPC), data ownership rules, and a pragmatic migration plan if decomposing a monolith. Conway's Law is real — include an organizational alignment section. The deliverable should be specific enough that a team can begin implementation, not an abstract architectural diagram.

Required Inputs

Ask for these if not already provided:

  • System or domain description — what the system does, its core domain, and the key business processes it supports
  • Current architecture — monolith (describe the tech stack and rough module structure), partial services (list existing services), or greenfield
  • Team structure — number of teams, team names if known, and approximate team sizes; this drives service ownership
  • Performance and scalability requirements — any specific SLAs, load characteristics, or scaling constraints per domain area
  • Migration constraints — what cannot be rewritten all at once, hard deadlines, zero-downtime requirements, budget constraints
  • Integration points — external systems, third-party APIs, or legacy systems that cannot be changed

If decomposing a monolith, also ask for: approximate codebase size, what is most painful to change today, and where the team experiences the most coupling-related friction.

Output Format


Microservices Decomposition: [System Name]

Author: [Name / Team] Date: [Date] Architecture type: [Monolith decomposition / New system design] Current state: [One sentence describing what exists today] Target state: [One sentence describing the desired end state]


1. Domain Analysis

Core Domain

[One paragraph: what is the core domain of this system? What does the business fundamentally do? What gives it competitive differentiation? The core domain gets the most investment and the cleanest service boundaries.]

Domain Map

List every significant subdomain before assigning service boundaries. Classify each subdomain:

Subdomain Type Description Current Location in Monolith
[Subdomain, e.g., Order Management] Core [What it does and why it matters] [Module/package name or "new"]
[Subdomain, e.g., Inventory] Core [Description] [Location]
[Subdomain, e.g., Notifications] Supporting [Description] [Location]
[Subdomain, e.g., Billing] Supporting [Description] [Location]
[Subdomain, e.g., Reporting] Generic [Description — candidates for off-the-shelf solutions] [Location]
[Subdomain, e.g., User Auth] Generic [Description] [Location]

Subdomain types: Core = competitive differentiation, build with care; Supporting = necessary but not differentiating, build pragmatically; Generic = commodity, buy or use open source.


2. Bounded Context Map (ASCII)

┌─────────────────────────────────────────────────────────────────┐
│                        [System Name]                            │
│                                                                 │
│  ┌──────────────────┐    ┌──────────────────┐                  │
│  │  [Context A]     │    │  [Context B]      │                  │
│  │                  │─ ─►│                  │                  │
│  │  [key concepts]  │    │  [key concepts]  │                  │
│  └──────────────────┘    └──────────────────┘                  │
│           │                       │                             │
│           │ event                 │ sync                        │
│           ▼                       ▼                             │
│  ┌──────────────────┐    ┌──────────────────┐                  │
│  │  [Context C]     │    │  [Context D]      │                  │
│  │                  │    │                  │                  │
│  │  [key concepts]  │    │  [key concepts]  │                  │
│  └──────────────────┘    └──────────────────┘                  │
│                                   │                             │
│                          ┌────────┘                             │
│                          ▼                                      │
│                 ┌──────────────────┐                            │
│                 │  [Context E]     │                            │
│                 │  [key concepts]  │                            │
│                 └──────────────────┘                            │
│                                                                 │
│  External: [Third-party system] ──► [Context that owns it]      │
└─────────────────────────────────────────────────────────────────┘

Legend:  ──► sync call   - -► async event   ═══ shared kernel

Render this map using the actual bounded contexts derived from the domain analysis. Place contexts that communicate frequently closer together. Label relationship types on arrows.

Context Relationships
Upstream Context Downstream Context Relationship Type Integration Pattern
[Context A] [Context B] Customer-Supplier REST API call
[Context B] [Context C] Published Language Domain events via message bus
[Context X] [Context Y] Conformist [Downstream conforms to upstream's model]
[Context X] [Context Y] Anti-Corruption Layer [ACL translates upstream model to local model]

3. Proposed Service Inventory

Service Name Bounded Context Core Responsibility Team Owner Tech Stack Priority
[service-name] [Context] [One sentence: what this service owns and does] [Team] [Language/framework] [P1/P2/P3]
[service-name] [Context] [Responsibility] [Team] [Stack] [Priority]
[service-name] [Context] [Responsibility] [Team] [Stack] [Priority]
[service-name] [Context] [Responsibility] [Team] [Stack] [Priority]
[service-name] [Context] [Responsibility] [Team] [Stack] [Priority]

Service count: [N proposed services] for [M bounded contexts]. [Note if any context maps to multiple services and why — e.g., "the Orders context splits into order-intake and order-fulfillment because they have different scalability requirements."]

Service Responsibility Rules (applied to every service above)
  • Single bounded context ownership — a service does not straddle two bounded contexts
  • Owns its own data — no direct database access by other services
  • Independently deployable — no coordinated deploys required with other services
  • Has a named team owner — no shared ownership of a single service across teams
  • Exposes a defined API contract — not internal implementation

4. Inter-Service Communication Patterns

Pattern Decision Matrix
Communication Need Recommended Pattern Rationale
Query another service's current state Synchronous REST / gRPC Low latency required; caller needs immediate response
Notify other services of a state change Async domain event Decouples services; multiple consumers; sender doesn't care when it's processed
Long-running workflow spanning services Async saga (choreography or orchestration) No single service owns the full workflow; rollback needed if steps fail
Read-heavy cross-service aggregation CQRS read model / materialized view Avoid chatty sync calls at read time; build purpose-fit read models
Real-time push to clients WebSocket gateway service Centralizes connection management; services emit events, gateway pushes
Per-Service Communication Decisions
Service Calls (sync) Publishes (events) Subscribes to (events)
[service-name] [service-name (endpoint)] [EventName] [EventName]
[service-name] — [EventName], [EventName] [EventName]
[service-name] [service-name (endpoint)] — [EventName]
Event Catalog
Event Name Producer Consumers Payload (key fields) Trigger
[OrderPlaced] [order-service] [inventory-service, notification-service] orderId, customerId, lineItems, totalAmount Customer submits order
[InventoryReserved] [inventory-service] [order-service] orderId, reservationId, items Inventory successfully reserved
[PaymentProcessed] [payment-service] [order-service, notification-service] orderId, paymentId, amount, status Payment confirmed

5. Data Ownership Matrix

Each piece of data has exactly one owning service. Other services may cache or project a read model, but they do not write to the owner's database.

Data Entity Owner Service Authoritative Store Consumers Access Pattern
[Order] [order-service] [PostgreSQL] [fulfillment-service, reporting-service] Event subscription + read API
[Customer] [customer-service] [PostgreSQL] [order-service, notification-service] Sync API call
[Product Catalog] [catalog-service] [PostgreSQL] [order-service, inventory-service] Sync API + cached local copy
[Inventory Level] [inventory-service] [Redis + PostgreSQL] [catalog-service (read only)] Event subscription
[Payment Record] [payment-service] [PostgreSQL] [order-service] Event subscription
Data Migration (if decomposing a monolith)
Data Entity Current Location Target Service Migration Approach Data Volume Risk
[Entity] [monolith.orders table] [order-service] Dual-write then cut over [X rows] [High/Med/Low]
[Entity] [monolith.users table] [customer-service] Extract and sync via CDC [X rows] [High/Med/Low]

6. API Contract Definitions

Define the surface area for each service. Full OpenAPI specs are written separately; this section establishes the contract boundaries.

[service-name] API

Base path: /api/v1/[resource] Owner team: [Team] SLA: [p99 latency target, availability target]

Endpoint Method Description Auth Required Rate Limit
/[resources] GET List [resources] with pagination Yes [X req/min]
/[resources]/{id} GET Get single [resource] by ID Yes [X req/min]
/[resources] POST Create new [resource] Yes [X req/min]
/[resources]/{id} PUT Update [resource] Yes [X req/min]
/[resources]/{id} DELETE Soft-delete [resource] Yes — elevated [X req/min]

[Repeat for each service.]


7. Strangler Fig Migration Plan (for monolith decomposition)

Use the strangler fig pattern: extract services incrementally, route traffic through a facade, and retire monolith modules one at a time.

Migration Phases
Phase 1: Foundation (Weeks 1–[N])
  - Deploy service infrastructure (CI/CD, observability, service mesh)
  - Extract lowest-risk, highest-value service first
  - Monolith continues to serve all traffic

Phase 2: First Extractions (Weeks [N]–[M])
  - Extract P1 services
  - API gateway routes selected traffic to new services
  - Monolith handles remaining traffic via facade pattern
  - Both paths write to shared DB during transition (dual-write)

Phase 3: Core Domain Services (Weeks [M]–[P])
  - Extract P1 core domain services
  - Data migration for extracted services
  - Remove dual-write paths for completed migrations

Phase 4: Monolith Retirement (Weeks [P]–[Q])
  - Extract remaining services
  - Monolith serves no production traffic
  - Decommission monolith infrastructure
Phase-by-Phase Roadmap
Phase Service to Extract Migration Approach Team Duration Dependencies Success Criteria
1 [service-name] [Strangler facade / Branch by abstraction / Event interception] [Team] [X weeks] [Infra ready, CI/CD pipeline] [Traffic fully on new service, zero errors for 2 weeks]
2 [service-name] [Approach] [Team] [X weeks] [Phase 1 complete] [Success metric]
3 [service-name] [Approach] [Team] [X weeks] [Phase 2 complete] [Success metric]
Rollback Plan

For each migration phase, define the rollback trigger and mechanism:

  • Rollback trigger: Error rate on new service > [X%] sustained for [Y minutes], or p99 latency > [threshold]
  • Rollback mechanism: API gateway feature flag reverts all traffic to monolith path in < 5 minutes
  • Data rollback: Dual-write maintained for [X weeks] after cutover to allow replay if needed

8. Organizational Alignment (Conway's Law)

Conway's Law: the architecture of a system mirrors the communication structure of the organization that builds it. Design service ownership to match team boundaries — or change the team boundaries.

Service Proposed Owner Team Current Team Assignment Change Required
[service-name] [Team A] [Same / Different] [No change / Transfer to Team A / New team needed]
[service-name] [Team B] [Team A currently] [Transfer ownership]

Misalignments identified:

  • [Misalignment 1: e.g., "The notification service spans two teams today. Assign it entirely to Team B which already owns the messaging domain."]
  • [Misalignment 2: e.g., "The reporting service is owned by Data Eng but consumers are Product teams — establish a clear API contract and SLA."]

Team topology recommendation: [Describe the recommended team structure — stream-aligned teams, platform team, enabling team — and how it maps to the proposed services.]


9. Risk Register

Risk Likelihood Impact Mitigation Owner
Data consistency across services during migration High High Dual-write with reconciliation job; event sourcing for critical domains [Name]
Distributed transaction complexity (sagas) Medium High Start with choreography; add orchestration only when choreography becomes unmanageable [Name]
Service mesh operational overhead Medium Medium Start without a mesh; add after 5+ services deployed [Name]
Network latency replacing in-process calls Medium Medium Cache aggressively; design read models to avoid chatty sync calls [Name]
Conway's Law friction during transition High Medium Align team structure before starting extraction, not after [Name]
Over-decomposition (nanoservices) Medium High Enforce minimum service size rule: a service must justify its own team/deployment overhead [Name]
Observability gaps during migration High High Deploy distributed tracing before first extraction; establish correlation IDs [Name]
[Context-specific risk] [Level] [Level] [Mitigation] [Owner]

Questions about this design: [Slack channel or contact]


Quality Checks

  • Bounded context map is an ASCII diagram with labeled relationships — not a prose description of the contexts
  • Every service in the inventory table has a named team owner and a clear single-sentence responsibility statement
  • Data ownership matrix assigns every key entity to exactly one owning service — no shared ownership
  • Communication pattern decisions explain WHY sync vs. async was chosen for each interaction type
  • If decomposing a monolith, the strangler fig migration plan has phases with durations, dependencies, and success criteria
  • Risk register addresses at minimum: data consistency, distributed transactions, and Conway's Law alignment
  • Organizational alignment section maps services to teams and identifies misalignments that need to be resolved

Anti-Patterns

  • Do not define service boundaries before completing the domain analysis — services derived without bounded context mapping will split the wrong things and couple the wrong things
  • Do not assign multiple teams as co-owners of a single service — shared ownership is no ownership; every service needs exactly one team accountable for it
  • Do not default to synchronous REST calls for all inter-service communication — using sync calls where async events would decouple services creates cascading failure modes
  • Do not propose more than one service per bounded context without a clear justification — over-decomposition (nanoservices) creates operational overhead that exceeds the decomposition benefit
  • Do not begin migration without deploying distributed tracing first — migrating without observability means flying blind when the first extraction causes a production incident
1---
2name: microservices-decomposition
3description: "Design a microservices decomposition for a monolith or new system, defining service boundaries, ownership, communication patterns, and migration plan. Use when asked to decompose a monolith, define service boundaries, design a microservices architecture, or plan a strangler-fig migration. Produces a bounded context map, service inventory table, communication pattern decisions, data ownership matrix, migration roadmap, and risk register."
4---
5 
6# Microservices Decomposition
7 
8Produce a complete microservices decomposition design for a system — whether decomposing an existing monolith or designing service boundaries for a new system. Ground the decomposition in Domain-Driven Design (DDD) concepts: identify bounded contexts first, then derive service boundaries from them. Include communication pattern decisions (sync vs. async, event vs. RPC), data ownership rules, and a pragmatic migration plan if decomposing a monolith. Conway's Law is real — include an organizational alignment section. The deliverable should be specific enough that a team can begin implementation, not an abstract architectural diagram.
9 
10## Required Inputs
11 
12Ask for these if not already provided:
13- **System or domain description** — what the system does, its core domain, and the key business processes it supports
14- **Current architecture** — monolith (describe the tech stack and rough module structure), partial services (list existing services), or greenfield
15- **Team structure** — number of teams, team names if known, and approximate team sizes; this drives service ownership
16- **Performance and scalability requirements** — any specific SLAs, load characteristics, or scaling constraints per domain area
17- **Migration constraints** — what cannot be rewritten all at once, hard deadlines, zero-downtime requirements, budget constraints
18- **Integration points** — external systems, third-party APIs, or legacy systems that cannot be changed
19 
20If decomposing a monolith, also ask for: approximate codebase size, what is most painful to change today, and where the team experiences the most coupling-related friction.
21 
22## Output Format
23 
24---
25 
26# Microservices Decomposition: [System Name]
27 
28**Author:** [Name / Team]
29**Date:** [Date]
30**Architecture type:** [Monolith decomposition / New system design]
31**Current state:** [One sentence describing what exists today]
32**Target state:** [One sentence describing the desired end state]
33 
34---
35 
36## 1. Domain Analysis
37 
38### Core Domain
39 
40[One paragraph: what is the core domain of this system? What does the business fundamentally do? What gives it competitive differentiation? The core domain gets the most investment and the cleanest service boundaries.]
41 
42### Domain Map
43 
44List every significant subdomain before assigning service boundaries. Classify each subdomain:
45 
46| Subdomain | Type | Description | Current Location in Monolith |
47|-----------|------|-------------|------------------------------|
48| [Subdomain, e.g., Order Management] | Core | [What it does and why it matters] | [Module/package name or "new"] |
49| [Subdomain, e.g., Inventory] | Core | [Description] | [Location] |
50| [Subdomain, e.g., Notifications] | Supporting | [Description] | [Location] |
51| [Subdomain, e.g., Billing] | Supporting | [Description] | [Location] |
52| [Subdomain, e.g., Reporting] | Generic | [Description — candidates for off-the-shelf solutions] | [Location] |
53| [Subdomain, e.g., User Auth] | Generic | [Description] | [Location] |
54 
55**Subdomain types:** Core = competitive differentiation, build with care; Supporting = necessary but not differentiating, build pragmatically; Generic = commodity, buy or use open source.
56 
57---
58 
59## 2. Bounded Context Map (ASCII)
60 
61```
62┌─────────────────────────────────────────────────────────────────┐
63│ [System Name] │
64│ │
65│ ┌──────────────────┐ ┌──────────────────┐ │
66│ │ [Context A] │ │ [Context B] │ │
67│ │ │─ ─►│ │ │
68│ │ [key concepts] │ │ [key concepts] │ │
69│ └──────────────────┘ └──────────────────┘ │
70│ │ │ │
71│ │ event │ sync │
72│ ▼ ▼ │
73│ ┌──────────────────┐ ┌──────────────────┐ │
74│ │ [Context C] │ │ [Context D] │ │
75│ │ │ │ │ │
76│ │ [key concepts] │ │ [key concepts] │ │
77│ └──────────────────┘ └──────────────────┘ │
78│ │ │
79│ ┌────────┘ │
80│ ▼ │
81│ ┌──────────────────┐ │
82│ │ [Context E] │ │
83│ │ [key concepts] │ │
84│ └──────────────────┘ │
85│ │
86│ External: [Third-party system] ──► [Context that owns it] │
87└─────────────────────────────────────────────────────────────────┘
88 
89Legend: ──► sync call - -► async event ═══ shared kernel
90```
91 
92Render this map using the actual bounded contexts derived from the domain analysis. Place contexts that communicate frequently closer together. Label relationship types on arrows.
93 
94### Context Relationships
95 
96| Upstream Context | Downstream Context | Relationship Type | Integration Pattern |
97|-----------------|-------------------|------------------|---------------------|
98| [Context A] | [Context B] | Customer-Supplier | REST API call |
99| [Context B] | [Context C] | Published Language | Domain events via message bus |
100| [Context X] | [Context Y] | Conformist | [Downstream conforms to upstream's model] |
101| [Context X] | [Context Y] | Anti-Corruption Layer | [ACL translates upstream model to local model] |
102 
103---
104 
105## 3. Proposed Service Inventory
106 
107| Service Name | Bounded Context | Core Responsibility | Team Owner | Tech Stack | Priority |
108|-------------|----------------|--------------------|-----------|-----------|---------|
109| [service-name] | [Context] | [One sentence: what this service owns and does] | [Team] | [Language/framework] | [P1/P2/P3] |
110| [service-name] | [Context] | [Responsibility] | [Team] | [Stack] | [Priority] |
111| [service-name] | [Context] | [Responsibility] | [Team] | [Stack] | [Priority] |
112| [service-name] | [Context] | [Responsibility] | [Team] | [Stack] | [Priority] |
113| [service-name] | [Context] | [Responsibility] | [Team] | [Stack] | [Priority] |
114 
115**Service count:** [N proposed services] for [M bounded contexts]. [Note if any context maps to multiple services and why — e.g., "the Orders context splits into order-intake and order-fulfillment because they have different scalability requirements."]
116 
117### Service Responsibility Rules (applied to every service above)
118 
119- Single bounded context ownership — a service does not straddle two bounded contexts
120- Owns its own data — no direct database access by other services
121- Independently deployable — no coordinated deploys required with other services
122- Has a named team owner — no shared ownership of a single service across teams
123- Exposes a defined API contract — not internal implementation
124 
125---
126 
127## 4. Inter-Service Communication Patterns
128 
129### Pattern Decision Matrix
130 
131| Communication Need | Recommended Pattern | Rationale |
132|-------------------|--------------------|-----------|
133| Query another service's current state | Synchronous REST / gRPC | Low latency required; caller needs immediate response |
134| Notify other services of a state change | Async domain event | Decouples services; multiple consumers; sender doesn't care when it's processed |
135| Long-running workflow spanning services | Async saga (choreography or orchestration) | No single service owns the full workflow; rollback needed if steps fail |
136| Read-heavy cross-service aggregation | CQRS read model / materialized view | Avoid chatty sync calls at read time; build purpose-fit read models |
137| Real-time push to clients | WebSocket gateway service | Centralizes connection management; services emit events, gateway pushes |
138 
139### Per-Service Communication Decisions
140 
141| Service | Calls (sync) | Publishes (events) | Subscribes to (events) |
142|---------|-------------|-------------------|----------------------|
143| [service-name] | [service-name (endpoint)] | [EventName] | [EventName] |
144| [service-name] | — | [EventName], [EventName] | [EventName] |
145| [service-name] | [service-name (endpoint)] | — | [EventName] |
146 
147### Event Catalog
148 
149| Event Name | Producer | Consumers | Payload (key fields) | Trigger |
150|-----------|---------|---------|---------------------|---------|
151| [OrderPlaced] | [order-service] | [inventory-service, notification-service] | `orderId, customerId, lineItems, totalAmount` | Customer submits order |
152| [InventoryReserved] | [inventory-service] | [order-service] | `orderId, reservationId, items` | Inventory successfully reserved |
153| [PaymentProcessed] | [payment-service] | [order-service, notification-service] | `orderId, paymentId, amount, status` | Payment confirmed |
154 
155---
156 
157## 5. Data Ownership Matrix
158 
159Each piece of data has exactly one owning service. Other services may cache or project a read model, but they do not write to the owner's database.
160 
161| Data Entity | Owner Service | Authoritative Store | Consumers | Access Pattern |
162|-------------|--------------|--------------------|-----------| ---------------|
163| [Order] | [order-service] | [PostgreSQL] | [fulfillment-service, reporting-service] | Event subscription + read API |
164| [Customer] | [customer-service] | [PostgreSQL] | [order-service, notification-service] | Sync API call |
165| [Product Catalog] | [catalog-service] | [PostgreSQL] | [order-service, inventory-service] | Sync API + cached local copy |
166| [Inventory Level] | [inventory-service] | [Redis + PostgreSQL] | [catalog-service (read only)] | Event subscription |
167| [Payment Record] | [payment-service] | [PostgreSQL] | [order-service] | Event subscription |
168 
169### Data Migration (if decomposing a monolith)
170 
171| Data Entity | Current Location | Target Service | Migration Approach | Data Volume | Risk |
172|-------------|-----------------|---------------|-------------------|-------------|------|
173| [Entity] | [monolith.orders table] | [order-service] | Dual-write then cut over | [X rows] | [High/Med/Low] |
174| [Entity] | [monolith.users table] | [customer-service] | Extract and sync via CDC | [X rows] | [High/Med/Low] |
175 
176---
177 
178## 6. API Contract Definitions
179 
180Define the surface area for each service. Full OpenAPI specs are written separately; this section establishes the contract boundaries.
181 
182### [service-name] API
183 
184**Base path:** `/api/v1/[resource]`
185**Owner team:** [Team]
186**SLA:** [p99 latency target, availability target]
187 
188| Endpoint | Method | Description | Auth Required | Rate Limit |
189|----------|--------|-------------|--------------|------------|
190| `/[resources]` | GET | List [resources] with pagination | Yes | [X req/min] |
191| `/[resources]/{id}` | GET | Get single [resource] by ID | Yes | [X req/min] |
192| `/[resources]` | POST | Create new [resource] | Yes | [X req/min] |
193| `/[resources]/{id}` | PUT | Update [resource] | Yes | [X req/min] |
194| `/[resources]/{id}` | DELETE | Soft-delete [resource] | Yes — elevated | [X req/min] |
195 
196[Repeat for each service.]
197 
198---
199 
200## 7. Strangler Fig Migration Plan (for monolith decomposition)
201 
202Use the strangler fig pattern: extract services incrementally, route traffic through a facade, and retire monolith modules one at a time.
203 
204### Migration Phases
205 
206```
207Phase 1: Foundation (Weeks 1–[N])
208 - Deploy service infrastructure (CI/CD, observability, service mesh)
209 - Extract lowest-risk, highest-value service first
210 - Monolith continues to serve all traffic
211 
212Phase 2: First Extractions (Weeks [N]–[M])
213 - Extract P1 services
214 - API gateway routes selected traffic to new services
215 - Monolith handles remaining traffic via facade pattern
216 - Both paths write to shared DB during transition (dual-write)
217 
218Phase 3: Core Domain Services (Weeks [M]–[P])
219 - Extract P1 core domain services
220 - Data migration for extracted services
221 - Remove dual-write paths for completed migrations
222 
223Phase 4: Monolith Retirement (Weeks [P]–[Q])
224 - Extract remaining services
225 - Monolith serves no production traffic
226 - Decommission monolith infrastructure
227```
228 
229### Phase-by-Phase Roadmap
230 
231| Phase | Service to Extract | Migration Approach | Team | Duration | Dependencies | Success Criteria |
232|-------|------------------|--------------------|------|----------|-------------|-----------------|
233| 1 | [service-name] | [Strangler facade / Branch by abstraction / Event interception] | [Team] | [X weeks] | [Infra ready, CI/CD pipeline] | [Traffic fully on new service, zero errors for 2 weeks] |
234| 2 | [service-name] | [Approach] | [Team] | [X weeks] | [Phase 1 complete] | [Success metric] |
235| 3 | [service-name] | [Approach] | [Team] | [X weeks] | [Phase 2 complete] | [Success metric] |
236 
237### Rollback Plan
238 
239For each migration phase, define the rollback trigger and mechanism:
240- **Rollback trigger:** Error rate on new service > [X%] sustained for [Y minutes], or p99 latency > [threshold]
241- **Rollback mechanism:** API gateway feature flag reverts all traffic to monolith path in < 5 minutes
242- **Data rollback:** Dual-write maintained for [X weeks] after cutover to allow replay if needed
243 
244---
245 
246## 8. Organizational Alignment (Conway's Law)
247 
248Conway's Law: the architecture of a system mirrors the communication structure of the organization that builds it. Design service ownership to match team boundaries — or change the team boundaries.
249 
250| Service | Proposed Owner Team | Current Team Assignment | Change Required |
251|---------|--------------------|-----------------------|-----------------|
252| [service-name] | [Team A] | [Same / Different] | [No change / Transfer to Team A / New team needed] |
253| [service-name] | [Team B] | [Team A currently] | [Transfer ownership] |
254 
255**Misalignments identified:**
256- [Misalignment 1: e.g., "The notification service spans two teams today. Assign it entirely to Team B which already owns the messaging domain."]
257- [Misalignment 2: e.g., "The reporting service is owned by Data Eng but consumers are Product teams — establish a clear API contract and SLA."]
258 
259**Team topology recommendation:** [Describe the recommended team structure — stream-aligned teams, platform team, enabling team — and how it maps to the proposed services.]
260 
261---
262 
263## 9. Risk Register
264 
265| Risk | Likelihood | Impact | Mitigation | Owner |
266|------|-----------|--------|-----------|-------|
267| Data consistency across services during migration | High | High | Dual-write with reconciliation job; event sourcing for critical domains | [Name] |
268| Distributed transaction complexity (sagas) | Medium | High | Start with choreography; add orchestration only when choreography becomes unmanageable | [Name] |
269| Service mesh operational overhead | Medium | Medium | Start without a mesh; add after 5+ services deployed | [Name] |
270| Network latency replacing in-process calls | Medium | Medium | Cache aggressively; design read models to avoid chatty sync calls | [Name] |
271| Conway's Law friction during transition | High | Medium | Align team structure before starting extraction, not after | [Name] |
272| Over-decomposition (nanoservices) | Medium | High | Enforce minimum service size rule: a service must justify its own team/deployment overhead | [Name] |
273| Observability gaps during migration | High | High | Deploy distributed tracing before first extraction; establish correlation IDs | [Name] |
274| [Context-specific risk] | [Level] | [Level] | [Mitigation] | [Owner] |
275 
276---
277 
278*Questions about this design: [Slack channel or contact]*
279 
280---
281 
282## Quality Checks
283 
284- [ ] Bounded context map is an ASCII diagram with labeled relationships — not a prose description of the contexts
285- [ ] Every service in the inventory table has a named team owner and a clear single-sentence responsibility statement
286- [ ] Data ownership matrix assigns every key entity to exactly one owning service — no shared ownership
287- [ ] Communication pattern decisions explain WHY sync vs. async was chosen for each interaction type
288- [ ] If decomposing a monolith, the strangler fig migration plan has phases with durations, dependencies, and success criteria
289- [ ] Risk register addresses at minimum: data consistency, distributed transactions, and Conway's Law alignment
290- [ ] Organizational alignment section maps services to teams and identifies misalignments that need to be resolved
291 
292## Anti-Patterns
293 
294- [ ] Do not define service boundaries before completing the domain analysis — services derived without bounded context mapping will split the wrong things and couple the wrong things
295- [ ] Do not assign multiple teams as co-owners of a single service — shared ownership is no ownership; every service needs exactly one team accountable for it
296- [ ] Do not default to synchronous REST calls for all inter-service communication — using sync calls where async events would decouple services creates cascading failure modes
297- [ ] Do not propose more than one service per bounded context without a clear justification — over-decomposition (nanoservices) creates operational overhead that exceeds the decomposition benefit
298- [ ] Do not begin migration without deploying distributed tracing first — migrating without observability means flying blind when the first extraction causes a production incident
299 
View all files on GitHub →

Details

Updated
Sep 23, 2026
License
MIT
Stars on the repo
★ 1,395
Checked
Source
mohitagw15856/pm-claude-skills ↗
Creator
mohitagw15856 · 193 listings
View creator

Made with microservices-decomposition

Microservices Decomposition: [System Name] — Galaxy 3D — fly through all 1170 skills as a glowing constellation you orbit and click into (from the mohitagw15856/pm-claude-skills README)
Microservices Decomposition: [System Name] — Galaxy 3D — fly through all 1170 skills as a glowing constellation you orbit and click into (from the mohitagw15856/pm-claude-skills README)

by mohitagw15856

Microservices Decomposition: [System Name] — PM Skills Wrapped — your practice turned into a shareable, Spotify-Wrapped-style story (from the mohitagw15856/pm-claude-skills README)
Microservices Decomposition: [System Name] — PM Skills Wrapped — your practice turned into a shareable, Spotify-Wrapped-style story (from the mohitagw15856/pm-claude-skills README)

by mohitagw15856

Similar skills

See all →
SkillCreate branded architecture, architecture deltaDiagram designcathrynlavery/diagram-design · by cathrynlaveryCreate branded architecture, architecture delta, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, polar chart (polar/radial lollipop), loop/flywheel, nested, tree, org chart, layer stack, Venn, pyramid/funnel, treemap and marimekko, heatmap, bar and dumbbell, waterfall, line (slopegraph, ridgeline, streamgraph, bump), Gantt and scatter charts (bubble, beeswarm), high-level, process, medallion, data flow, DP integration, DP security matrix, Sankey, fishbone, Wardley map, kanban, user journey, deployment, dependency graph, UML class, story map, or database schema diagrams as HTML/SVG/PNG, with .drawio, Mermaid, and .excalidraw import, plus lifecycle phase maps, block decomposition trees, and onboarding guidance.★ 43.2k GitHub starsSkillReview a PR against the Pascal architectural rulesReview architecturepascalorg/editor · by pascalorgReview a PR against the Pascal architectural rules — package boundaries (core/viewer/editor/nodes), the registry-driven composition model (def.geometry / def.renderer / def.system), legacy-dispatch regressions, the slots + world-scale-UV convention for new nodes/geometry, hook hygiene (useEditor/useScene/useViewer), and selector performance. Use when the user asks to review a PR, audit a branch, or check that changes respect the codebase's architecture.★ 24.6k GitHub starsSkillCreate and edit draw.io/diagrams.net diagramsDraw.io Architecture StudioAgents365-ai/drawio-skill · by Agents365-aiCreate and edit draw.io/diagrams.net diagrams as editable `.drawio` files. Covers architecture, UML/ERD/sequence, BPMN, network, and swimlane views authored from a description or converted from code, IaC, SQL, and API schemas, plus sync, query, test, review, export, and publish of existing diagrams. Use when the user asks for draw.io/diagrams.net or an editable diagram; prefer Mermaid/PlantUML when diagrams-as-code is enough.★ 9.8k GitHub starsSkillCreate polished dark-themed architecture diagramsArchitecture Diagram SkillCocoon-AI/architecture-diagram-generator · by Cocoon-AICreate polished dark-themed architecture diagrams as self-contained HTML+SVG files. Use when the user asks for system, infrastructure, cloud, security, or network topology diagrams.★ 7.4k GitHub starsSkillThe foundational knowledge distillation pattern for buildingLLM Wiki — Knowledge Distillation PatternAr9av/obsidian-wiki · by Ar9avThe foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources → wiki → schema). Also use when discussing knowledge management strategy, wiki structure decisions, or how to organize distilled knowledge. This is the "theory" skill — other skills handle specific operations (ingesting, querying, linting).★ 3.5k GitHub starsSkillManage software complexity through deep modulesA Philosophy of Software Design Frameworkwondelai/skills · by wondelaiManage software complexity through deep modules, information hiding, and strategic programming. Use when the user mentions "module design", "API too complex", "shallow class", "complexity budget", "strategic vs tactical", "deep module", "information leakage", "pass-through method", "this code is over-engineered", or "simplify this design". Also trigger when reviewing an interface for simplicity, evaluating whether an abstraction is pulling its weight, deciding whether a comment is worth writing, or choosing between general-purpose and special-purpose approaches. Covers deep vs shallow modules, red flags for complexity, and comments as design documentation. For code quality, see clean-code. For architecture boundaries, see clean-architecture.★ 2.2k GitHub stars

More from mohitagw15856

SkillDesign a 360-degree feedback survey or write a structured360-Degree Feedback Template Skillmohitagw15856/pm-claude-skills · by mohitagw15856Design a 360-degree feedback survey or write a structured 360 feedback report. Use when asked to build a 360 feedback process, write 360 feedback for a colleague, design a feedback survey, or produce a feedback report. Produces either a complete survey instrument with rating scales and open-ended questions, or a structured narrative feedback report with themes, strengths, and development areas.★ 1.4k GitHub starsSkillDesign statistically rigorous A/B tests for product featuresA/B Test Planner Skillmohitagw15856/pm-claude-skills · by mohitagw15856Design statistically rigorous A/B tests for product features, UI changes, onboarding flows, and pricing experiments. Use when asked to set up an experiment, design an A/B test, calculate sample size, or interpret test results. Produces a complete test plan with hypothesis, variant definitions, sample size, duration estimate, guardrail metrics, and a results interpretation guide.★ 1.4k GitHub starsSkillGenerate a WCAG 2.2 accessibility audit checklistAccessibility Audit Skillmohitagw15856/pm-claude-skills · by mohitagw15856Generate a WCAG 2.2 accessibility audit checklist and remediation suggestions for any UI or design. Use when asked to audit for accessibility, check WCAG compliance, review a design for a11y issues, or create an accessibility remediation plan. Produces a prioritised checklist with pass/fail assessments and specific fixes.★ 1.4k GitHub starsSkillBuild a structured account plan for any key customerAccount Plan Skillmohitagw15856/pm-claude-skills · by mohitagw15856Build a structured account plan for any key customer or target account. Use when asked to create an account plan, key account strategy, strategic account review, or territory plan. Produces a complete account plan with relationship map, growth opportunities, risks, and 90-day action plan.★ 1.4k GitHub starsSkillOptimize an article for Answer Engine Optimization so AIAEO Optimizer Skillmohitagw15856/pm-claude-skills · by mohitagw15856Optimize an article for Answer Engine Optimization (AEO) so AI engines like ChatGPT, Perplexity, and Claude can extract, quote, and cite it. Use when asked to AEO-optimize, make content AI-readable, improve AI citation chances, or adapt an article for answer engines. Produces an AEO-optimised rewrite with question headings, 50–80 word answer capsules, a paragraph-length audit, and flagged trust signals.★ 1.4k GitHub starsSkillConduct a structured ethical review of an AI or ML featureAI Ethics Review Skillmohitagw15856/pm-claude-skills · by mohitagw15856Conduct a structured ethical review of an AI or ML feature, model, or product. Use when preparing to deploy an AI system, assessing algorithmic risk, auditing a model for bias, or producing a responsible AI impact assessment. Produces a structured ethics review covering fairness, transparency, privacy, safety, accountability, and societal impact with a risk tier score, pre-deployment checklist, and prioritised mitigations.★ 1.4k GitHub stars