Decide where a service ends and the next one begins, using domain-driven strategic design. Covers bounded contexts, context maps and integration patterns, ubiquitous language, autonomy and coupling tests, the modular-monolith-first bias, and extraction by strangler fig. Use when proposing a new service, splitting or merging existing ones, naming a module, deciding which service owns a piece of data, or when the user says 'should this be its own service', 'boundaries', 'decompose', 'bounded context', or 'microservice or monolith'. This skill governs where boundaries fall — not what crosses them (see api-contracts), not internal layering (see clean-architecture), not aggregate design (see domain-modelling).
Almost every painful microservice system is painful for the same reason: the boundaries were drawn
around technical nouns or team convenience rather than around units of business change. A wrong
boundary is the most expensive mistake in this library — it is not refactorable inside one
repository, and it shows up as chatty calls, shared databases, and lockstep releases.
The default answer to "should this be a new service?" is no, not yet. Make the case.
Config Resolution
Read .msskills/config.yaml in the repo root; look up paths.boundaries.
A custom document exists at that path → read its frontmatter mode:
override → use it alone; ignore the defaults below.
overlay (default, or no mode key) → read defaults first, then
apply the custom document's sections on top, matched by exact heading; new sections append.
A path is configured but no file exists there → say which path is missing, then use the defaults.
No config file or no paths.boundaries key → use defaults.
.msskills/context-map.md exists → treat it as the current record of contexts and their
relationships. Any change to a boundary updates that file.
Self-Validation Checklist
STOP before proposing any boundary — a new service, a split, a merge, or a module. Verify every
check. Fix failures before presenting.
BUSINESS CAPABILITY: Can you name the boundary as a capability the business would recognise
— pricing, fulfilment, identity? If the name is technical (api-service, db-writer,
orchestrator) → you have drawn a layer, not a boundary. Redraw around the capability.
UBIQUITOUS LANGUAGE: Inside this boundary, does each term have exactly one meaning? If
"order" means two different things in two places → those are two contexts, and the boundary
runs between them.
DATA OWNERSHIP: Does exactly one service write each piece of data? Two writers to one table,
or a shared database → the boundary is wrong or the split is incomplete. Fix before proceeding.
AUTONOMY: Can this service serve its primary use case when every other service is down? If
not, list which hops break it and justify each one — every synchronous dependency multiplies
into the availability budget (see resilience-patterns).
CHANGE COUPLING: Do the last several changes to this area touch this boundary alone? If a
typical feature edits three services → the boundary cuts through a single unit of change. Merge
or redraw.
CHATTINESS: Does one user-facing operation cross this boundary more than once or twice? A
loop of remote calls, or fetching data only to send it straight back → the data or the logic is
on the wrong side.
TRANSACTION FIT: Does any single invariant need to hold across this boundary atomically? If
yes → either it belongs in one service, or the invariant becomes a saga with compensation, which
is a decision the user must make (see cqrs-and-consistency).
TEAM FIT: Can one team own this end to end? A boundary that needs two teams to agree on
every release is a distributed monolith with extra latency.
JUSTIFIED SPLIT: For a new service specifically — which concrete force requires separate
deployment: independent release cadence, divergent scaling, isolation of failure, regulatory
separation, or team ownership? "Cleaner" and "more scalable" are not forces. If none applies →
propose a module inside the existing service instead.
All checks pass → state "Boundary holds: , owns , autonomous except ."
Active Anti-Pattern Scan
Any box you can check is a defect. Fix it before presenting.
Distributed Monolith: services that must deploy together, share a database, or break
when a sibling is down → merge them, or make the coupling asynchronous.
Entity Service: a service per database table (CustomerService, AddressService) with
no behaviour of its own → collapse into the capability that owns the behaviour.
Nano-Service: a service whose entire job is two endpoints wrapping one table → the
operational cost exceeds its value; fold it in.
Shared Database: two services reading or writing the same schema → publish an API or
events instead; the schema is an implementation detail, not a contract.
God Service: one service everything depends on, changed by every feature → split along
the capabilities that change independently.
Chatty Boundary: N+1 remote calls, or a call in a loop → move the query, batch it, or
move the data.
Layer as Boundary: services named for tiers (api, business-logic, data-access) →
that is clean-architecture inside one service, not a decomposition.
Leaked Language: another context's terms and identifiers used raw in this one → add an
anti-corruption layer and translate at the edge.
Conway Mismatch: a boundary no single team owns → align to team, or accept and document
the coordination cost.
Premature Extraction: a service split out of a system whose domain is still moving →
keep it a module until the seam has stopped shifting.
Ambiguity Signals
Route these through collaborative-judgment. Each has two defensible answers.
Module or service. Both give the same logical boundary; only one gives independent deploy
and independent failure — at the cost of a network hop, a contract, and an operational surface.
Present the forces, and lean toward the module until one of them clearly applies.
Duplicate the data or call for it. Owning a replica removes a runtime dependency and adds
staleness plus a second source of truth. Neither answer is free.
Where an ambiguous entity lives. A concept that appears in two contexts (a "product" in
catalogue and in fulfilment) may be one shared entity or two models with a translation between
them. Two models is usually right and always more work.
Splitting for scale. Real when one part's load profile genuinely diverges; a rationalisation
when the whole system is comfortably within one instance. Ask for the numbers.
Extraction order. Which seam to cut first in a monolith trades risk against value — the
safest extraction is rarely the one that relieves the most pain.
1---2name: service-boundaries3description: Decide where a service ends and the next one begins, using domain-driven strategic design. Covers bounded contexts, context maps and integration patterns, ubiquitous language, autonomy and coupling tests, the modular-monolith-first bias, and extraction by strangler fig. Use when proposing a new service, splitting or merging existing ones, naming a module, deciding which service owns a piece of data, or when the user says 'should this be its own service', 'boundaries', 'decompose', 'bounded context', or 'microservice or monolith'. This skill governs where boundaries fall — not what crosses them (see api-contracts), not internal layering (see clean-architecture), not aggregate design (see domain-modelling).4license: MIT5---67# Service Boundaries89Almost every painful microservice system is painful for the same reason: the boundaries were drawn10around technical nouns or team convenience rather than around units of business change. A wrong11boundary is the most expensive mistake in this library — it is not refactorable inside one12repository, and it shows up as chatty calls, shared databases, and lockstep releases.1314The default answer to "should this be a new service?" is **no, not yet**. Make the case.1516## Config Resolution17181. Read `.msskills/config.yaml` in the repo root; look up `paths.boundaries`.192. A custom document exists at that path → read its frontmatter `mode`:20 - `override` → use it alone; ignore the defaults below.21 - `overlay` (default, or no `mode` key) → read [defaults](./references/defaults.md) first, then22 apply the custom document's sections on top, matched by exact heading; new sections append.233. A path is configured but no file exists there → say which path is missing, then use the defaults.244. No config file or no `paths.boundaries` key → use [defaults](./references/defaults.md).255. `.msskills/context-map.md` exists → treat it as the current record of contexts and their26 relationships. Any change to a boundary updates that file.2728## Self-Validation Checklist2930**STOP before proposing any boundary — a new service, a split, a merge, or a module. Verify every31check. Fix failures before presenting.**32331. **BUSINESS CAPABILITY**: Can you name the boundary as a capability the business would recognise34 — *pricing*, *fulfilment*, *identity*? If the name is technical (`api-service`, `db-writer`,35 `orchestrator`) → you have drawn a layer, not a boundary. Redraw around the capability.362. **UBIQUITOUS LANGUAGE**: Inside this boundary, does each term have exactly one meaning? If37 "order" means two different things in two places → those are two contexts, and the boundary38 runs between them.393. **DATA OWNERSHIP**: Does exactly one service write each piece of data? Two writers to one table,40 or a shared database → the boundary is wrong or the split is incomplete. Fix before proceeding.414. **AUTONOMY**: Can this service serve its primary use case when every other service is down? If42 not, list which hops break it and justify each one — every synchronous dependency multiplies43 into the availability budget (see `resilience-patterns`).445. **CHANGE COUPLING**: Do the last several changes to this area touch this boundary alone? If a45 typical feature edits three services → the boundary cuts through a single unit of change. Merge46 or redraw.476. **CHATTINESS**: Does one user-facing operation cross this boundary more than once or twice? A48 loop of remote calls, or fetching data only to send it straight back → the data or the logic is49 on the wrong side.507. **TRANSACTION FIT**: Does any single invariant need to hold across this boundary atomically? If51 yes → either it belongs in one service, or the invariant becomes a saga with compensation, which52 is a decision the user must make (see `cqrs-and-consistency`).538. **TEAM FIT**: Can one team own this end to end? A boundary that needs two teams to agree on54 every release is a distributed monolith with extra latency.559. **JUSTIFIED SPLIT**: For a *new* service specifically — which concrete force requires separate56 deployment: independent release cadence, divergent scaling, isolation of failure, regulatory57 separation, or team ownership? "Cleaner" and "more scalable" are not forces. If none applies →58 propose a module inside the existing service instead.5960All checks pass → state "Boundary holds: <capability>, owns <data>, autonomous except <hops>."6162## Active Anti-Pattern Scan6364Any box you can check is a defect. Fix it before presenting.6566- [ ] **Distributed Monolith**: services that must deploy together, share a database, or break67 when a sibling is down → merge them, or make the coupling asynchronous.68- [ ] **Entity Service**: a service per database table (`CustomerService`, `AddressService`) with69 no behaviour of its own → collapse into the capability that owns the behaviour.70- [ ] **Nano-Service**: a service whose entire job is two endpoints wrapping one table → the71 operational cost exceeds its value; fold it in.72- [ ] **Shared Database**: two services reading or writing the same schema → publish an API or73 events instead; the schema is an implementation detail, not a contract.74- [ ] **God Service**: one service everything depends on, changed by every feature → split along75 the capabilities that change independently.76- [ ] **Chatty Boundary**: N+1 remote calls, or a call in a loop → move the query, batch it, or77 move the data.78- [ ] **Layer as Boundary**: services named for tiers (`api`, `business-logic`, `data-access`) →79 that is `clean-architecture` inside one service, not a decomposition.80- [ ] **Leaked Language**: another context's terms and identifiers used raw in this one → add an81 anti-corruption layer and translate at the edge.82- [ ] **Conway Mismatch**: a boundary no single team owns → align to team, or accept and document83 the coordination cost.84- [ ] **Premature Extraction**: a service split out of a system whose domain is still moving →85 keep it a module until the seam has stopped shifting.8687## Ambiguity Signals8889Route these through `collaborative-judgment`. Each has two defensible answers.9091- **Module or service.** Both give the same logical boundary; only one gives independent deploy92 and independent failure — at the cost of a network hop, a contract, and an operational surface.93 Present the forces, and lean toward the module until one of them clearly applies.94- **Duplicate the data or call for it.** Owning a replica removes a runtime dependency and adds95 staleness plus a second source of truth. Neither answer is free.96- **Where an ambiguous entity lives.** A concept that appears in two contexts (a "product" in97 catalogue and in fulfilment) may be one shared entity or two models with a translation between98 them. Two models is usually right and always more work.99- **Splitting for scale.** Real when one part's load profile genuinely diverges; a rationalisation100 when the whole system is comfortably within one instance. Ask for the numbers.101- **Extraction order.** Which seam to cut first in a monolith trades risk against value — the102 safest extraction is rarely the one that relieves the most pain.
Run npx skillmds@latest add parvez3019/service-boundaries in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Decide where a service ends and the next one begins, using domain-driven strategic design. Covers bounded contexts, context maps and integration patterns, ubiquitous language, autonomy and coupling tests, the modular-monolith-first bias, and extraction by strangler fig. Use when proposing a new service, splitting or merging existing ones, naming a module, deciding which service owns a piece of data, or when the user says 'should this be its own service', 'boundaries', 'decompose', 'bounded context', or 'microservice or monolith'. This skill governs where boundaries fall — not what crosses them (see api-contracts), not internal layering (see clean-architecture), not aggregate design (see domain-modelling). It is listed under Integrations & APIs on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
parvez3019 (@parvez3019) published this skill. Their other Agent Skills are listed on their SkillMD profile.