Service Resilience logo

Service Resilience

Community
d-padmanabhan
service-resilience

Designs and reviews production resilience for service dependencies using deadlines, timeouts, bounded retries, circuit breakers, bulkheads, backpressure, load shedding, rate limits, fallbacks, idempotency, and recovery testing. Use when the user mentions circuit breaker, bulkhead, retries, cascading failure, partial failure, overload, graceful degradation, or resilient distributed services.

Overview

Publisherd-padmanabhan
Repositoryagent-engineering-handbook
Skill nameservice-resilience
Stars
20
Forks
3
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by d-padmanabhan on GitHub. Read the source before you install it.

Installation

Install the Service Resilience AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/service-resilience
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook.git /tmp/agent-engineering-handbook
mkdir -p .claude/skills
cp -r /tmp/agent-engineering-handbook/skills/service-resilience .claude/skills/service-resilience
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Service Resilience in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Service Resilience on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Service Resilience is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Service Resilience

Design resilience as a bounded failure policy, not a collection of decorators. Every mechanism must protect a stated critical journey without creating retry storms, stale success, hidden data loss, or fragmented capacity.

Resilience Contract

  • Begin with critical journeys, SLOs, dependency budgets, and acceptable degraded outcomes.
  • Put one end-to-end deadline around the operation. Allocate smaller attempt timeouts within it.
  • Retry only classified transient failures for idempotent operations or operations protected by stable idempotency keys.
  • Bound attempts, elapsed time, concurrency, queues, memory, and retry amplification.
  • Isolate unrelated workloads with bulkheads sized from capacity and priority.
  • Shed excess work before saturation destroys useful throughput.
  • Use circuit breakers only when rejecting likely failures is cheaper and safer than attempting them.
  • Treat fallbacks as alternate correctness contracts. Never return stale or fabricated success silently.
  • Make ambiguous mutation outcomes reconcilable.
  • Test failure, overload, recovery, and control-plane behavior with measurable acceptance criteria.

Design Workflow

1. Define the critical journey

State:

  • caller and business outcome;
  • availability and latency SLO;
  • synchronous dependencies;
  • consistency and freshness requirements;
  • acceptable partial or degraded result;
  • operations that must fail closed;
  • recovery owner and escalation path.

Do not apply one resilience policy to every endpoint or workload.

2. Allocate time and failure budgets

For each synchronous dependency, define:

  • end-to-end deadline contribution;
  • connect, request, and response timeout;
  • retry owner and maximum attempts;
  • transient failure classification;
  • idempotency or reconciliation contract;
  • concurrency and queue budget;
  • fallback or explicit failure behavior.

Account for DNS, connection pools, proxies, SDK retries, service meshes, and gateways. Hidden retries consume the same caller deadline and multiply load.

3. Control load

Apply controls in this order:

  1. admission priority and per-principal quotas;
  2. bounded queues with maximum age;
  3. bounded concurrency and connection pools;
  4. backpressure or producer throttling;
  5. load shedding with explicit retry guidance;
  6. capacity scaling where it is fast enough to matter.

Do not rely on autoscaling after queues, memory, or downstream capacity are already exhausted.

4. Isolate failure

Choose bulkheads around workloads that should not consume one another's capacity:

  • dependency-specific connection pools;
  • workload-specific worker pools or semaphores;
  • priority queues;
  • tenant or customer partitions;
  • cells or deployment stamps;
  • separate resource quotas.

Document reserved capacity, utilization trade-offs, fairness, and what happens when one partition is full.

Use the circuit breaker and bulkhead reference (${HANDBOOK_ROOT}/skills/service-resilience/references/circuit-breakers-and-bulkheads.md) for detailed state and sizing rules.

5. Limit repeated failure

Use a circuit breaker only when:

  • failures are expensive enough to threaten caller or dependency capacity;
  • recent outcomes predict near-term failure;
  • calls can be rejected safely;
  • recovery can be probed with bounded traffic;
  • state scope and observability are defined.

A breaker does not replace timeouts, retries, admission control, or health checks. Avoid a global breaker when one tenant, endpoint, shard, region, or operation can fail independently.

6. Define degraded behavior

For every fallback, specify:

  • trigger;
  • data source and maximum staleness;
  • authorization and privacy equivalence;
  • user-visible indication;
  • unsupported operations;
  • cache invalidation or recovery;
  • metric proving whether the fallback helps.

Prefer explicit unavailability over plausible but incorrect data.

7. Verify recovery

Test:

  • timeout and cancellation propagation;
  • retry amplification at each layer;
  • breaker opening, probing, and closing;
  • bulkhead exhaustion and unaffected workloads;
  • queue age and shedding;
  • dependency brownouts and slow responses;
  • recovery without synchronized request floods;
  • regional, quota, identity, DNS, and configuration failures;
  • reconciliation after ambiguous writes.

Use the failure policy reference (${HANDBOOK_ROOT}/skills/service-resilience/references/failure-policy-and-testing.md) for review and experiment design.

Pattern Selection

ProblemPrimary controlImportant companion
Slow dependencyDeadline and attempt timeoutCancellation and bounded concurrency
Brief transient failureBounded jittered retryIdempotency and retry budget
Sustained likely failureCircuit breakerTimeout, observability, recovery probe
One workload starves anotherBulkheadPriority, quotas, capacity plan
Offered load exceeds capacityAdmission control and sheddingBackpressure and retry guidance
Optional dependency unavailableExplicit fallbackFreshness and correctness contract
Mutation timed outReconciliationStable operation ID or idempotency key
Long asynchronous backlogQueue-age limitsConsumer scaling, DLQ, replay policy

Anti-Patterns

  • Retrying every exception at every layer.
  • Retrying non-idempotent mutations with a new request ID.
  • Circuit breaker keyed globally across unrelated tenants or operations.
  • Opening a breaker on caller validation or authorization failures.
  • Half-open mode releasing an unbounded probe flood.
  • Bulkheads with arbitrary sizes and no capacity or fairness model.
  • Unbounded queues presented as reliability.
  • Fallbacks that bypass authorization or return stale data as current.
  • Health checks that call every dependency and cause synchronized failure.
  • Catching errors and returning success to improve availability metrics.
  • Chaos tests without hypotheses, blast-radius controls, or abort conditions.

Required Output

Produce:

  1. Critical journey, SLO, and dependency map
  2. End-to-end deadline and retry budget
  3. Failure classification and idempotency contract
  4. Admission, concurrency, queue, and bulkhead policy
  5. Circuit breaker scope and state policy where justified
  6. Degraded behavior and correctness limits
  7. Metrics, alerts, and recovery ownership
  8. Failure experiments, acceptance criteria, and rollback triggers

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Service Resilience AI skill do?

Designs and reviews production resilience for service dependencies using deadlines, timeouts, bounded retries, circuit breakers, bulkheads, backpressure, load shedding, rate limits, fallbacks, idempotency, and recovery testing. Use when the user mentions circuit breaker, bulkhead, retries, cascading failure, partial failure, overload, graceful degradation, or resilient distributed services.

Why use Service Resilience on TypingMind?

Because you install it once and use it with any model. Service Resilience is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Service Resilience in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/service-resilience. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Service Resilience?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Service Resilience?

As many as you like. As long as a model supports skills, you can use Service Resilience with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Service Resilience AI skill free?

Yes. It is published on GitHub by d-padmanabhan under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇