Agent skill

microservices-architecture

Design and implement microservices architecture including service boundaries, communication patterns, API gateways, service mesh, service discovery, and distributed system patterns. Use when building microservices, distributed systems, or service-oriented architectures.

Stars 151
Forks 20

Install this agent skill to your Project

npx add-skill https://github.com/aj-geddes/useful-ai-prompts/tree/main/skills/microservices-architecture

SKILL.md

Microservices Architecture

Table of Contents

  • Overview
  • When to Use
  • Quick Start
  • Reference Guides
  • Best Practices

Overview

Comprehensive guide to designing, implementing, and maintaining microservices architectures. Covers service decomposition, communication patterns, data management, deployment strategies, and observability for distributed systems.

When to Use

  • Designing new microservices architectures
  • Decomposing monolithic applications
  • Implementing service-to-service communication
  • Setting up API gateways and service mesh
  • Implementing service discovery
  • Managing distributed transactions
  • Designing inter-service data consistency
  • Scaling independent services

Quick Start

Minimal working example:

Bounded Contexts:
┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐
│  Order Service  │  │  User Service   │  │ Payment Service │
│                 │  │                 │  │                 │
│ - Create Order  │  │ - User Profile  │  │ - Process Pay   │
│ - Order Status  │  │ - Auth          │  │ - Refund        │
│ - Order History │  │ - Preferences   │  │ - Transactions  │
└─────────────────┘  └─────────────────┘  └─────────────────┘

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Service Boundary Design Service Boundary Design
Communication Patterns Communication Patterns
API Gateway Pattern API Gateway Pattern
Service Discovery Service Discovery
Data Consistency Patterns Data Consistency Patterns
Service Mesh (Istio) Service Mesh (Istio)

Best Practices

✅ DO

  • Design services around business capabilities
  • Use asynchronous communication where possible
  • Implement circuit breakers for resilience
  • Use API gateway for cross-cutting concerns
  • Implement distributed tracing
  • Use service mesh for service-to-service communication
  • Design for failure (chaos engineering)
  • Implement health checks for all services
  • Use correlation IDs for request tracking
  • Version your APIs
  • Implement proper monitoring and alerting
  • Use event-driven architecture for loose coupling
  • Implement idempotent operations
  • Use database per service pattern

❌ DON'T

  • Share databases between services
  • Create overly granular services (nanoservices)
  • Use distributed transactions (two-phase commit)
  • Ignore network latency and failures
  • Share domain models between services
  • Deploy all services as one unit
  • Hardcode service URLs
  • Forget to implement authentication/authorization
  • Use synchronous calls for long-running operations
  • Ignore backward compatibility
  • Skip monitoring and logging
  • Create circular dependencies between services

Expand your agent's capabilities with these related and highly-rated skills.

aj-geddes/useful-ai-prompts

websocket-implementation

Implement real-time bidirectional communication with WebSockets including connection management, message routing, and scaling. Use when building real-time features, chat systems, live notifications, or collaborative applications.

151 20
Explore
aj-geddes/useful-ai-prompts

refactor-legacy-code

Modernize and improve legacy codebases while maintaining functionality. Use when you need to refactor old code, reduce technical debt, modernize deprecated patterns, or improve code maintainability without breaking existing behavior.

151 20
Explore
aj-geddes/useful-ai-prompts

Sentiment Analysis

Classify text sentiment using NLP techniques, lexicon-based analysis, and machine learning for opinion mining, brand monitoring, and customer feedback analysis

151 20
Explore
aj-geddes/useful-ai-prompts

flask-api-development

Develop lightweight Flask APIs with routing, blueprints, database integration, authentication, and request/response handling. Use when building RESTful APIs, microservices, or lightweight web services with Flask.

151 20
Explore
aj-geddes/useful-ai-prompts

ML Model Explanation

Interpret machine learning models using SHAP, LIME, feature importance, partial dependence, and attention visualization for explainability

151 20
Explore
aj-geddes/useful-ai-prompts

Statistical Hypothesis Testing

Conduct statistical tests including t-tests, chi-square, ANOVA, and p-value analysis for statistical significance, hypothesis validation, and A/B testing

151 20
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results