Microservices

From cosmicstack-labs/mercury-agent-skills · View interactive version

Microservices is an AI agent skill from the GitHub repository cosmicstack-labs/mercury-agent-skills. Service boundaries, communication patterns, event sourcing, CQRS, and distributed tracing

How to use this skill

Skill file

Microservices

Design and operate microservice architectures.

Service Boundaries

Bounded Context (DDD)

Service Sizing

Communication Patterns

| Pattern | Type | When |

|---------|------|------|

| REST | Sync | Request-response, CRUD |

| gRPC | Sync (fast) | Internal, high throughput |

| Event | Async | Decoupled workflows |

| Message Queue | Async | Buffered, reliable delivery |

Event-Driven Communication

Service A → Event Bus → Service B
                       → Service C
                       → Service D

Benefits: eventual consistency, loose coupling, replayability.

CQRS (Command Query Responsibility Segregation)

Distributed Tracing

Anti-Patterns to Avoid

❌ Shared database between services

❌ Sync chains (A → B → C → D blocking)

❌ Distributed monolith (microservices but deployed together)

❌ Absent monitoring ("it works in dev")

❌ Premature decomposition (start monolith, extract carefully)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.