api-design
This skill should be used when the user needs to "design the API", do "endpoint design", pin down a "request/response shape", choose a "pagination" strategy…
This skill should be used when the user designs "distributed logging", "log aggregation", "centralized logs", an "ELK" or "EFK" stack, "log shipping", "structured logging", a "correlation ID" or "trace ID" in logs, "log retention", or "high-volume log ingest". It gives the
$ npx -y skills add proyecto26/system-design-skills --skill distributed-logging --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/distributed-loggingContext preview
The summary Claude sees to decide when to auto-load this skill.
This skill should be used when the user designs "distributed logging", "log aggregation", "centralized logs", an "ELK" or "EFK" stack, "log shipping", "structured logging", a "correlation ID" or "trace ID" in logs, "log retention", or "high-volume log ingest". It gives the
name: distributed-logging description: This skill should be used when the user designs "distributed logging", "log aggregation", "centralized logs", an "ELK" or "EFK" stack, "log shipping", "structured logging", a "correlation ID" or "trace ID" in logs, "log retention", or "high-volume log ingest". It gives the collect → buffer → ship → index → store → retain pipeline, sampling, ordering, and cold-storage tiering. Use it whenever many services emit logs that must be searched in one place under load, even if the user doesn't say "logging pipeline".
Move logs from thousands of processes into one searchable place, fast enough to debug a live incident and cheap enough to keep for months. Getting it wrong is a classic "ignore failure" miss: the logging pipeline is itself a distributed system that buckles under the exact traffic spike you most need it during, and a naive design either drops the evidence or takes down the app it instruments.
More than one process emits logs and someone needs to search them together; an incident requires correlating a request across services; log volume has outgrown `grep` on a box; or compliance demands retention. The pipeline buys central search, cross-service correlation, and a durable record decoupled from any single host.
A single service on one host where `journald` + log rotation is enough — a full pipeline is pure operational overhead (YAGNI). Numeric time-series questions ("what is p99 latency", "is error rate up") belong to metrics, not log scans — that is `observability`'s job; logs answer "what exactly happened to *this* request". Don't ship every debug line at full volume before a number shows the volume justifies the cost; sample first.
**Collection (agent on the host)**
reads stdout, adds metadata, ships out. Use when apps log to files/stdout and you want app code untouched — the default.
Use when you control the code and want exact structure, accepting tighter coupling.
**Transport / buffer (the shock absorber)**
retries. Use at low-to-moderate volume with one consumer.
partitioned bus; indexers consume at their own pace. Use at high volume or when multiple sinks (search, archive, analytics) read the same stream.
**Index / store (the search backend)**
expensive RAM/disk. Use when interactive field search matters.
much cheaper, grep-style queries. Use for high volume where you mostly filter by service/label then scan.
**Retention / tiering**
hot, roll older data to compressed objects. Use whenever retention exceeds the hot window economically (almost always).
| Option | What it solves | What it worsens | Change it when | |---|---|---|---| | Node agent (Fluent Bit/Vector) | No app changes; central metadata + routing | One more daemon per host; parsing CPU; agent can lag | You need exact structure → emit structured events from the app | | Direct-to-bus SDK | Clean structured events, no file parse | Couples app to transport; app blocks/loses logs if bus is down | Coupling/availability hurts → go back to agent + local buffer | | Agent buffer → direct indexer | Fewest moving parts | Indexer backpressure hits producers; no replay; one sink | Volume spikes or you need >1 sink → add a log bus | | Durable log bus (Kafka) | Absorbs spikes, decouples, replay, fan-out | Extra system to run; ordering only per-partition; cost | Volume is low and single-sink → drop the bus | | Full-text index (ES/OpenSearch) | Fast rich field search | RAM/disk hungry; mapping explosions; costly at scale | Cost dominates and queries are label-filtered → Loki | | Label-indexed (Loki) | Cheap storage at high volume | Weak full-text; slow on high-cardinality scans | You truly need arbitrary field search → full-text index | | Hot index + cold archive | Cheap long retention | Cold reads are slow/manual to rehydrate | Forensic reads on old data must be fast → widen hot window |
The pipeline's failure mode is that incidents *generate* log spikes — an outage emits floods of errors and stack traces exactly when the pipeline is busiest, so it must degrade without amplifying the outage.
log calls can block the app. *Mitigate:* bounded local buffer with **drop-newest / sample on overflow**, never block the request path. A durable bus moves the backlog off the hosts (backpressure + DLQ semantics are owned by `messaging-streaming`).
the index. *Mitigate:* per-service rate caps at the agent (rate limiting is owned by `resilience-failure`), dynamic sampling, alerts on ingest bytes/sec.
Design scalable systems the way strong engineers actually do — by reasoning, not by memorizing diagrams.
Repo: proyecto26/system-design-skills
This skill should be used when the user needs to "design the API", do "endpoint design", pin down a "request/response shape", choose a "pagination" strategy…
This skill should be used when a system design needs a diagram — "draw the architecture", "diagram this system", "show the components", "make an…
This skill should be used when the user needs to "estimate QPS", "back-of-the-envelope" (BOTEC) numbers, "how much storage / bandwidth", "how many servers",…
This skill should be used when the user wants a "blob store" or "object storage", names "S3" or an S3-compatible store, needs to "store images / video /…
This skill should be used when the user asks about a "caching strategy", "cache invalidation", "what to cache", "read-through vs write-through vs write-back",…
This skill should be used when the user asks about the "CAP theorem", "PACELC", a "consistency model", "eventual vs strong consistency", "read-your-writes",…