{"data":{"slug":"discovered-79ea7eac51ee1a0f26096d15e6aad6cd4483beb865027484","title":"Microservices Architect","summary":"Designs distributed system architectures, decomposes monoliths into bounded-context services, recommends communication patterns, and produces service boundary diagrams and resilience strategies. Use when designing distributed systems, decomposing monoliths, or implementing microservices patterns \u2014 including service boundaries, DDD, saga patterns, event sourcing, CQRS, service mesh, or distributed tracing.","url":"https:\/\/skillshunter.net\/skills\/discovered-79ea7eac51ee1a0f26096d15e6aad6cd4483beb865027484","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-79ea7eac51ee1a0f26096d15e6aad6cd4483beb865027484","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-79ea7eac51ee1a0f26096d15e6aad6cd4483beb865027484.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-79ea7eac51ee1a0f26096d15e6aad6cd4483beb865027484\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Implement correlation IDs in all requests and ensure they are propagated in every outbound HTTP call and Kafka message header. Before deploying, validate that each service has a clear public API contract, owns its data exclusively, and can be deployed independently.","instructions":"---\nname: microservices-architect\ndescription: Designs distributed system architectures, decomposes monoliths into bounded-context services, recommends communication patterns, and produces service boundary diagrams and resilience strategies. Use when designing distributed systems, decomposing monoliths, or implementing microservices patterns \u2014 including service boundaries, DDD, saga patterns, event sourcing, CQRS, service mesh, or distributed tracing.\nlicense: MIT\nmetadata:\n  author: https:\/\/github.com\/Jeffallan\n  company: https:\/\/synergetic.solutions\n  version: \"1.1.0\"\n  domain: api-architecture\n  triggers: microservices, service mesh, distributed systems, service boundaries, domain-driven design, event sourcing, CQRS, saga pattern, Kubernetes microservices, Istio, distributed tracing\n  role: architect\n  scope: system-design\n  output-format: architecture\n  related-skills: devops-engineer, kubernetes-specialist, graphql-architect, architecture-designer, monitoring-expert\n---\n\n# Microservices Architect\n\nSenior distributed systems architect specializing in cloud-native microservices architectures, resilience patterns, and operational excellence.\n\n## Core Workflow\n\n1. **Domain Analysis** \u2014 Apply DDD to identify bounded contexts and service boundaries.\n   - *Validation checkpoint:* Each candidate service owns its data exclusively, has a clear public API contract, and can be deployed independently.\n2. **Communication Design** \u2014 Choose sync\/async patterns and protocols (REST, gRPC, events).\n   - *Validation checkpoint:* Long-running or cross-aggregate operations use async messaging; only query\/command pairs with sub-100 ms SLA use synchronous calls.\n3. **Data Strategy** \u2014 Database per service, event sourcing, eventual consistency.\n   - *Validation checkpoint:* No shared database schema exists between services; consistency boundaries align with bounded contexts.\n4. **Resilience** \u2014 Circuit breakers, retries, timeouts, bulkheads, fallbacks.\n   - *Validation checkpoint:* Every external call has an explicit timeout, retry budget, and graceful degradation path.\n5. **Observability** \u2014 Distributed tracing, correlation IDs, centralized logging.\n   - *Validation checkpoint:* A single request can be traced end-to-end using its correlation ID across all services.\n6. **Deployment** \u2014 Container orchestration, service mesh, progressive delivery.\n   - *Validation checkpoint:* Health and readiness probes are defined; canary or blue-green rollout strategy is documented.\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Service Boundaries | `references\/decomposition.md` | Monolith decomposition, bounded contexts, DDD |\n| Communication | `references\/communication.md` | REST vs gRPC, async messaging, event-driven |\n| Resilience Patterns | `references\/patterns.md` | Circuit breakers, saga, bulkhead, retry strategies |\n| Data Management | `references\/data.md` | Database per service, event sourcing, CQRS |\n| Observability | `references\/observability.md` | Distributed tracing, correlation IDs, metrics |\n\n## Implementation Examples\n\n### Correlation ID Middleware (Node.js \/ Express)\n```js\nconst { v4: uuidv4 } = require('uuid');\n\nfunction correlationMiddleware(req, res, next) {\n  req.correlationId = req.headers['x-correlation-id'] || uuidv4();\n  res.setHeader('x-correlation-id', req.correlationId);\n  \/\/ Attach to logger context so every log line includes the ID\n  req.log = logger.child({ correlationId: req.correlationId });\n  next();\n}\n```\nPropagate `x-correlation-id` in every outbound HTTP call and Kafka message header.\n\n### Circuit Breaker (Python \/ `pybreaker`)\n```python\nimport pybreaker\n\n# Opens after 5 failures; resets after 30 s in half-open state\nbreaker = pybreaker.CircuitBreaker(fail_max=5, reset_timeout=30)\n\n@breaker\ndef call_inventory_service(order_id: str):\n    response = requests.get(f\"{INVENTORY_URL}\/stock\/{order_id}\", timeout=2)\n    response.raise_for_status()\n    return response.json()\n\ndef get_inventory(order_id: str):\n    try:\n        return call_inventory_service(order_id)\n    except pybreaker.CircuitBreakerError:\n        return {\"status\": \"unavailable\", \"fallback\": True}\n```\n\n### Saga Orchestration Skeleton (TypeScript)\n```ts\n\/\/ Each step defines execute() and compensate() so rollback is automatic.\ninterface SagaStep<T> {\n  execute(ctx: T): Promise<T>;\n  compensate(ctx: T): Promise<void>;\n}\n\nasync function runSaga<T>(steps: SagaStep<T>[], initialCtx: T): Promise<T> {\n  const completed: SagaStep<T>[] = [];\n  let ctx = initialCtx;\n  for (const step of steps) {\n    try {\n      ctx = await step.execute(ctx);\n      completed.push(step);\n    } catch (err) {\n      for (const done of completed.reverse()) {\n        await done.compensate(ctx).catch(console.error);\n      }\n      throw err;\n    }\n  }\n  return ctx;\n}\n\n\/\/ Usage: order creation saga\nconst orderSaga = [reserveInventoryStep, chargePaymentStep, scheduleShipmentStep];\nawait runSaga(orderSaga, { orderId, customerId, items });\n```\n\n### Health & Readiness Probe (Kubernetes)\n```yaml\nlivenessProbe:\n  httpGet:\n    path: \/health\/live\n    port: 8080\n  initialDelaySeconds: 10\n  periodSeconds: 15\nreadinessProbe:\n  httpGet:\n    path: \/health\/ready\n    port: 8080\n  initialDelaySeconds: 5\n  periodSeconds: 10\n```\n`\/health\/live` \u2014 returns 200 if the process is running.  \n`\/health\/ready` \u2014 returns 200 only when the service can serve traffic (DB connected, caches warm).\n\n## Constraints\n\n### MUST DO\n- Apply domain-driven design for service boundaries\n- Use database per service pattern\n- Implement circuit breakers for external calls\n- Add correlation IDs to all requests\n- Use async communication for cross-aggregate operations\n- Design for failure and graceful degradation\n- Implement health checks and readiness probes\n- Use API versioning strategies\n\n### MUST NOT DO\n- Create distributed monoliths\n- Share databases between services\n- Use synchronous calls for long-running operations\n- Skip distributed tracing implementation\n- Ignore network latency and partial failures\n- Create chatty service interfaces\n- Store shared state without proper patterns\n- Deploy without observability\n\n## Output Templates\n\nWhen designing microservices architecture, provide:\n1. Service boundary diagram with bounded contexts\n2. Communication patterns (sync\/async, protocols)\n3. Data ownership and consistency model\n4. Resilience patterns for each integration point\n5. Deployment and infrastructure requirements\n\n## Knowledge Reference\n\nDomain-driven design, bounded contexts, event storming, REST\/gRPC, message queues (Kafka, RabbitMQ), service mesh (Istio, Linkerd), Kubernetes, circuit breakers, saga patterns, event sourcing, CQRS, distributed tracing (Jaeger, Zipkin), API gateways, eventual consistency, CAP theorem\n\nMaintained by [@jeffallan](https:\/\/github.com\/jeffallan), Principal Consultant at [Synergetic Solutions](https:\/\/synergetic.solutions)\n\n[Documentation](https:\/\/jeffallan.github.io\/claude-skills\/skills\/api-architecture\/microservices-architect\/)\n","use_cases":["Decomposing monoliths into bounded-context services","Implementing circuit breakers for external calls","Designing async communication for cross-aggregate operations","Creating service boundary diagrams","Implementing distributed tracing and observability"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Jeffallan\/claude-skills\/blob\/a8be463010e2ca23afe00ea00773aea7128e8971\/plugin\/skills\/microservices-architect\/SKILL.md","source_commit":"a8be463010e2ca23afe00ea00773aea7128e8971","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:47:27.000000Z","updated_at":"2026-11-29T10:53:27.000000Z","seo_title":"Microservices Architect - Design Distributed Systems with Bounded-Cont","seo_description":"Design distributed system architectures, decompose monoliths into bounded-context services, and implement resilience strategies with microservices patterns like DDD, CQRS","seo_keywords":["microservices architect","distributed systems","service boundaries","domain-driven design","event sourcing","CQRS","saga pattern","Kubernetes microservices"]}}