Microservices Architecture Pattern Rules

Guide microservices architecture patterns for decomposition, communication, and data management.

1|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/iceflower/opencode-agents-and-skills --skill microservices-architecture-pattern-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Microservices Architecture Pattern Rules
Source: https://github.com/iceflower/opencode-agents-and-skills/tree/main/skills/microservices
Command: npx skills add https://github.com/iceflower/opencode-agents-and-skills --skill microservices-architecture-pattern-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and best practices for designing, building, and migrating to microservices architectures, addressing challenges in service decomposition, communication, data management, and fault tolerance.

Core Features & Use Cases

  • Design Principles: Learn how to decompose services based on business capabilities and bounded contexts.
  • Communication Strategies: Understand synchronous vs. asynchronous patterns, API gateways, and service discovery.
  • Data Management: Implement database-per-service, sagas, CQRS, and event sourcing.
  • Resilience: Apply patterns like circuit breakers, retries, and bulkheads.
  • Migration: Strategies for migrating from monoliths to microservices using patterns like Strangler Fig.
  • Use Case: A team is designing a new e-commerce platform and needs to decide how to break down the system into independent services, how these services will communicate, and how to manage data consistency across them. This Skill provides the blueprints.

Quick Start

Use the microservices skill to understand the Strangler Fig pattern for monolith migration.

Frequently Asked Questions about Microservices Architecture Pattern Rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decompose a monolith into microservices?

Microservices communicate via synchronous calls for real-time queries or asynchronous event-driven patterns for decoupled operations. An API Gateway manages external requests, while service discovery components locate available internal service instances dynamically.

How do I manage data consistency across distributed services?

Manage distributed data consistency using the Saga pattern to coordinate transactions across services. For complex domains, apply CQRS to separate read and write models, potentially leveraging event sourcing to rebuild state from an append-only event log.

What patterns improve fault tolerance in distributed systems?

Improve distributed system fault tolerance by applying circuit breakers to prevent cascading failures, bulkheads to isolate failing components, and retry mechanisms for transient errors. These patterns ensure microservices remain resilient during partial outages.

When should I use an API Gateway in microservices?

The database-per-service pattern requires each service to manage its own data storage, ensuring loose coupling. To maintain consistency without distributed transactions, implement the Saga pattern to coordinate multi-service data changes.