api-platform-resilience

api-platform-resilience is a skill for Claude Code from gerard-labs/superpowers-api-platform. It costs 0 tokens per session (636 once invoked), scanned A, original, MIT.

A set of resilience patterns for an API Platform 4.3 application. They cover failures and delays when the application depends on outside services such as payment, search, ERP, CRM, or email systems.

In plain words
What is it for?
Use them to add circuit breakers, cached fallbacks, timeouts, retries, asynchronous writes, workflow states, idempotency, and dead-letter-queue handling.
Why use it?
They prevent unreliable services from causing indefinite waits or unnecessary server errors while making degraded responses visible.

Skill for Claude Code

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

Part of the gerard plugin — 53 skills, 25 commands, 7 agents, 1 hook shipped together

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.

agentmods
npx agentmods add skills/gerard-labs/superpowers-api-platform/api-platform-resilience
Any agent
npx skills add gerard-labs/superpowers-api-platform --skill api-platform-resilience
Clone the repo
git clone --depth 1 https://github.com/gerard-labs/superpowers-api-platform

Made for: Claude Code.

Or install gerard, the plugin that ships this one along with the rest of its 53 skills, 25 commands, 7 agents, 1 hook.

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 api-platform-resilience

README.md
[![agentmods](https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-resilience.svg)](https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-resilience)
Your own site
<a href="https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-resilience"><img src="https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-resilience.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 636 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00000 $0.00636
Opus 5 $0.00000 $0.00318
Sonnet 5 $0.00000 $0.00127
Haiku 4.5 $0.00000 $0.00064

Measured 5d ago against content hash db4eca64eeb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

api-platform-resilience 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 5d 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/api-platform-resilience/SKILL.md · 48 lines

How it starts

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

API Platform 4.3 — Resilience

Use when

  • The API depends on a third-party service (ERP, CRM, payment, mailer, search).
  • Writes are slow and should not block the user request.
  • The third-party is intermittently unreliable.
  • A degraded-mode response is preferable to a 5xx.

Default workflow

  1. Identify each external dependency. Decide its criticality (must succeed sync vs degraded fallback acceptable).
  2. Wrap external calls in a Circuit Breaker with three states (Closed / Open / Half-Open).
  3. On Open: serve a cached fallback and add _notice.type: degraded_mode to the response.
  4. For slow writes: persist a pending_* status, dispatch a Messenger command, return HTTP 202.
  5. Model the lifecycle with Symfony Workflow (draft → pending_erp_processing → processed | failed).
  6. Configure exponential backoff retry + DLQ on the Messenger transport.

Guardrails

  • No silent fallback. Always surface degraded mode in the response so the client can decide.
  • Idempotency on external calls — assume retries will happen.
  • Timeouts on every HTTP / RPC call — never block indefinitely.
  • DLQ monitored. Failures accumulating in failed must trigger an alert; don't messenger:failed:retry blindly.

Progressive disclosure

  • SKILL.md covers posture and rules.
  • reference.md carries the full patterns: Circuit Breaker implementation (states, transitions, fallback cache), degraded-mode JSON shape, async write end-to-end (Processor, status, Messenger transport, retry strategy, failed transport, Workflow), exposing the status through the API.

Output contract

  • Each external dependency wrapped in a Circuit Breaker (and tested).
  • Async writes return HTTP 202 with a queryable status field.
  • Messenger retry strategy + DLQ configured per transport.
  • Workflow definition (draft → pending → processed | failed) explicit.
  • Tests cover the Open state (degraded fallback), the failure transport, and the recovery path.

References

  • reference.md

Read the full file on GitHub · 48 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 48 lines · 0 tokens per session scan A db4eca64eeb1

Subscribe to this mod's changes

api-platform-resilience is a skill published in the GitHub repository gerard-labs/superpowers-api-platform (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 636 tokens. 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-08-31.