principle-resiliency

principle-resiliency is a skill for Claude Code from lugassawan/swe-workbench. It costs 126 tokens per session (2,042 once invoked), scanned A, original, MIT.

A guide to keeping software useful when parts of a system fail, slow down, or return errors. It covers ideas such as failure domains, bulkheads, health checks, safe retries, idempotency, and rate limits.

In plain words
What is it for?
Use it when designing retries, timeouts, health probes, connection pools, deduplication, overload protection, or behavior for HTTP 429 responses.
Why use it?
It helps prevent one failing dependency from exhausting shared resources and causing wider outages. It also clarifies how to handle partial failures instead of assuming everything fails at once.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the swe-workbench plugin — 60 skills, 25 commands, 22 agents, 4 hooks shipped together

Good fit Use it when designing retries, timeouts, health probes, connection pools, deduplication, overload protection, or behavior for HTTP 429 responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lugassawan/swe-workbench/principle-resiliency
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lugassawan/swe-workbench --skill principle-resiliency
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Made for: Claude Code.

Or install swe-workbench, the plugin that ships this one along with the rest of its 60 skills, 25 commands, 22 agents, 4 hooks.

Wrote 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.

agentmods badge for principle-resiliency

README.md
[![agentmods](https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-resiliency/github.svg)](https://agentmods.dev/skills/lugassawan/swe-workbench/principle-resiliency)
Your own site
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/principle-resiliency"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-resiliency/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for principle-resiliency

Your own site · 80×15
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/principle-resiliency"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-resiliency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,042 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00126 $0.02042
Opus 5 $0.00063 $0.01021
Sonnet 5 $0.00025 $0.00408
Haiku 4.5 $0.00013 $0.00204

Measured 6d ago against content hash 17423abb079f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

principle-resiliency 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 6d 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.

skills/principle-resiliency/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Resiliency

Distributed systems fail partially, not totally. Resilience is the discipline of staying useful when components, networks, or dependencies degrade.

Failure Domains

A failure domain is the set of components that fail together. Name failure domains before designing for them — unnamed domains produce unnamed blast radii.

  • Crash failure — process exits; detectable immediately by the load balancer or orchestrator.
  • Slow failure — process responds but takes too long; the most dangerous mode. Threads and connections fill; the caller eventually crashes too.
  • Gray/Byzantine failure — process returns wrong data or errors intermittently; hardest to detect.
  • Partial failure — some instances or shards fail while others serve normally.

Cascading failure: a degraded dependency holds resources long enough that the caller exhausts its own pools, propagating failure upstream. Root cause is almost always unbounded resource sharing across failure domains.

Bulkheads

Named after ship compartments: isolate resource pools so a breach in one dependency does not exhaust resources for all others.

  • Allocate a separate bounded connection pool, semaphore, or thread pool per downstream dependency.
  • Never share a single pool across unrelated dependencies — a slow third-party API must not starve database connections.
  • In multi-tenant systems, partition queues or workers per tenant to contain noisy-neighbor starvation.
  • Size each bulkhead to the dependency's realistic concurrency ceiling, not the caller's maximum.

Fail-Fast vs Fail-Soft

Fail-fast — surface the error immediately without attempting recovery. Use when: an invariant is violated, the operation cannot be retried safely, or the system state is unrecoverable. Examples: config missing at startup, corrupted schema, required auth service unreachable at boot.

Fail-soft — continue serving a degraded response using a fallback, stale cache, or reduced feature set. Use when: the failed component is non-critical and a safe, non-misleading fallback exists. Examples: recommendation service down → return empty list; search unavailable → hide the search bar.

Read the full file on GitHub · 123 lines

Changes

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.

  1. 6d ago First seen · 123 lines · 126 tokens per session scan A 17423abb079f

Subscribe to this mod's changes

principle-resiliency is a skill published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed 4d ago), licensed MIT. It adds 126 tokens to every session and 2,042 once invoked, about $0.0006 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.