self-healing-fallbacks

self-healing-fallbacks is a skill for Claude Code from impactbrussels/AINativeOS. It costs 151 tokens per session (1,505 once invoked), scanned A, original, Apache-2.0.

A method for keeping an AI workflow usable when its model or API is slow, unavailable, or produces unreliable answers. It uses limited retries and alternate routes before switching to a fixed non-AI response.

In plain words
What is it for?
Use it to map critical workflows, assess whether mistakes are reversible, set retry and fallback limits, and design safe non-AI backup paths.
Why use it?
It prevents outages, incorrect confident answers, and user dead ends from stopping the whole workflow. It also sets stricter safeguards for actions that cannot easily be undone.

Skill for Claude Code

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

Part of the ai-native-os plugin — 25 skills, 6 agents 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/impactbrussels/ainativeos/self-healing-fallbacks
Any agent
npx skills add impactbrussels/AINativeOS --skill self-healing-fallbacks
Clone the repo
git clone --depth 1 https://github.com/impactbrussels/AINativeOS

Made for: Claude Code.

Or install ai-native-os, the plugin that ships this one along with the rest of its 25 skills, 6 agents.

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 self-healing-fallbacks

README.md
[![agentmods](https://agentmods.dev/badge/skills/impactbrussels/ainativeos/self-healing-fallbacks.svg)](https://agentmods.dev/skills/impactbrussels/ainativeos/self-healing-fallbacks)
Your own site
<a href="https://agentmods.dev/skills/impactbrussels/ainativeos/self-healing-fallbacks"><img src="https://agentmods.dev/badge/skills/impactbrussels/ainativeos/self-healing-fallbacks.svg" alt="Measured on agentmods" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,505 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.00151 $0.01505
Opus 5 $0.00076 $0.00753
Sonnet 5 $0.00030 $0.00301
Haiku 4.5 $0.00015 $0.00151

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

Security

Grade A, and why

self-healing-fallbacks 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/self-healing-fallbacks/SKILL.md · 88 lines

How it starts

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

Self-Healing Fallbacks

Your workflow sits behind an API, and that API will sometimes be slow, down, or wrong. The failure that quietly kills pilots is not a crash; it is a confident wrong answer, or a dead end a user hits twice before going back to doing the job by hand. You did not lose them on capability. You lost them on reliability. Self-healing without a hard limit is just an infinite loop in a nicer coat, so the discipline is to retry within bounds, reroute within bounds, then fall to a fixed, boring, non-AI path that cannot guess fluently on a dose, an allergen, or anything irreversible.

The method

Map each critical path to a pattern, size what to automate, set the threshold that fires the floor. Full framework: references/fallback-patterns.md. Source: Handbook Chapter 09.

Step 1: List the critical paths and their reversibility

For each path the workflow depends on, write what it touches and whether a wrong answer can be undone. Reversibility, not value, decides how hard the fallback must be.

Path touches Reversibility Fallback hardness
A screenshot, a draft, a suggestion Fully reversible Retry, then best-effort, log it
A stored record, an outbound message Partly reversible Retry, reroute, then conservative default
A dose, an allergen, a threshold, a trade, a release Irreversible No guess ever: deterministic floor + named human

Step 2: Choose the pattern per path

Pick from the catalogue by risk and reversibility. The full decision table is in references.

Pattern Fires when Behaviour
Retry-with-backoff Transient failure (timeout, 429, overload) Retry N times, widening gaps, then escalate
Confidence-gated fallback Model confidence below threshold Stop, drop to the floor, do not answer
Deterministic floor High-risk path, any uncertainty Fixed rule or conservative default, no model
Cached-last-good Live call fails, a recent answer exists Serve the last verified answer, flag it stale
Circuit breaker Repeated failures on a dependency Stop calling it, fail fast to the floor
Human escalation Floor reached on an irreversible path Hand to a named human with the context

Read the full file on GitHub · 88 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. 6d ago First seen · 88 lines · 151 tokens per session scan A 42eac58b8f67

Subscribe to this mod's changes

self-healing-fallbacks is a skill published in the GitHub repository impactbrussels/AINativeOS (1 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 151 tokens to every session and 1,505 once invoked, about $0.0008 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-08-31.