self-healing-mindset

self-healing-mindset is a skill for Claude Code, Codex from jamestorrevillas/dev-skills. It costs 101 tokens per session (1,900 once invoked), scanned A, original, MIT.

A design guide for building software and AI agents that detect failures, choose a recovery method, act, check the result, and learn from what happened. Examples include retries, fallbacks, health checks, and circuit breakers, which stop repeated calls to a failing service.

In plain words
What is it for?
Use it when designing or reviewing resilient code, systems, or agents. It supports failure analysis, retry and fallback plans, chaos testing, and automatic recovery workflows.
Why use it?
It helps developers plan for failures before they become incidents instead of treating recovery as an afterthought.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing or reviewing resilient code, systems, or agents. It supports failure analysis, retry and fallback plans, chaos testing, and automatic recovery workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamestorrevillas/dev-skills/self-healing-mindset
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 jamestorrevillas/dev-skills --skill self-healing-mindset
Clone the repo
git clone --depth 1 https://github.com/jamestorrevillas/dev-skills

Made for: Claude Code, Codex.

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-mindset

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamestorrevillas/dev-skills/self-healing-mindset/github.svg)](https://agentmods.dev/skills/jamestorrevillas/dev-skills/self-healing-mindset)
Your own site
<a href="https://agentmods.dev/skills/jamestorrevillas/dev-skills/self-healing-mindset"><img src="https://agentmods.dev/badge/skills/jamestorrevillas/dev-skills/self-healing-mindset/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 self-healing-mindset

Your own site · 80×15
<a href="https://agentmods.dev/skills/jamestorrevillas/dev-skills/self-healing-mindset"><img src="https://agentmods.dev/badge/skills/jamestorrevillas/dev-skills/self-healing-mindset.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00101 $0.01900
Opus 5 $0.00051 $0.00950
Sonnet 5 $0.00020 $0.00380
Haiku 4.5 $0.00010 $0.00190

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

Security

Grade A, and why

self-healing-mindset scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(url, {
.github/skills/self-healing-mindset/SKILL.md · 258 lines

How it starts

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

Self-Healing Mindset

Core Philosophy

"Everything will eventually fail over time." — Werner Vogels, Amazon CTO

Self-healing is not a feature you add — it's a design philosophy you start with. The question is never "will this fail?" but "when this fails, what happens next?"

The shift: From reactive firefighting → proactive resilience engineering.

The same mindset applies at every level: code, systems, AI agents, and your own development practice.


The Detect–Decide–Act Loop

Every self-healing system follows this pattern:

DETECT  → Monitor signals (health checks, error rates, latency, business KPIs)
DECIDE  → Select recovery strategy (retry, fallback, scale, restart, degrade)
ACT     → Execute recovery (automatically or with human confirmation)
VERIFY  → Confirm recovery succeeded
LEARN   → Update the healing logic based on what worked
```text

This loop runs continuously. Design every system component with this loop in mind.

---

## Resilience Patterns in Code

### Retry with Exponential Backoff
For transient failures (network timeouts, rate limits):
```typescript
async function withRetry<T>(
  fn: () => Promise<T>,
  maxAttempts = 3,
  baseDelayMs = 1000
): Promise<T> {
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
    try {
      return await fn()
    } catch (error) {
      if (attempt === maxAttempts) throw error
      const delay = baseDelayMs * Math.pow(2, attempt - 1)
      await sleep(delay + Math.random() * 100) // jitter
    }
  }
  throw new Error('Max retries exceeded')
}

Circuit Breaker

Prevents cascading failures when a dependency is down:

CLOSED (normal) → failures exceed threshold → OPEN (blocking calls)
OPEN → after timeout → HALF-OPEN (test one call)
HALF-OPEN → success → CLOSED | failure → OPEN
```text

Use: Resilience4j (Java), Polly (.NET), opossum (Node.js), tenacity (Python)

### Bulkhead
Isolate failures to prevent them spreading:
- Separate thread pools per service dependency
- Database connection pools per tenant
- Resource limits per endpoint

Read the full file on GitHub · 258 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. 10d ago First seen · 258 lines · 0 tokens per session scan A 1cdabf53d2ec

Subscribe to this mod's changes

self-healing-mindset is a skill published in the GitHub repository jamestorrevillas/dev-skills (3 stars, last pushed 5mo ago), licensed MIT. It adds 101 tokens to every session and 1,900 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

log-analyzer

Senior-SRE log analysis specialist. Use when investigating incidents from logs, triaging error spikes, extracting timelines, correlating distributed traces, or separating signal from noise across plain-text, JSON (slog/zap), syslog, journald, container, and Kubernetes logs. ALWAYS use when the user asks to "analyze…

johnqtcg/awesome-skills · 138 tokens

incident-postmortem

Incident post-mortem specialist for writing blameless post-mortems, extracting timelines from logs/events, conducting root cause analysis (5-Why, fishbone), classifying severity, and generating tracked action items. ALWAYS use when writing a post-mortem, reviewing an incident, extracting a timeline, performing root…

johnqtcg/awesome-skills · 98 tokens

systematic-debugging

Use when debugging, diagnosing, or investigating any bug, test failure, flaky test, race condition, unexpected behavior, build failure, production incident, third-party breakage, root cause analysis, or performance regression before proposing fixes.

johnqtcg/awesome-skills · 49 tokens

hotfix

Fixes an observed defect with reproducible evidence in one call: writes a short trace doc before touching code, implements the fix, and backs it with a regression test written before the fix. Production incidents are the motivating case, not a gate. When blocked, it halts by name and saves the doc for a later call to…

pe-menezes/vibeflow · 102 tokens

sap-sac-scripting

Comprehensive SAC scripting skill for SAP Analytics Cloud Analytics Designer and Optimized Story Experience. This skill should be used when the user asks to "create SAC script", "debug Analytics Designer", "optimize SAC performance", "planning operations in SAC", "filter data in SAC", "use DataSource API", "chart…

secondsky/sap-skills · 166 tokens

sapui5-linter

Use this skill when working with the UI5 Linter (@ui5/linter) for static code analysis of SAPUI5/OpenUI5 applications and libraries. Covers setup, configuring linting rules, running the linter to detect deprecated APIs, global variable usage, CSP violations, and manifest issues. Supports autofix for deprecated API…

secondsky/sap-skills · 103 tokens