agentleFS
tranhieutttranhieutt/software_development_department/.claude/skills/microservices-patterns/SKILL.md

microservices-patterns

Skill72 starsChanged 7 months agoMITView on GitHub

Provides microservices design patterns for service decomposition, API gateway, circuit breakers, saga orchestration, and inter-service communication. Use when designing or implementing microservices architecture.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use bash-defensive-patterns, nodejs-backend-patterns and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    bash-defensive-patterns

    Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.

    Also in 3 projects that use this

  • xfstudioSkill

    nodejs-backend-patterns

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

    Also in 3 projects that use this

  • InfopibeSkill

    article-writing

    Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

    Also in 3 projects that use this

  • indranilbanerjeeSkill

    content-engine

    Draft marketing content in brand voice — blog posts, ad copy, email sequences, social posts, landing pages, and brand-voice guides — through a gated pipeline (research, outline, draft, fact-check, humanize, voice check, SEO checklist) with numbered working files and a five-gate quality scorecard before copy is publish-ready. Triggers on \"/digital-marketing-pro:content-engine\", \"write a blog post about X\", \"draft ad copy for this campaign\", \"create an email sequence\", \"landing page copy for our product\". Takes /digital-marketing-pro:content-brief as preferred upstream; hands off to /digital-marketing-pro:publish-blog, /digital-marketing-pro:content-repurpose, and /digital-marketing-pro:check. Reads the brand profile, guidelines, platform specs, and compliance rules.

    Also in 3 projects that use this

  • +1 more from xfstudio

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use async for: event propagation, eventual consistency, load leveling.

    line 42

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Microservices Patterns

Service decomposition, communication, resilience, and orchestration patterns.

Service Decomposition

PatternDescriptionUse When
Domain-DrivenAlign services with bounded contextsComplex business domains
Data-OwnershipService owns its data storeData isolation required
Team-AlignedOne service per teamLarge organizations

Communication Patterns

Sync: HTTP/gRPC

```yaml

API Gateway routing

routes:

  • match: { prefix: /orders } route: { cluster: order-service }
  • match: { prefix: /users } route: { cluster: user-service } ```

Async: Message Queue

``` Producer → Exchange → Queue → Consumer (Topic) (DLQ on failure) ```

Use async for: event propagation, eventual consistency, load leveling.

Resilience Patterns

Circuit Breaker

```typescript // Example with opossum const breaker = new CircuitBreaker(fetchUserProfile, { timeout: 3000, errorThresholdPercentage: 50, resetTimeout: 30000, }); ```

Retry with Backoff

```typescript async function retryWithBackoff(fn, maxRetries = 3) { for (let i = 0; i < maxRetries; i++) { try { return await fn(); } catch (e) { await sleep(Math.pow(2, i) * 1000); } } throw new Error('Max retries exceeded'); } ```

Data Patterns

PatternConsistencyComplexityUse When
Saga (orchestration)EventualHighComplex multi-service transactions
Saga (choreography)EventualMediumSimple event chains
Event sourcingEventualHighAudit trail, time travel
Shared databaseStrongLowAnti-pattern, avoid

API Gateway

Tools: Kong, AWS API Gateway, Envoy, NGINX.

Responsibilities: routing, auth, rate limiting, request transformation, load balancing.

Observability Stack

  • Distributed tracing: Jaeger / Tempo
  • Metrics: Prometheus + Grafana
  • Logs: ELK / Loki
  • Service mesh: Istio / Linkerd (adds mTLS, traffic management)

Related Skills

  • backend-architect — single-service architecture
  • event-sourcing-architect — event sourcing patterns
  • kubernetes-architect — deployment patterns
  • deployment-engineer — CI/CD for microservices

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.