microservices-knowledge

Microservices knowledge base: guidance on service decomposition, communication patterns, API gateway, service discovery, and data management for architecture audits and generation.

Last repository push
GitHub Stars
109
Forks
26
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "microservices-knowledge" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a25364ba6288f884051c583ee667214343bc98ca906a9adc1077e7e1b2f85a20. Verify the upstream source and version against https://github.com/dykyi-roman/awesome-claude-code before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Microservices knowledge base: guidance on service decomposition, communication patterns, API gateway, service discovery, and data management for architecture audits and generation.

0 Downloads

Introduction source: third_party · dykyi-roman · 0.0.1 Reference

SkillPi interpretation

Tasks
Microservices Architecture knowledge base. Provides service decomposition, communication patterns, API gateway, service discovery, and data management guidelines for architecture audits and generation.
Audience
| Factor | Monolith | Microservices | |--------|----------|---------------| | Team size | < 10 developers | > 10, multiple teams | | Domain complexity | Simple/moderate | Complex, many bounded contexts | | Scalability needs | Uniform scaling | Independent scaling per component | | Deployment frequency | Infrequent, coordinated | Frequent, independent | | Technology diversity | Single stack | Polyglot needed | | Organizational maturity | Starting out | DevOps culture, CI/CD mature |
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: microservices-knowledge
description: Microservices Architecture knowledge base. Provides service decomposition, communication patterns, API gateway, service discovery, and data management guidelines for architecture audits and generation.

Microservices Architecture Knowledge Base

Quick reference for microservices architecture patterns and PHP implementation guidelines.

Core Principles

Architecture Overview

┌──────────────────────────────────────────────────────────────────────────┐
│                     MICROSERVICES ARCHITECTURE                           │
├──────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│   ┌──────────┐     ┌──────────────────┐     ┌──────────────────┐        │
│   │  Client   │────▶│   API Gateway    │────▶│   Service A      │        │
│   │          │     │  (Routing/Auth)   │     │  (Own Database)  │        │
│   └──────────┘     └──────────────────┘     └──────────────────┘        │
│                           │                       │                      │
│                           │                       │ async                │
│                    ┌──────▼──────┐          ┌─────▼──────────┐          │
│                    │  Service B  │          │  Message Broker │          │
│                    │ (Own DB)    │◀─────────│  (Events/Cmds)  │          │
│                    └─────────────┘          └────────────────┘          │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│   Decomposition Strategies:                                              │
│   • By Business Capability    - Align with bounded contexts             │
│   • By Subdomain (DDD)        - Core, Supporting, Generic               │
│   • Strangler Fig              - Incremental migration from monolith    │
│                                                                          │
│   Communication:                                                         │
│   • Synchronous  - REST, gRPC, GraphQL (request-response)              │
│   • Asynchronous - Message queues, event streaming                      │
│                                                                          │
└──────────────────────────────────────────────────────────────────────────┘

Service Communication Patterns

Pattern Type Use When Trade-off
REST Sync CRUD, simple queries Easy but coupling
gRPC Sync Internal service-to-service, performance-critical Fast but schema coupling
GraphQL Sync Client-driven queries, BFF Flexible but complex
Message Queue Async Reliable delivery, work distribution Decoupled but eventual consistency
Event Streaming Async Real-time, event sourcing, audit trails Scalable but complex ordering
Request-Reply Async Async request needing response Decoupled but higher latency

API Gateway Patterns

Pattern Description When to Use
Simple Proxy Routes requests to services Small number of services
Gateway Aggregation Combines multiple service calls Reduce client round-trips
BFF (Backend for Frontend) Gateway per client type Mobile vs Web vs API clients
Gateway Offloading Auth, rate limiting, TLS Cross-cutting concerns

Service Discovery

Approach How It Works Example
Client-side Client queries registry, selects instance Netflix Eureka
Server-side Load balancer queries registry AWS ALB, Kubernetes
DNS-based DNS SRV records resolve to instances Consul DNS, CoreDNS
Platform-native Container orchestrator handles routing Kubernetes Services

Data Management

Pattern Description Consistency
Database per Service Each service owns its data Strong (within service)
Shared Database Services share one database Strong (anti-pattern!)
Saga Distributed transaction via events Eventual
CQRS Separate read/write models Eventual
Event Sourcing Events as source of truth Eventual
API Composition Query multiple services, merge results Eventual

When to Use Microservices vs Monolith

Factor Monolith Microservices
Team size < 10 developers > 10, multiple teams
Domain complexity Simple/moderate Complex, many bounded contexts
Scalability needs Uniform scaling Independent scaling per component
Deployment frequency Infrequent, coordinated Frequent, independent
Technology diversity Single stack Polyglot needed
Organizational maturity Starting out DevOps culture, CI/CD mature

Detection Patterns

# Service boundary indicators
Grep: "HttpClient|GuzzleHttp|curl_init" --glob "**/Infrastructure/**/*.php"
Grep: "grpc|protobuf" --glob "**/*.php"

# API Gateway patterns
Grep: "X-Forwarded|X-Request-ID|X-Correlation" --glob "**/*.php"
Glob: **/Gateway/**/*.php

# Service discovery
Grep: "ServiceDiscovery|ServiceRegistry|consul|etcd" --glob "**/*.php"
Grep: "KUBERNETES_SERVICE|SERVICE_HOST" --glob "**/*.env*"

# Database per service
Grep: "DATABASE_URL|DB_CONNECTION" --glob "**/*.env*"
Grep: "DATABASE_HOST|DB_HOST" --glob "**/docker-compose*.yml"

# Inter-service communication
Grep: "AMQPChannel|RabbitMQ|Kafka|SQS" --glob "**/Infrastructure/**/*.php"
Grep: "EventPublisher|MessageBus" --glob "**/*.php"

Advanced Patterns

Strangler Fig Pattern

Incrementally migrate from monolith to microservices:

Phase 1: Proxy all traffic through gateway
Phase 2: Extract one feature to service, route via gateway
Phase 3: Repeat until monolith is empty shell
Phase 4: Decommission monolith

┌─────────┐     ┌──────────┐     ┌──────────────┐
│  Client  │────▶│ Gateway  │────▶│  New Service  │  (extracted)
│          │     │ (Router) │     └──────────────┘
│          │     │          │────▶┌──────────────┐
│          │     │          │     │  Monolith     │  (shrinking)
└─────────┘     └──────────┘     └──────────────┘

Migration Decision:

Factor Extract First Keep in Monolith
Change frequency High Low
Team ownership Dedicated team Shared
Scaling needs Independent scaling Uniform
Technology fit Different stack needed Same stack fine

API Gateway Aggregation Patterns

Pattern When Example
Simple proxy 1:1 route mapping /users → User Service
Aggregation Client needs data from N services Order + Customer + Payment
BFF Different clients need different data Mobile vs Web vs API
Offloading Cross-cutting concerns Auth, rate limiting, TLS

Database-Per-Service Trade-offs

Aspect Shared DB DB per Service
Consistency ACID transactions Saga/eventual
Querying JOIN across domains API composition
Independence Coupled deployments Independent
Complexity Low High
Schema changes Coordinated Independent

References

For detailed information, load these reference files:

  • references/patterns.md — Service mesh, API gateway implementations, service discovery details, data consistency, Strangler Fig, database-per-service
  • references/antipatterns.md — Distributed monolith, shared database, missing boundaries, chatty communication

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供微服务架构核心知识库,涵盖服务分解、通信模式、API 网关、服务发现和数据管理等关键主题
  • 适用于架构审计与生成场景,具有明确的技术实用价值
  • 内容结构化为表格、图示和检测模式,便于开发者快速参考与应用
Trigger Precision95/100

Highlights

  • description 清晰准确,明确说明 Skill 用途为微服务架构知识库
  • 触发词完整,边界清晰,无歧义或重叠风险
Structure and Standards95/100

Highlights

  • 文档结构清晰,分章节组织,包含图示、表格和代码片段
  • frontmatter 完整,单文件长度适中(约 400 行),符合规范
Execution Reliability90/100

Areas to improve

  • Missing referenced files Reported severity: Major

    SKILL.md 引用了 references/patterns.md 和 references/antipatterns.md,但未传入 ZIP 包

    Recommendation: 请补充 references/patterns.md 和 references/antipatterns.md 文件,或移除引用以避免用户困惑

Highlights

  • 内容为标准微服务架构知识,来源可靠,建议合理
  • 无实际执行流程,但知识准确,无误导性信息
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.