shadow-resilience
Skill1 starsChanged yesterdayMITView on GitHub
Disaster Recovery & Business Continuity. Use when running automated DB backup restore drills (RPO/RTO verification), chaos/fault injection, circuit breakers, or graceful degradation planning.
In this repository51 other files it gives its agents.
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- context7Skill
- handoffSkill
- shadow-accessibilitySkill
- shadow-apiSkill
- shadow-architectSkill
- shadow-authSkill
- shadow-bootstrapSkill
- shadow-browserSkill
- shadow-cacheSkill
- shadow-compatSkill
- shadow-concurrencySkill
- shadow-dataSkill
- shadow-dbSkill
- shadow-debugSkill
- shadow-designSkill
- shadow-discoverySkill
- shadow-docSkill
- shadow-domainSkill
- shadow-eaSkill
- shadow-evalSkill
- shadow-finopsSkill
- shadow-gitSkill
- shadow-grcSkill
- shadow-handoverSkill
- shadow-integrateSkill
- shadow-maintainSkill
- shadow-mobileSkill
- shadow-modernizeSkill
- shadow-monarchSkill
- shadow-observeSkill
- shadow-opsSkill
- shadow-perfSkill
- shadow-planSkill
- shadow-pmoSkill
- shadow-presalesSkill
- shadow-privacySkill
- shadow-qualitySkill
- shadow-realtimeSkill
- shadow-refactorSkill
- shadow-releaseSkill
- shadow-searchSkill
- shadow-secSkill
- shadow-supplychainSkill
- shadow-testSkill
- shadow-uatSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Run pg_restore or gunzip < backup.sql.gz | mysql and record elapsed wall-clock seconds.
- Very specific: line 25
Always execute docker rm -f -v <container> (and docker image rm -f <temp-image> if a custom image was built) in the finally block so zero …
- Distinctive: line 43
Run failure-injection tests strictly against isolated staging/test fixtures (never live production without explicit authorization): inject …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shadow Resilience (/shadow-resilience) — Disaster Recovery Drills, RPO/RTO & Graceful Degradation
A backup that has never been restored is not a backup. Use /shadow-resilience to verify that the application survives dependency outages and can be recovered within contractual RPO (Recovery Point Objective) and RTO (Recovery Time Objective).
1. Automated Backup Restore Drill Protocol (Proving RPO & RTO)
[!CAUTION] Strict Isolation Rule: Always execute restore drills against an isolated temporary container or staging database (
db_restore_drill_temp), NEVER overwriting the live production database!
The 5-Step Restore Drill Verification
- Fetch Latest Production Backup Artifact: Pull the latest
.dump/.sql.gzfrom backup storage and verify its.sha256checksum. - Spin Up Ephemeral Restore Container: Launch an isolated Postgres/MySQL/MariaDB container (
--rm --label shadow.ephemeral=trueon a temporary local port) inside atry / finally(trap EXIT) block. - Execute Restore & Measure Duration (
Actual RTO):- Run
pg_restoreorgunzip < backup.sql.gz | mysqland record elapsed wall-clock seconds.
- Run
- Verify Data Integrity & Recency (
Actual RPO):- Query row counts on core transaction tables (
users,orders,audit_logs) and checkMAX(created_at)to verify the data lag is within the target RPO.
- Query row counts on core transaction tables (
- Tear Down & Log Drill Evidence:
- Always execute
docker rm -f -v <container>(anddocker image rm -f <temp-image>if a custom image was built) in thefinallyblock so zero stopped containers or orphan volumes remain, then write an auditable drill report (docs/ops/restore-drill-YYYY-MM.md— compatible with/shadow-docmonthly maintenance reports!).
- Always execute
2. Graceful Degradation & Fault-Isolation Patterns
Design the application so a non-critical subsystem failure never takes down the entire system:
| Failure Scenario | Bad Behavior (Fragile) | Resilient Behavior (/shadow-resilience) |
| Redis Cache Down | Every API call throws 500 Internal Server Error | Log warning, bypass cache (or serve stale in-memory fallback with rate limit), keep core auth/transactions working. |
| SMTP / WhatsApp Gateway Down | User registration or order approval hangs for 60s then fails 500 | Commit DB transaction + write to outbox_events; background worker retries delivery when gateway recovers. |
| Analytics / Export Worker OOM | Crashes main API process sharing the same container | Isolate heavy report/export workers into a separate process/container with bounded memory limits. |
| Database Connection Spike | App opens 1,000 raw connections and crashes Postgres | Enforce bounded connection pool (max: 20) + PgBouncer + fast queue timeout (5s) returning 503 Retry-After. |
3. Scoped Fault Injection, Bulkheads & Queue Recovery
- Run failure-injection tests strictly against isolated staging/test fixtures (never live production without explicit authorization): inject dependency HTTP 503s, broker disconnects, and slow-consumer stalls.
- Isolate critical APIs from heavy export/AI workers using separate pools/queues (bulkheads) and verify dead-letter queue replay procedures (
/shadow-concurrency) restore backlog safely without exceeding DB pool budgets.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

