agentsclimarketplace

System design patterns

Skill Everyone-Needs-A-Copilot/claude-copilot/.claude/skills/architecture/system-design-patterns

Architecture patterns (monolith, microservices, CQRS, event-driven, api-gateway, scalability), ADR methodology, trade-off analysis, fitness functions, and deterministic ADR completeness scoring via executable script. Use proactively when making or reviewing significant architectural decisions, writing or auditing Architecture Decision Records (ADRs), selecting an architectural pattern, validating architecture with fitness functions, or analysing trade-offs before committing to a direction. Run the scorer for deterministic completeness checking.From its SKILL.md

Install
npx -y skills add Everyone-Needs-A-Copilot/claude-copilot --skill system-design-patterns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

10.8 KB, as published. Nobody here has run it

System Design Patterns

Architecture patterns, ADR methodology, and trade-off analysis frameworks for making and documenting sound design decisions.

ADR completeness is deterministic — the script checks required field presence and scores coverage. Pattern selection and trade-off quality are prose judgment, left to the model.

Purpose

  • Document architectural decisions with full context and rationale
  • Select the right architectural pattern for the problem at hand
  • Validate architecture with automated fitness functions
  • Analyse trade-offs explicitly before committing to a direction

ADR Template

Architecture Decision Records capture the context and consequences of significant design choices.

# ADR-[number]: [Title]

**Date:** YYYY-MM-DD
**Status:** Proposed | Accepted | Deprecated | Superseded by ADR-[n]

## Context

What is the situation forcing a decision? What constraints exist?
What forces are at play (technical, political, organizational)?

## Decision

What was decided? State it as an active voice sentence:
"We will use [X] because [Y]."

## Consequences

**Positive:**
- [Benefit 1]
- [Benefit 2]

**Negative:**
- [Trade-off 1]
- [Trade-off 2]

**Neutral:**
- [Side effect that is neither good nor bad]

## Alternatives Rejected

| Alternative | Reason Rejected |
|-------------|----------------|
| [Option A]  | [Why not chosen] |
| [Option B]  | [Why not chosen] |

## References

- [Link to relevant documentation, RFC, or prior art]

Architecture Pattern Decision Matrix

PatternBest WhenAvoid WhenKey Trade-offs
Layered (Monolith)Small team, simple domain, fast iteration neededIndependent deployment required, team > 10, polyglot stackFast to build; harder to scale independently
MicroservicesIndependent deployment needed, team autonomy, polyglot stackDomain is unclear, team is small, ops maturity is lowHigh autonomy; high operational complexity
Event-DrivenAsync workflows, eventual consistency acceptable, audit trail neededStrong consistency required, debugging must be simpleDecoupled producers; complex event ordering
CQRSRead/write asymmetry, complex queries, event sourcing in useSimple CRUD, small team, low query complexityOptimised reads/writes; two models to maintain
API GatewayMultiple clients, rate limiting needed, auth aggregationSingle client, low traffic, gateway becomes bottleneckCentralised cross-cutting concerns; single point of failure risk

Fitness Function Examples

Automated architecture tests that verify the system conforms to its intended structure.

Dependency Rules

// No circular dependencies between modules
import { checkCycles } from 'madge';

test('no circular dependencies', async () => {
  const result = await madge('./src', { fileExtensions: ['ts'] });
  expect(result.circular()).toHaveLength(0);
});

Anti-Corruption Layer

// All external calls go through anti-corruption layer
test('external integrations isolated', () => {
  const externalCalls = findFilesWithPattern('src/**/*.ts', /fetch|axios|http\.request/);
  const allowedPaths = ['src/infrastructure/', 'src/adapters/'];

  externalCalls.forEach(file => {
    expect(allowedPaths.some(p => file.startsWith(p))).toBe(true);
  });
});

Performance Threshold

// Response time p99 < defined threshold
test('p99 latency within SLA', async () => {
  const metrics = await loadTestEndpoint('/api/search', { rps: 100, duration: 60 });
  expect(metrics.p99).toBeLessThan(500); // 500ms SLA
});

Layering Enforcement

// No direct database access from presentation layer
test('presentation layer does not access database', () => {
  const violations = findImports('src/controllers/**/*.ts', /typeorm|prisma|knex|sequelize/);
  expect(violations).toHaveLength(0);
});

Trade-Off Analysis Checklist

For every significant architectural decision, answer these questions before committing:

  • Quality attribute optimised: What does this choice improve? (performance, scalability, reliability, maintainability, security, cost)
  • Quality attribute sacrificed: What does this choice make worse?
  • Reversibility: Can we undo this decision in < 1 sprint? If not, treat as high-stakes.
  • Evidence-based: Is the decision driven by observed data or assumed need? (avoid premature optimisation)
  • Team readiness: Does the team have the skills to operate this pattern in production?
  • Failure mode understood: What happens when this component fails? Is it graceful?
  • Migration path: If we need to move away from this, what is the path?
  • Documentation: Is the decision recorded in an ADR?

Anti-Patterns

Anti-PatternDescriptionConsequence
God ServiceOne service owns too much domain logic and dataBecomes the monolith everyone feared; all teams blocked on it
Distributed MonolithMicroservices that must deploy together or share a databaseOperational complexity of microservices with zero autonomy benefit
Shared Database Between ServicesMultiple services read/write the same database schemaSchema changes require coordinating all services; no true encapsulation
Synchronous Chain > 3 HopsRequest triggers 4+ synchronous downstream callsLatency multiplies; one slow service degrades everything
Premature DecompositionSplitting into microservices before domain boundaries are understoodWrong boundaries require expensive re-merging or re-splitting later

Invocation — ADR Completeness Scorer (L3 Script)

When reviewing ADRs for completeness, run the scorer to get structural coverage findings. Consume the script's output only — the script source never enters context.

Deterministic core: Structural field presence checking against the 7 required ADR fields (id, title, status, date, context, decision, consequences) + trade-off checklist coverage. Source: Nygard ADR format (adr.github.io) + ISO/IEC 25010 completeness criteria.

Input format: JSON array of ADR objects. Each object:

[
  {
    "id":           "ADR-001",
    "title":        "Use PostgreSQL as primary database",
    "status":       "accepted",
    "date":         "2026-01-15",
    "context":      "We need a relational database that supports ACID transactions.",
    "decision":     "We will use PostgreSQL because it is battle-tested and open source.",
    "consequences": "Positive: ACID transactions. Negative: operational complexity.",
    "alternatives": [{"alternative": "MySQL", "reason": "Limited JSON support"}],
    "references":   ["https://postgresql.org"],
    "trade_off_checklist": {
      "quality_attribute_optimised": true,
      "quality_attribute_sacrificed": true,
      "reversibility": true,
      "evidence_based": true,
      "team_readiness": true,
      "failure_mode_understood": true,
      "migration_path": true,
      "documentation": true
    }
  }
]

Required fields: id, title, status, date, context, decision, consequences Optional fields: alternatives, references, trade_off_checklist Valid status values: proposed, accepted, deprecated, superseded, rejected

Bash invocation (file argument):

python .claude/skills/architecture/system-design-patterns/scripts/arch_fitness.py adrs.json

Bash invocation (stdin):

echo '[...]' | python .claude/skills/architecture/system-design-patterns/scripts/arch_fitness.py -

Script output:

  1. A JSON block: { "documents": [...scored...], "summary": { "total", "complete", "adequate", "partial", "incomplete" } }
  2. A markdown table with coverage percentage and band per ADR.

Coverage bands:

BandCoverageMeaning
COMPLETE90–100%All required fields present
ADEQUATE70–89%Minor gaps; usable but should be completed
PARTIAL50–69%Significant gaps; rationale unclear
INCOMPLETE0–49%Major gaps; not authoritative

What the agent does with the output:

  1. Any ADR with band == "INCOMPLETE" should not be referenced in architecture decisions until gaps are filled.
  2. HIGH-severity gaps (missing context/decision/consequences) should be filled before the ADR is marked Accepted.
  3. MEDIUM gaps (missing id/title/status/date) represent process gaps — flag to the team.
  4. LOW gaps (trade-off checklist items) are advisory — note them but do not block.

Error handling: The script exits non-zero with an ERROR: message to stderr on bad JSON, non-array input, or non-object array elements.


Related Resources


Changelog

VersionDateChanges
2.0.02026-05-20L3 script arch_fitness.py added; Invocation section; allowed-tools updated
1.0.02026-03-29Initial version with ADR template and patterns

Keep looking

Skills are one crate of 626,474. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.