microservice-patterns
Skill0 starsChanged 3 months agoMITView on GitHub
ULTRA-ADVANCED Microservice Patterns - Microservice patterns - bounded context, API gateway, service discovery, database per service CAPABILITIES: - 8 anti-pattern detection patterns with severity scoring - Compliance scoring (A-F grade) with weighted severity model - Standards-based detection (Sam Newman Building Microservices; Chris Richardson) - Automated fix suggestion generation - Directory scanning with aggregated reporting TRIGGER PHRASES: "microservice patterns, microservices architecture" STANDARDS: Sam Newman Building Microservices; Chris Richardson ENVIRONMENT: Works with any codebase, any language, any framework. SECURITY: Read-only analysis.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- huanglei288766/claude-code-zhtheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- huanglei288766/claude-code-zh★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository220 other files it gives its agents.
- AGENTS.mdAGENTS.md
- desktop-control-mcpSkill
- force-deleteSkill
- analytics-guardSkill
- api-contract-guardSkill
- api-security-guardSkill
- async-guardSkill
- build-guardSkill
- changelog-guardSkill
- ci-guardSkill
- circuit-breaker-guardSkill
- clean-arch-guardSkill
- clean-code-guardSkill
- comment-guardSkill
- commit-guardSkill
- concurrency-guardSkill
- config-guardSkill
- cors-guardSkill
- cqrs-guardSkill
- csrf-guardSkill
- css-guardSkill
- cyclomatic-guardSkill
- ddd-guardSkill
- dead-code-guardSkill
- dependency-injection-guardSkill
- deploy-guardSkill
- docker-compose-guardSkill
- docker-guardSkill
- docs-guardSkill
- duplicate-code-guardSkill
- encryption-guardSkill
- env-check-guardSkill
- error-handling-guardSkill
- event-driven-guardSkill
- event-sourcing-guardSkill
- file-guardSkill
- graceful-shutdown-guardSkill
- health-check-guardSkill
- helm-guardSkill
- hexagonal-guardSkill
- html-guardSkill
- iam-guardSkill
- idor-guardSkill
- injection-guardSkill
- json-guardSkill
- jwt-guardSkill
- kubernetes-guardSkill
- large-class-guardSkill
- logging-pattern-guardSkill
- long-method-guardSkill
- lsp-guardSkill
- markdown-guardSkill
- message-queue-guardSkill
- migration-pattern-guardSkill
- naming-guardSkill
- nested-depth-guardSkill
- observer-pattern-guardSkill
- pr-guardSkill
- python-guardSkill
- react-guardSkill
- The first 60 shown.
The file
Files
Microservice Patterns - ULTRA-ADVANCED v2.0
Overview
Microservice patterns - bounded context, API gateway, service discovery, database per service. This guard scans codebases for violations, scores compliance, and generates actionable remediation recommendations.
Detection Patterns
| Pattern | Description | Severity |
| Shared database | Multiple services same DB | cr |
| No bounded context | Boundaries undefined | hi |
| Sync call chains | Deep call chain | hi |
| No API gateway | Clients call services directly | md |
| No service discovery | Hardcoded URLs | hi |
| No health checks | Status unknown | hi |
| No circuit breaker | Cascading failures | cr |
| No distributed tracing | Not traceable | hi |
Standards
- Sam Newman Building Microservices; Chris Richardson
Scoring
| Grade | Score | Meaning |
| A | 90-100 | Excellent |
| B | 75-89 | Good |
| C | 60-74 | Fair |
| D | 40-59 | Poor |
| F | 0-39 | Failing |
Implementation
import re, os
from typing import Dict, List, Set, Any
from datetime import datetime
class MicroservicePatterns:
def __init__(self):
self.file_results = {}
def scan_file(self, fp: str) -> Dict:
try:
with open(fp, "r", encoding="utf-8", errors="ignore") as f:
c = f.read()
return self._analyze(c, fp)
except Exception as e:
return {"error": str(e), "file": fp}
def _analyze(self, c: str, fp: str) -> Dict:
issues = []
for pid, info in self._patterns().items():
m = re.findall(info["rx"], c, re.IGNORECASE | re.MULTILINE)
if m:
issues.append({"id": pid, "sev": info["sev"], "cnt": len(m), "msg": info["msg"]})
s = max(0.0, 100.0 - sum(self._w(i["sev"]) * i["cnt"] for i in issues))
return {"file": fp, "issues": issues, "score": round(s, 1), "grade": self._g(s), "at": datetime.now().isoformat()}
def _patterns(self):
return {}
def _w(self, s):
return {"cr": 10.0, "hi": 7.0, "md": 5.0, "lo": 2.0}.get(s, 5.0)
def _g(self, s):
return "A" if s >= 90 else "B" if s >= 75 else "C" if s >= 60 else "D" if s >= 40 else "F"
def scan_dir(self, d, exts=None):
r = {}
sk = {".git", "node_modules", "venv", "__pycache__", "target", "build", "dist"}
for root, dirs, files in os.walk(d):
dirs[:] = [dd for dd in dirs if not dd.startswith(".") and dd not in sk]
for f in files:
if exts and not any(f.endswith(e) for e in exts): continue
r[os.path.join(root, f)] = self.scan_file(os.path.join(root, f))
return r
def report(self, r):
if not r: return {"error": "No results"}
ti = sum(len(x.get("issues", [])) for x in r.values() if "issues" in x)
sc = [x.get("score", 0) for x in r.values() if "score" in x]
a = sum(sc) / len(sc) if sc else 0
return {"files": len(r), "issues": ti, "avg": round(a, 1), "grade": self._g(a),
"cr": sum(1 for x in r.values() for i in x.get("issues", []) if i.get("sev") == "cr"),
"hi": sum(1 for x in r.values() for i in x.get("issues", []) if i.get("sev") == "hi"),
"recs": []}Version: 2.0.0 Status: PRODUCTION READY Patterns: 8 Standards: Sam Newman Building Microservices; Chris Richardson
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
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.

