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.5 $0.00040 $0.00760
Sonnet 5.5 $0.00020 $0.00380
Haiku 4.5 $0.00010 $0.00190

Measured 3mo ago against content hash 1cdabf53d2ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (4 stars, last pushed 8mo ago), licensed MIT. It adds 101 tokens to every session and 1,900 once invoked, about $0.0004 per session on Opus 5.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

self-healing-mindset compared with skills from other repositories

self-healing-mindset next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-healing-mindsetjamestorrevillas/dev-skillsSkill48mo agoMITA101Claude Code, Codex
qt-qml-profilerTheQtCompanyRnD/agent-skillsSkill5776d agononeA111Claude Code
debug-behaviorHenriqueCotta/ownership-driven-ai-customization-architectureSkill67mo agoMITA16Claude Code, Codex
oracle-sql-diagnosisgabrielrovesti/ai-agent-skillsSkill11mo agononeA42Claude Code, Codex
springboot-ticket-diagnosisgabrielrovesti/ai-agent-skillsSkill11mo agononeA38Claude Code, Codex
release-itwondelai/skillsSkill2.8k8d agoMITA131Claude Code, Codex
om-auto-fix-issueopen-mercato/skillsSkill284yesterdayMITA124Claude Code, Codex