Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/luanpdd/kit-mcpnpx agentmods add skills/luanpdd/kit-mcp/cascading-failuresWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/luanpdd/kit-mcp/cascading-failures)<a href="https://agentmods.dev/skills/luanpdd/kit-mcp/cascading-failures"><img src="https://agentmods.dev/badge/skills/luanpdd/kit-mcp/cascading-failures.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.03346 |
| Opus 5 | $0.00024 | $0.01673 |
| Sonnet 5 | $0.00010 | $0.00669 |
| Haiku 4.5 | $0.00005 | $0.00335 |
Grade A, and why
cascading-failures scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SRE — Addressing Cascading Failures
Quando usar
LLM carrega esta skill ao analisar serviço com risco de cascade, ou durante incident em progresso onde failure se amplifica. Trigger phrases:
- "cascading failure", "falha em cascata"
- "retry storm", "thundering herd"
- "outage propagando", "serviço caindo um após outro"
- "como prevenir cascade?", "circuit breaker"
- "cap 22 Google SRE"
- "deadline propagation", "load shedding"
Regras absolutas
- Cascade tem 5 triggers canônicos: server overload, resource exhaustion, service unavailability, latency spike sem timeout, retry sem jitter. Memorize-os.
- Prevenção custa 1×, recuperação custa 100×. Toda dep crítica DEVE ter timeout + retry com jitter + circuit breaker + deadline propagation. Sem isso, cascade é questão de tempo.
- Saturation (cap 6 v1.10) é early warning de cascade. Quando saturation > 80%, ainda há tempo. Quando hit 100%, já está em cascade.
- Retry SEMPRE com jitter. Full jitter por default (
delay = random(0, base × 2^attempt)). Sem jitter = thundering herd garantido. - Retry SEMPRE com deadline. Retry sem timeout amplifica cascade — call de 30s vira 90s vira 270s. Deadline propagation evita work zumbi.
- Circuit breaker DEFAULT em qualquer dep externa. Estados closed/open/half-open. Open dispara após N failures consecutivas; half-open permite 1 probe; closed após probe verde.
- Load shedding > 503 graceful > queue overflow. Server saturated DEVE retornar 503 com Retry-After ANTES de aceitar request que vai falhar. Aceitar e cair = pior que rejeitar.
- Slow start em recovery. Após outage, ramp-up gradual (10% → 25% → 50% → 100%). Full blast em recovery = falha de novo (caches frios, conn pools).
Patterns canônicos
Pattern 1: 5 triggers canônicos de cascade (cap 22)
1. SERVER OVERLOAD
Sintoma: load > capacity → latency p99 sobe 10× → errors 5xx → crashes
Trigger upstream: traffic spike, outage de cache, batch job rodou em horário ruim
Detect: Saturation gauge (cap 6) > 80% por > 5 min
Resposta: load shedding + escalação manual
2. RESOURCE EXHAUSTION
Tipos: CPU, memory, file descriptors, threads, connection pool
Sintoma específico:
CPU 100% → latency sobe; FDs esgotados → "too many open files"
Memory OOM → process kill; threads → deadlock; conn pool empty → wait
Detect: monitor por recurso específico; alarmes em 80% de cada
Resposta: configure limits; circuit breaker; rate limit caller
3. SERVICE UNAVAILABILITY (DEP DOWN)
Sintoma: dep externa retorna 5xx ou timeout. Sem circuit breaker:
N clients × M retries × T deadline = explosão de calls
Detect: error rate de dep > 50% por 1 min; latency dep > p99 normal × 5
Resposta: circuit breaker abre; fallback (cache, default value, degraded mode)
4. LATENCY SPIKE SEM TIMEOUT
Sintoma: dep responde lento mas não falha. Caller fica esperando.
Conn pool de caller esgota; novos requests também ficam pendurados.
Detect: dep latency p99 > baseline × 5
Resposta: timeout AGRESSIVO (ex: p99.9 baseline + 50%); circuit breaker
5. RETRY SEM JITTER
Sintoma: 1000 clients retentam ao mesmo tempo após dep recovery.
Server recém-recuperado é matado pelo wake-up.
Detect: traffic spike no momento exato de recovery
Resposta: full jitter; retry budget global; slow start
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 313 lines · 49 tokens per session scan A 86e539892fe6
cascading-failures is a skill published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 3,346 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
stripe-projects
Provision SaaS services + sync creds via Stripe Projects.
azure-eventhub-dotnet
Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming"…
azure-mgmt-botservice-dotnet
Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".
django-storages-s3
Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…
wikipedia
Search and read Wikipedia via x wkp — MediaWiki API, no API key, zero install; query, extract, suggest, and DDG route in one module. Load for wiki, wikipedia, encyclopedia lookup, article summary.
cve
Look up CVE records via x cve — cached, zero-API-key, daily xz TSV. Load for cve, vulnerability id, kev, epss, nvd, cvelist, or security advisory.