microservice-design-patterns

microservice-design-patterns is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 140 tokens per session (2,103 once invoked), scanned A, original, MIT.

A guide to patterns for systems split into small services, including SAGA, CQRS, and event sourcing. These patterns coordinate work and data across services that communicate separately.

In plain words
What is it for?
Use it to design distributed transactions, compensating actions, event-based communication, and service architectures with separate read and write concerns.
Why use it?
It helps address consistency and coordination problems when one business operation spans multiple services.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design distributed transactions, compensating actions, event-based communication, and service architectures with separate read and write concerns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/microservices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add j4flmao/agent-skills --skill microservices
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for microservice-design-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/microservices/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/microservices)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/microservices"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/microservices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for microservice-design-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/microservices"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/microservices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,103 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00140 $0.02103
Opus 5.5 $0.00056 $0.00841
Sonnet 5.5 $0.00028 $0.00421
Haiku 4.5 $0.00014 $0.00210

Measured yesterday against content hash ad2aa3ebe156, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

microservice-design-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/backend/universal/design-patterns/microservices/SKILL.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Microservice Data-Consistency Patterns

Purpose

With a database per service, one business operation spans several local transactions. This skill picks the pattern that keeps such operations consistent (sagas with compensation), separates read and write models when needed (CQRS), and shows how event sourcing and the outbox fit in.

Agent Protocol

Trigger

Exact user phrases: "saga pattern", "distributed transaction", "compensating transaction", "choreography vs orchestration", "CQRS with event sourcing", "cross-service consistency", "two-phase commit microservices".

Input Context

  • Business flow and participating services with their data stores.
  • Which steps are reversible, and which have external side effects (payments, emails).
  • Existing messaging infrastructure and workflow engines (Temporal, Camunda, AWS Step Functions).

Output Artifact

Saga step table with compensations, chosen coordination style, and the event/command contracts. No files unless requested.

Response Format

Saga: {name}   Style: {orchestration | choreography}
| # | Service | Action | Compensation | Retryable |
Pivot step: {step after which saga only moves forward}
Isolation countermeasure: {semantic lock | commutative update | reread}
Read model: {CQRS projection or none}

1. Saga: Distributed Transactions Without 2PC

Two-phase commit (XA) needs every participant to support it and holds locks while a coordinator decides; most brokers, NoSQL stores and SaaS APIs cannot participate, and a coordinator failure blocks participants. Sagas replace one global transaction with a sequence of local transactions, each publishing an event or replying to a command. On failure, already-completed steps are undone by compensating transactions (semantic undo such as "refund", not a rollback).

Step types:

  • Compensatable: can be undone (reserve inventory -> release).
  • Pivot: the go/no-go point (charge card). After it, the saga must complete.
  • Retryable: steps after the pivot that must eventually succeed (send confirmation) and are retried until they do.

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +112 lines · +116 tokens per session ad2aa3ebe156
  2. 1mo ago First seen · 62 lines · 24 tokens per session scan A 9d841a0fd426

Subscribe to this mod's changes

microservice-design-patterns is a skill published in the GitHub repository j4flmao/agent-skills (35 stars, last pushed yesterday), licensed MIT. It adds 140 tokens to every session and 2,103 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

Event Sourcing Testing

Testing event sourcing patterns including event store validation, projection testing, saga orchestration, and event versioning compatibility.

PramodDutta/qaskills · 27 tokens

event-driven-architecture

Event-Driven Architecture Review: Reviews and designs event-driven systems — Event Sourcing, CQRS, Saga patterns, Domain Events, message brokers, and eventual consistency. Use when the user mentions events, event sourcing, CQRS, saga, choreography vs orchestration, Kafka architecture, event store, projections, read…

camilooscargbaptista/cto-toolkit · 85 tokens

enterprise-architecture-patterns

Complete guide for enterprise architecture patterns including domain-driven design, event sourcing, CQRS, saga patterns, API gateway, service mesh, and scalability.

manutej/luxor-claude-marketplace · 34 tokens

architecture-paradigm-cqrs-es

Applies CQRS and Event Sourcing for read/write separation and audit trails. Use when designing systems with complex domain logic or full state-change history.

athola/claude-night-market · 39 tokens

cratis-arc-authentication-authorization-and-identity

Use when configuring C# Arc authentication, endpoint authorization, identity providers or React identity integration. Not for command validation or Chronicle tenant namespaces alone.

Cratis/AI · 40 tokens

cratis-chronicle-client-elixir

Use when adding Chronicle to an Elixir OTP application, defining its event structs or handling client append outcomes. Not for JVM or Node.js clients; use the corresponding Chronicle client sibling.

Cratis/AI · 45 tokens