Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计提醒

distributed-systems分布式系统

Agent Skill

distributed-systems 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,975

周安装

169

GitHub Stars

160

下载量

1,393
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:distributed-systems(分布式系统)
来源仓库:https://github.com/yonatangross/orchestkit
仓库路径:skills/distributed-systems
安装命令:
npx skills add https://github.com/yonatangross/orchestkit --skill distributed-systems
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill distributed-systems

简介

构建可靠分布式系统的综合模式库支持。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 覆盖分布式锁、容错、幂等与边缘计算等类别。
  • 每个规则独立加载,避免信息过载与无关干扰。
  • 提供电路 breaker、重试与速率限制等具体实现。
  • distributed-systems 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Distributed Systems Patterns

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

Quick Reference

CategoryRulesImpactWhen to Use
Distributed Locks3CRITICALRedis/Redlock locks, PostgreSQL advisory locks, fencing tokens
Resilience3CRITICALCircuit breakers, retry with backoff, bulkhead isolation
Idempotency3HIGHIdempotency keys, request dedup, database-backed idempotency
Rate Limiting3HIGHToken bucket, sliding window, distributed rate limits
Edge Computing2HIGHEdge workers, V8 isolates, CDN caching, geo-routing
Event-Driven2HIGHEvent sourcing, CQRS, transactional outbox, sagas

Total: 16 rules across 6 categories

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.

RuleFileKey Pattern
Redis & Redlock${CLAUDE_SKILL_DIR}/rules/locks-redis-redlock.mdLua scripts, SET NX, multi-node quorum
PostgreSQL Advisory${CLAUDE_SKILL_DIR}/rules/locks-postgres-advisory.mdSession/transaction locks, lock ID strategies
Fencing Tokens${CLAUDE_SKILL_DIR}/rules/locks-fencing-tokens.mdOwner validation, TTL, heartbeat extension

Resilience

Production-grade fault tolerance for distributed systems.

RuleFileKey Pattern
Circuit Breaker${CLAUDE_SKILL_DIR}/rules/resilience-circuit-breaker.mdCLOSED/OPEN/HALF_OPEN states, sliding window
Retry & Backoff${CLAUDE_SKILL_DIR}/rules/resilience-retry-backoff.mdExponential backoff, jitter, error classification
Bulkhead Isolation${CLAUDE_SKILL_DIR}/rules/resilience-bulkhead.mdSemaphore tiers, rejection policies, queue depth

Idempotency

Ensure operations can be safely retried without unintended side effects.

RuleFileKey Pattern
Idempotency Keys${CLAUDE_SKILL_DIR}/rules/idempotency-keys.mdDeterministic hashing, Stripe-style headers
Request Dedup${CLAUDE_SKILL_DIR}/rules/idempotency-dedup.mdEvent consumer dedup, Redis + DB dual layer
Database-Backed${CLAUDE_SKILL_DIR}/rules/idempotency-database.mdUnique constraints, upsert, TTL cleanup

Rate Limiting

Protect APIs with distributed rate limiting using Redis.

RuleFileKey Pattern
Token Bucket${CLAUDE_SKILL_DIR}/rules/ratelimit-token-bucket.mdRedis Lua scripts, burst capacity, refill rate
Sliding Window${CLAUDE_SKILL_DIR}/rules/ratelimit-sliding-window.mdSorted sets, precise counting, no boundary spikes
Distributed Limits${CLAUDE_SKILL_DIR}/rules/ratelimit-distributed.mdSlowAPI + Redis, tiered limits, response headers

Edge Computing

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

RuleFileKey Pattern
Edge Workers${CLAUDE_SKILL_DIR}/rules/edge-workers.mdV8 isolate constraints, Web APIs, geo-routing, auth at edge
Edge Caching${CLAUDE_SKILL_DIR}/rules/edge-caching.mdCache-aside at edge, CDN headers, KV storage, stale-while-revalidate

Event-Driven

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

RuleFileKey Pattern
Event Sourcing${CLAUDE_SKILL_DIR}/rules/event-sourcing.mdEvent-sourced aggregates, CQRS read models, optimistic concurrency
Event Messaging${CLAUDE_SKILL_DIR}/rules/event-messaging.mdTransactional outbox, saga compensation, idempotent consumers

Key Decisions

DecisionRecommendation
Lock backendRedis for speed, PostgreSQL if already using it, Redlock for HA
Lock TTL2-3x expected operation time
Circuit breaker recoveryHalf-open probe with sliding window
Retry algorithmExponential backoff + full jitter
Bulkhead isolationSemaphore-based tiers (Critical/Standard/Optional)
Idempotency storageRedis (speed) + DB (durability), 24-72h TTL
Rate limit algorithmToken bucket for most APIs, sliding window for strict quotas
Rate limit storageRedis (distributed, atomic Lua scripts)

When NOT to Use

No separate event-sourcing/saga/CQRS skills exist — they are rules within distributed-systems. But most projects never need them.

PatternInterviewHackathonMVPGrowthEnterpriseSimpler Alternative
Event sourcingOVERKILLOVERKILLOVERKILLOVERKILLWHEN JUSTIFIEDAppend-only table with status column
Saga orchestrationOVERKILLOVERKILLOVERKILLSELECTIVEAPPROPRIATESequential service calls with manual rollback
Circuit breakerOVERKILLOVERKILLBORDERLINEAPPROPRIATEREQUIREDTry/except with timeout
Distributed locksOVERKILLOVERKILLBORDERLINEAPPROPRIATEREQUIREDDatabase row-level lock (SELECT FOR UPDATE)
CQRSOVERKILLOVERKILLOVERKILLOVERKILLWHEN JUSTIFIEDSingle model for read/write
Transactional outboxOVERKILLOVERKILLOVERKILLSELECTIVEAPPROPRIATEDirect publish after commit
Rate limitingOVERKILLOVERKILLSIMPLE ONLYAPPROPRIATEREQUIREDNginx rate limit or cloud WAF

Rule of thumb: If you have a single server process, you do not need distributed systems patterns. Use in-process alternatives. Add distribution only when you actually have multiple instances.

Anti-Patterns (FORBIDDEN)

# LOCKS: Never forget TTL (causes deadlocks)
await redis.set(f"lock:{name}", "1")  # WRONG - no expiry!

# LOCKS: Never release without owner check
await redis.delete(f"lock:{name}")  # WRONG - might release others' lock

# RESILIENCE: Never retry non-retryable errors
@retry(max_attempts=5, retryable_exceptions={Exception})  # Retries 401!

# RESILIENCE: Never put retry outside circuit breaker
@retry  # Would retry when circuit is open!
@circuit_breaker
async def call(): ...

# IDEMPOTENCY: Never use non-deterministic keys
key = str(uuid.uuid4())  # Different every time!

# IDEMPOTENCY: Never cache error responses
if response.status_code >= 400:
    await cache_response(key, response)  # Errors should retry!

# RATE LIMITING: Never use in-memory counters in distributed systems
request_counts = {}  # Lost on restart, not shared across instances

Detailed Documentation

ResourceDescription
${CLAUDE_SKILL_DIR}/scripts/Templates: lock implementations, circuit breaker, rate limiter
${CLAUDE_SKILL_DIR}/checklists/Pre-flight checklists for each pattern category
${CLAUDE_SKILL_DIR}/references/Deep dives: Redlock algorithm, bulkhead tiers, token bucket
${CLAUDE_SKILL_DIR}/examples/Complete integration examples

Related Skills

  • caching - Redis caching patterns, cache as fallback
  • background-jobs - Job deduplication, async processing with retry
  • observability-monitoring - Metrics and alerting for circuit breaker state changes
  • error-handling-rfc9457 - Structured error responses for resilience failures
  • auth-patterns - API key management, authentication integration

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

40.15%
按下载量换算559

Claude

29.43%
按下载量换算410

Cursor

18.13%
按下载量换算253

Gemini CLI

9.66%
按下载量换算135

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills