Agent skill

Patterns

by sickn33 in sickn33/agentic-awesome-skills

Reference document for monopoly patterns. An agent skill from sickn33/agentic-awesome-skills.

MITAuto-check passedBackend & APIs

Install Patterns

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/monopoly/patterns .claude/skills/patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
patterns
GitHub stars
47k
Used in
1 other repo
Token cost
~2.6k tokens
SKILL.md length
1,033 words
Files
1
Skills in repo
1,394
Repo updated
First seen
Licence
MIT

At a glance

Reference document for monopoly patterns. An agent skill from sickn33/agentic-awesome-skills.

  • Works in 12 steps: CQRS (Command Query Responsibility… → Event Sourcing → Saga Pattern → …
  • Tasks that involve Event-driven systems
  • SKILL.md covers When to Use, Table of Contents, 1. CQRS (Command Query… and 2. Event Sourcing, plus 11 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Patterns is an agent skill from sickn33/agentic-awesome-skills. Reference document for monopoly patterns.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Event-driven systems and Microservices. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • Tasks that involve Event-driven systems
  • Tasks that involve Microservices

Example prompts

  • “/patterns”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. CQRS (Command Query Responsibility Segregation)
  2. Event Sourcing
  3. Saga Pattern
  4. Circuit Breaker
  5. Bulkhead
  6. Strangler Fig Pattern
  7. Outbox Pattern
  8. Consistent Hashing
  9. Backpressure
  10. Leader Election
  11. Two-Phase Commit (2PC)
  12. Read-Through / Write-Through / Write-Behind Cache

What it can do on your machine

Read from SKILL.md and the folder at commit 1e53ce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Patterns loads about 2.6k tokens when it runs. Until then it costs about 13 tokens; SKILL.md has 1,033 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~13
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit 1e53ce2, republished under its MIT licence (© sickn33). 1,033 words, ~2,605 tokens.

Download SKILL.mdSave it as .claude/skills/patterns/SKILL.md (or your agent's skills folder).
name
patterns
description
Reference document for monopoly patterns.
source
community
date_added
2026-09-04
risk
safe
reports-to
monopoly

MONOPOLY — Design Patterns Deep Dive

When to Use

  • Use this skill when the task matches this description: Reference document for monopoly patterns.

Table of Contents

  1. CQRS
  2. Event Sourcing
  3. Saga Pattern
  4. Circuit Breaker
  5. Bulkhead
  6. Strangler Fig
  7. Sidecar / Service Mesh
  8. Outbox Pattern
  9. Consistent Hashing
  10. Backpressure
  11. Leader Election
  12. Two-Phase Commit

1. CQRS (Command Query Responsibility Segregation)

What it is: Separate the read model (Query) from the write model (Command) into distinct services, databases, or code paths.

When to use:

  • Read load is 10×+ write load (most web apps)
  • Read queries are complex aggregations over write data
  • Need to optimize read and write paths independently
  • Domain model is complex (DDD contexts)

Implementation:

Write Path:  Client → Command API → Write DB (normalized, PostgreSQL)
Read Path:   Client → Query API  → Read DB (denormalized, Redis / Elasticsearch)
Sync:        Write DB → CDC (Debezium) → Message Queue → Read DB updater

Trade-offs:

  • ✅ Independent scaling of read and write
  • ✅ Optimized schemas for each operation type
  • ❌ Eventual consistency between write and read models
  • ❌ Increased complexity; two models to maintain

Real-world users: Amazon (order service), LinkedIn (feed)


2. Event Sourcing

What it is: Store state as a sequence of immutable events rather than current state. Rebuild current state by replaying events.

When to use:

  • Full audit trail is a regulatory requirement (fintech, healthcare)
  • Need to replay history for debugging or analytics
  • Complex domain with many state transitions
  • Need to derive multiple read projections from same data

Implementation:

Event Store: append-only log (Kafka, EventStoreDB)
Snapshots:   periodic snapshots to speed up state rebuild
Projections: consumers build read models from events

Trade-offs:

  • ✅ Complete audit history; perfect for compliance
  • ✅ Replay and time-travel debugging
  • ❌ Querying current state requires projection maintenance
  • ❌ Event schema evolution is hard
  • ❌ High storage overhead over time

3. Saga Pattern

What it is: Manage distributed transactions across microservices via a sequence of local transactions, each publishing an event. If a step fails, compensating transactions undo previous steps.

Two variants:

  • Choreography: Services react to events autonomously (decentralized)
  • Orchestration: A central Saga Orchestrator coordinates steps (centralized)

When to use:

  • Multi-service workflows where ACID across services is impossible
  • Long-running business transactions (order → payment → inventory → shipping)
  • Need rollback across service boundaries

Choreography Example:

OrderService creates order →
  [event: OrderCreated] →
    PaymentService charges card →
      [event: PaymentProcessed] →
        InventoryService reserves stock →
          [event: StockReserved] →
            ShippingService books courier

Compensating Transactions (on failure):

ShippingService fails →
  [event: ShippingFailed] →
    InventoryService releases stock →
      PaymentService refunds card →
        OrderService marks order failed

Trade-offs:

  • ✅ No distributed locking; high availability
  • ✅ Scales well across services
  • ❌ Hard to debug; distributed trace required
  • ❌ Compensating transactions are complex to implement correctly

4. Circuit Breaker

What it is: A proxy that monitors calls to a service. If failure rate exceeds threshold, the circuit "opens" and calls fail fast instead of waiting for timeout.

States:

CLOSED  → calls pass through; monitor failure rate
OPEN    → calls fail immediately; no calls to downstream
HALF-OPEN → let a probe call through; if success, close; if fail, stay open

When to use:

  • Calling any external service (payment gateway, SMS, email)
  • Microservices calling each other
  • Preventing timeout cascade when downstream is slow

Implementation tools: Hystrix (deprecated), Resilience4j, Polly (.NET), Envoy proxy

Thresholds (starting point):

  • Open after 50% failure rate over 10 requests
  • Stay open for 30 seconds
  • Half-open: allow 1 probe request

Trade-offs:

  • ✅ Prevents cascade failures
  • ✅ Gives downstream time to recover
  • ❌ Adds latency overhead for monitoring
  • ❌ Requires fallback behavior when circuit is open

5. Bulkhead

What it is: Isolate components so a failure in one doesn't consume resources of others. Named after the watertight compartments in ship hulls.

Types:

  • Thread Pool Bulkhead: Separate thread pools per service call
  • Semaphore Bulkhead: Limit concurrent calls per service
  • Process Bulkhead: Separate processes/containers per service type

When to use:

  • Multiple tenants sharing infrastructure (SaaS)
  • One slow service consuming all connection pool slots
  • Protecting critical services from being starved by non-critical ones

Example:

Without bulkhead:
  [Recommendation Service hangs] → fills shared thread pool → [Payment Service starves]

With bulkhead:
  [Recommendation Service hangs] → fills its own thread pool (10 threads) → [Payment Service unaffected, has its own 50 threads]

6. Strangler Fig Pattern

What it is: Incrementally replace a legacy monolith by routing new functionality to new microservices, while keeping the monolith alive for unchanged features.

Migration steps:

Phase 1: Deploy proxy in front of monolith (no user impact)
Phase 2: Route one feature to new microservice
Phase 3: Verify; deprecate that feature in monolith
Phase 4: Repeat for each feature
Phase 5: Monolith is empty; decommission

When to use:

  • Migrating legacy monolith to microservices
  • Can't do a big-bang rewrite (too risky)
  • Need to ship new features during migration

Trade-offs:

  • ✅ Zero downtime migration
  • ✅ Incremental risk
  • ❌ Dual maintenance burden during migration (monolith + new services)
  • ❌ Proxy adds latency; must be managed carefully

7. Outbox Pattern

What it is: Solve the dual-write problem (write to DB AND publish to queue atomically) by writing the event to an "outbox" table in the same DB transaction, then having a separate process relay it to the queue.

Problem it solves:

❌ WRONG (dual-write race):
  BEGIN;
  UPDATE orders SET status='paid';
  COMMIT;
  // Crash here → event never published, DB and queue are inconsistent
  publish(PaymentProcessed);
✅ CORRECT (outbox):
  BEGIN;
  UPDATE orders SET status='paid';
  INSERT INTO outbox (event_type, payload) VALUES ('PaymentProcessed', {...});
  COMMIT;
  // Relay process reads outbox and publishes to Kafka
  // At-least-once delivery guaranteed; make consumers idempotent

Relay options: Debezium (CDC), polling relay, transaction log tailing


Show full SKILL.md (389 more words)Show less

8. Consistent Hashing

What it is: A hashing scheme where adding or removing nodes requires only K/N keys to be remapped (K = keys, N = nodes), instead of remapping all keys.

When to use:

  • Distributing cache keys across Redis cluster nodes
  • Routing requests to servers in a distributed system
  • Partitioning data across database nodes

Virtual nodes: Assign multiple positions per physical node on the hash ring to ensure even distribution even with few nodes.


9. Backpressure

What it is: A mechanism for consumers to signal producers to slow down when they can't keep up, preventing memory exhaustion and cascade failures.

Strategies:

  • Drop: Discard overflow messages (acceptable for metrics, logs)
  • Buffer: Queue up to a limit, then block or drop
  • Block: Producer waits until consumer catches up (simplest, may cause timeout)
  • Rate Limit: Throttle producers at ingestion point

When to use:

  • Message queue consumers are slower than producers
  • Real-time data pipeline ingestion spikes
  • API rate limiting for upstream clients

10. Leader Election

What it is: In a distributed system, elect a single node to perform a privileged task (e.g., writing to DB, sending scheduled jobs, coordinating work).

Algorithms:

  • Raft: Used by etcd, CockroachDB, Consul. Practical and well-understood.
  • ZooKeeper (ZAB): Used by Kafka, HBase. Mature but operationally heavy.
  • Bully Algorithm: Simple; highest ID wins. Not fault-tolerant.

When to use:

  • Scheduled jobs that should only run once (cron replacement)
  • Primary/replica database failover coordination
  • Distributed lock management

Tools: etcd, ZooKeeper, Consul, Redis (Redlock — use with caution)


11. Two-Phase Commit (2PC)

What it is: A distributed algorithm that ensures all participants in a transaction either all commit or all abort.

Phases:

Phase 1 (Prepare): Coordinator asks all participants "can you commit?"
  All say YES → proceed to Phase 2
  Any says NO → abort

Phase 2 (Commit): Coordinator tells all participants to commit

When to use (sparingly):

  • Strong consistency is an absolute requirement across services
  • Data loss is catastrophic (financial settlements)

Why to avoid:

  • Coordinator is a SPOF
  • Blocks on participant failure
  • Very low throughput under contention
  • Prefer Saga Pattern in most microservice architectures

12. Read-Through / Write-Through / Write-Behind Cache

Read-Through:

Client → Cache (miss) → Cache fetches from DB → Returns to client

Cache is always populated on miss. Simple for clients. Risk: cold start.

Write-Through:

Client → Cache → Cache writes to DB synchronously → Confirms

Strong consistency. Higher write latency. Good for read-heavy with consistency need.

Write-Behind (Write-Back):

Client → Cache → Confirms immediately → Async flush to DB

Very low write latency. Risk of data loss if cache fails before flush. Good for high-throughput counters, analytics.

Cache-Aside (Lazy Loading):

Client → Cache (miss) → Client fetches from DB → Client writes to Cache

Most common. Application owns cache logic. Risk: thundering herd on cold start.

Limitations

  • This is a reference document and may not cover all edge cases. Always verify architectures before production.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/monopoly/patterns of sickn33/agentic-awesome-skills.

Open the folder on GitHubat commit 1e53ce2

Used in 1 other repository

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Patterns this skillsickn33/agentic-awesome-skills47k1 repos~2.6kAutomated safety check: PassMIT
NestJS Modular Monolith Architecttech-leads-club/agent-skills7k—~3.9kAutomated safety check: PassCC-BY-4.0
AWS Serverless Edazxkane/aws-skills3674 repos~3.2kAutomated safety check: PassMIT
Evolutionary Modular Architecturetech-leads-club/agent-skills7k—~3.7kAutomated safety check: PassCC-BY-4.0
Designing ArchitectureCloudAI-X/claude-workflow-v21.4k1 repos~1.4kAutomated safety check: PassMIT
Microservice Patternsrevfactory/claude-code-harness120—~502Automated safety check: PassNone

Similar skills

  • NestJS Modular Monolith Architect

    tech-leads-club/agent-skills

    Designs scalable NestJS modular monoliths with domain-driven design, Clean Architecture layers and optional CQRS, defining bounded contexts and strict module boundaries.

    7k GitHub stars~3.9k tokensUpdated 17 days ago
    Backend & APIsAuto-check passed
  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Evolutionary Modular Architecture

    tech-leads-club/agent-skills

    Guides design of modular-monolith platforms with DDD, flat-by-aggregate modules, anti-corruption layers, outbox events and resilience, plus an architecture document with SVG diagrams.

    7k GitHub stars~3.7k tokensUpdated 17 days ago
    DevelopmentAuto-check passed
  • Designing Architecture

    CloudAI-X/claude-workflow-v2

    Designs software architecture and selects appropriate patterns for projects.

    1.4k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Microservice Patterns

    revfactory/claude-code-harness

    Event-driven microservice architecture patterns guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~502 tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Microservices Architect

    Jeffallan/claude-skills

    Designs distributed systems: bounded-context service boundaries, sync and async communication, data ownership, resilience, tracing and rollout strategy.

    12k GitHub stars~1.8k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed

More from sickn33/agentic-awesome-skills

All 1,394 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Whatsapp Cloud API

    sickn33/agentic-awesome-skills

    Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~4.5k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Questions about Patterns

What does Patterns do?

Reference document for monopoly patterns. An agent skill from sickn33/agentic-awesome-skills. Patterns is an agent skill from sickn33/agentic-awesome-skills. Reference document for monopoly patterns.

When should I use Patterns?

Patterns fits situations like: tasks that involve Event-driven systems; tasks that involve Microservices.

How do I install Patterns in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill patterns -a claude-code`. Or copy the skill folder (skills/monopoly/patterns in sickn33/agentic-awesome-skills) into .claude/skills/patterns in your project. Claude Code loads it when a task matches its description.

How do I install Patterns in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill patterns -a codex`. Or copy the skill folder (skills/monopoly/patterns in sickn33/agentic-awesome-skills) into .agents/skills/patterns in your project. Codex loads it when a task matches its description.

Can I use Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/patterns, .gemini/skills/patterns, .github/skills/patterns and .opencode/skills/patterns in your project.

What does Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Patterns is instructions for the agent only.

Does Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Patterns use?

Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Patterns use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Patterns?

Skills that share tags, products or a category with Patterns: NestJS Modular Monolith Architect (tech-leads-club/agent-skills, 7k stars), AWS Serverless Eda (zxkane/aws-skills, 367 stars), Evolutionary Modular Architecture (tech-leads-club/agent-skills, 7k stars) and Designing Architecture (CloudAI-X/claude-workflow-v2, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Patterns?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,304 GitHub stars. The repository holds 1,394 skills in this directory. The repository was last updated on October 6, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.