AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Microservices Patterns

skill-jonathan0823-opencode-config-microservices-patterns · by Jonathan0823

Microservices architecture patterns including service discovery, circuit breakers, event-driven architecture, API gateways, and distributed systems. Use when designing microservices, implementing inter-service communication, or managing distributed systems.

No reviews yet
0 installs
29 views
0.0% view→install

Install

$ agentstack add skill-jonathan0823-opencode-config-microservices-patterns

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-jonathan0823-opencode-config-microservices-patterns)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Microservices Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Microservices Patterns Skill

Overview

This skill provides comprehensive microservices architecture patterns including service discovery, circuit breakers, event-driven architecture, saga patterns, API gateways, and distributed data management.

Quick Start

Microservices Checklist

  • [ ] Service boundaries clearly defined
  • [ ] Database per service
  • [ ] API Gateway for external communication
  • [ ] Async messaging between services
  • [ ] Circuit breakers for resilience
  • [ ] Distributed tracing implemented
  • [ ] Centralized logging
  • [ ] Health checks and monitoring

Communication Patterns

Synchronous (REST/gRPC):

  • Simple request/response
  • Tight coupling
  • Blocking
  • Use for: Queries, simple operations

Asynchronous (Message Queue):

  • Event-driven
  • Loose coupling
  • Non-blocking
  • Use for: Commands, long operations, event sourcing

Core Patterns

API Gateway

# Kong Gateway configuration
services:
  - name: user-service
    url: http://user-service:8080
    routes:
      - name: user-routes
        paths:
          - /api/users
    plugins:
      - name: rate-limiting
        config:
          minute: 100
      - name: jwt
      - name: cors

Circuit Breaker

from circuitbreaker import circuit
import requests

@circuit(failure_threshold=5, recovery_timeout=30, expected_exception=requests.RequestException)
def call_external_service():
    response = requests.get('http://external-service/api')
    return response.json()

# Usage
try:
    result = call_external_service()
except circuitbreaker.CircuitBreakerError:
    # Circuit is open, use fallback
    result = fallback_data()

Service Discovery

# Consul service registration
service:
  name: order-service
  tags:
    - orders
    - v1
  port: 8080
  check:
    http: http://localhost:8080/health
    interval: 10s

Saga Pattern

# Choreography-based saga
class OrderSaga:
    def __init__(self, event_bus):
        self.event_bus = event_bus
    
    def start_order(self, order_data):
        # Step 1: Create order (pending)
        order = create_pending_order(order_data)
        
        # Step 2: Reserve inventory
        self.event_bus.publish('InventoryReservationRequested', {
            'order_id': order.id,
            'items': order.items
        })
    
    def on_inventory_reserved(self, event):
        # Step 3: Process payment
        self.event_bus.publish('PaymentRequested', {
            'order_id': event.order_id,
            'amount': event.total
        })
    
    def on_payment_completed(self, event):
        # Step 4: Complete order
        complete_order(event.order_id)
        self.event_bus.publish('OrderCompleted', {
            'order_id': event.order_id
        })
    
    def on_inventory_failed(self, event):
        # Compensate: Cancel order
        cancel_order(event.order_id)

Detailed References

See comprehensive guides in references/:

  • [Service Communication](references/service-communication.md) - REST, gRPC, GraphQL, message queues
  • [Resilience Patterns](references/resilience.md) - Circuit breakers, retries, bulkhead, timeouts
  • [Event-Driven Architecture](references/event-driven.md) - Event sourcing, CQRS, saga patterns
  • [Data Management](references/data-management.md) - Database per service, distributed transactions, eventual consistency

When to Use This Skill

Use this skill when:

  • Decomposing monolith into microservices
  • Designing service boundaries and APIs
  • Implementing inter-service communication
  • Managing distributed data consistency
  • Building resilient service architectures
  • Setting up service discovery and load balancing
  • Implementing API gateways
  • Handling distributed transactions

Related Skills

  • @kubernetes-patterns - Container orchestration for microservices
  • @docker-patterns - Containerization
  • @api-rest-design - API design for services
  • @observability-monitoring - Distributed tracing and monitoring
  • @security-best-practices - Service-to-service security
  • @performance-optimization - Service performance

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.