Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Distributed Systems?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-distributed-systems)
---
name: distributed-systems
description: Distributed systems fundamentals — consistency models, CAP/PACELC trade-offs, consensus and leader election, partitioning and replication, clocks and ordering, idempotency, exactly-once illusions, distributed transactions and sagas, failure detection. Use when designing or debugging multi-node behaviour (distributed systems, consistency, saga, partitioning, replication, idempotency).
metadata:
category: architecture
---
# Distributed systems
## Purpose
Design multi-node behaviour that stays correct under partial failure.
**Use when:** any design spanning processes, services or regions.
**Not for:** single-process logic.
## Inputs
- Design, consistency requirements, failure assumptions.
## Outputs
- Consistency and failure analysis with design changes.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "distributed systems"` for prior decisions, patterns and anti-patterns.
## Steps
1. **Model.** State the consistency each operation needs and the failure model.
Done when every operation has a consistency level.
2. **Coordinate.** Choose coordination: local transaction, saga with compensations, or consensus-backed store.
Done when cross-service writes have a pattern.
3. **Idempotency.** Make every retried operation idempotent with keys.
Done when retries cannot double-apply.
4. **Failures.** Walk through partitions, timeouts, duplicates, reordering.
Done when each failure has defined behaviour.
## Best practices
- Assume the network is unreliable and clocks are skewed.
- Prefer sagas over distributed transactions.
- Make timeouts explicit everywhere.
## Common mistakes
- Believing in exactly-once delivery.
- Using wall clocks for ordering.
- Dual writes without an outbox.
## Example
Order + payment + inventory: saga with compensations, idempotency keys per step, outbox for events, timeout policy per call.
## Reusable prompt
```text
Apply the Distributed systems skill (.agents/skills/distributed-systems/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Analyse the design for consistency needs and failure modes and propose coordination, idempotency and timeout changes.
Return: Consistency and failure analysis with design changes..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```