Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

distributed-systems

БесплатноЗапускает вложенные скриптыНе проверен

Distributed systems patterns for locking, resilience, idempotency, and rate limiting. Use when implementing distributed locks, circuit breakers, retry…

yonatangrossот yonatangross★ 312 звёзд на GitHub

Об этом скилле

Distributed Systems Patterns

Comprehensive patterns for building reliable distributed systems. Each category has individual rule files in rules/ loaded on-demand.

Quick Reference

Category Rules Impact When to Use
Distributed Locks 1 CRITICAL Fencing tokens, owner validation; Redis/Redlock and Postgres advisory via upstream docs
Resilience 3 CRITICAL Circuit breakers, retry with backoff, bulkhead isolation
Idempotency 1 HIGH Idempotency keys; dedup and database-backed storage via upstream docs
Rate Limiting 2 HIGH Token bucket, sliding window; SlowAPI integration via upstream docs
Edge Computing 2 HIGH Edge workers, V8 isolates, CDN caching, geo-routing
Event-Driven 2 HIGH Event sourcing, CQRS, transactional outbox, sagas

Total: 11 rules across 6 categories. Removed topics point at first-party sources in Upstream coverage; ork-specific scars live in references/ork-delta.md.

Quick Start

# Redis distributed lock with Lua scripts
async with RedisLock(redis_client, "payment:order-123"):
    await process_payment(order_id)

# Circuit breaker for external APIs
@circuit_breaker(failure_threshold=5, recovery_timeout=30)
@retry(max_attempts=3, base_delay=1.0)
async def call_external_api():
    ...

# Idempotent API endpoint
@router.post("/payments")
async def create_payment(
    data: PaymentCreate,
    idempotency_key: str = Header(..., alias="Idempotency-Key"),
):
    return await idempotent_execute(db, idempotency_key, "/payments", process)

# Token bucket rate limiting
limiter = TokenBucketLimiter(redis_client, capacity=100, refill_rate=10)
if await limiter.is_allowed(f"user:{user_id}"):
    await handle_request()

Distributed Locks

Coordinate exclusive access to resources across multiple service instances.

Rule File Key Pattern
Fencing Tokens rules/locks-fencing-tokens.md Owner validation, TTL, heartbeat extension

Redis single-node locks, Redlock quorum, and PostgreSQL advisory locks are first-party documented; see Upstream coverage.

Resilience

Production-grade fault tolerance for distributed systems.

Rule File Key Pattern
Circuit Breaker rules/resilience-circuit-breaker.md CLOSED/OPEN/HALF_OPEN states, sliding window
Retry & Backoff rules/resilience-retry-backoff.md Exponential backoff, jitter, error classification
Bulkhead Isolation rules/resilience-bulkhead.md Semaphore tiers, rejection policies, queue depth

Idempotency

Ensure operations can be safely retried without unintended side effects.

Rule File Key Pattern
Idempotency Keys rules/idempotency-keys.md Deterministic hashing, Stripe-style headers

Event-consumer dedup and database-backed idempotency storage follow the Stripe pattern; see Upstream coverage.

Rate Limiting

Protect APIs with distributed rate limiting using Redis.

Rule File Key Pattern
Token Bucket rules/ratelimit-token-bucket.md Redis Lua scripts, burst capacity, refill rate
Sliding Window rules/ratelimit-sliding-window.md Sorted sets, precise counting, no boundary spikes

SlowAPI + Redis wiring and tiered limits are first-party documented; see Upstream coverage.

Edge Computing

Edge runtime patterns for Cloudflare Workers, Vercel Edge, and Deno Deploy.

Rule File Key Pattern
Edge Workers rules/edge-workers.md V8 isolate constraints, Web APIs, geo-routing, auth at edge
Edge Caching rules/edge-caching.md Cache-aside at edge, CDN headers, KV storage, stale-while-revalidate

Event-Driven

Event sourcing, CQRS, saga orchestration, and reliable messaging patterns.

Rule File Key Pattern
Event Sourcing rules/event-sourcing.md Event-sourced aggregates, CQRS read models, optimistic concurrency
Event Messaging rules/event-messaging.md Transactional outbox, saga compensation, idempotent consumers

Upstream coverage (do not restate)

These topics were removed from this skill on 2026-07-31 (wrap-plus-delta thinning) because a first-party source maintains them. Consult the source; do not re-add tutorials here. Ork-specific scars for these topics live in references/ork-delta.md.

Topic First-party source
Redis single-node locks, Redlock algorithm and quorum https://redis.io/docs/latest/develop/use/patterns/distributed-locks/
PostgreSQL advisory locks (session and transaction level) https://www.post
Полный SKILL.md на GitHub

Установить distributed-systems в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Glob
Grep
WebFetch
WebSearch

Вложенные файлы

metadata.jsonreferences/ork-delta.mdrules/_sections.mdrules/_template.mdrules/edge-caching.mdrules/edge-workers.mdrules/event-messaging.mdrules/event-sourcing.mdrules/idempotency-keys.mdrules/locks-fencing-tokens.mdrules/ratelimit-sliding-window.mdrules/ratelimit-token-bucket.mdrules/resilience-bulkhead.mdrules/resilience-circuit-breaker.mdrules/resilience-retry-backoff.mdscripts/bulkhead.pyscripts/circuit-breaker.pyscripts/distributed-lock-template.pyscripts/idempotency-middleware-template.pyscripts/llm-fallback-chain.pyscripts/redis-rate-limiter.pyscripts/retry-handler.pyscripts/token-budget.pytest-cases.json

FAQ

Что делает скилл distributed-systems?

Distributed systems patterns for locking, resilience, idempotency, and rate limiting. Use when implementing distributed locks, circuit breakers, retry policies, idempotency keys, token bucket rate limiters, or fault tolerance patterns.

Как установить скилл distributed-systems?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл distributed-systems запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить distributed-systems с