agentleFS
codebygarvcodebygarv/Ai-skills/skills/development/microservices-boundary-definer/SKILL.md

microservices-boundary-definer

Skill26 starsChanged 4 months agoMITView on GitHub

Applies Domain-Driven Design (DDD) bounded contexts and event storming to decompose monoliths into clean services.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Data Ownership: Ensure each database table has exactly one owning service (no shared database anti-pattern).

    line 20

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Define high-cohesion, low-coupling service boundaries using Domain-Driven Design (DDD) strategic design principles, avoiding distributed monolith anti-patterns and chatty network coupling.

When to Use

  • Planning the extraction of services from a monolithic codebase.
  • Splitting a team or scaling engineering throughput across organizational boundaries (Conway's Law).
  • Correcting overly granular nanoservices that require distributed transactions.

What to Analyze

  1. Domain Entities & Aggregates: Group data that must maintain transactional consistency within a single boundary.
  2. Ubiquitous Language: Identify terms that mean different things in different contexts (e.g. Account in Billing vs Account in Auth).
  3. Data Ownership: Ensure each database table has exactly one owning service (no shared database anti-pattern).
  4. Communication Patterns: Synchronous REST/gRPC for queries vs Asynchronous domain events for side-effects.
  5. Team Alignment: Map service boundaries to independent team ownership (Team Topologies).

Output Format

  • Bounded Context Map: List of services, their core domain responsibility, and owned aggregates.
  • Context Relationship Graph (Mermaid): Upstream/Downstream relationships, Shared Kernels, and Anti-Corruption Layers.
  • Service API Contract & Domain Events: Public interfaces and events emitted.
  • Data Migration Strategy: Step-by-step path to decouple shared tables.

Avoid

  • Creating "Entity Services" (e.g., UserService, OrderService) that just expose CRUD without business logic.
  • Allowing services to directly read or write each other's databases.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.