self-healing

self-healing is a skill for Claude Code, Codex from bolivian-peru/os-moda. It costs 43 tokens per session (964 once invoked), scanned A, original, Apache-2.0.

An automated service-repair process that checks for failures, investigates their causes, and can restart services, repair configuration, or roll back NixOS. NixOS is a Linux system that stores configuration as reproducible versions.

In plain words
What is it for?
Use it to confirm service outages, inspect error logs and past incidents, identify causes such as missing files or resource problems, and apply a logged repair.
Why use it?
It reduces the time a failed service stays unavailable and avoids acting on a single misleading check. It also records repair actions for later review.

Skill for Claude CodeCodex

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

Good fit Use it to confirm service outages, inspect error logs and past incidents, identify causes such as missing files or resource problems, and apply a logged repair.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bolivian-peru/os-moda/self-healing"><img src="https://agentmods.dev/badge/skills/bolivian-peru/os-moda/self-healing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 964 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 139
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00043 $0.00964
Opus 5 $0.00022 $0.00482
Sonnet 5 $0.00009 $0.00193
Haiku 4.5 $0.00004 $0.00096

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

Security

Grade A, and why

self-healing 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 11d 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/SKILL.md · 143 lines

How it starts

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

Self-Healing Skill

You can detect, diagnose, and fix system problems automatically.

Detection

When you detect a service failure or anomaly during a heartbeat check:

  1. Check teachd for historical patterns first — teachd observes the system 24/7 between conversations

    teach_context({ context: "nginx failure service down" })
    teach_patterns({ min_confidence: 0.5 })
    

    This surfaces slow-burn issues (memory leaks, recurring failures, correlated events) that you wouldn't catch in a single conversation.

  2. Confirm the failure — don't act on a single check

    service_status({ service: "nginx" })
    

    If the service is down, check again after 10 seconds. If still down, proceed.

  3. Check journal logs for why it failed

    journal_logs({ unit: "nginx", lines: 30, priority: "err" })
    
  4. Recall past incidents — have we seen this before?

    memory_recall({ query: "nginx failure", timeframe: "30d" })
    

Diagnosis

Determine the root cause before acting:

  • Service crashed → check logs for segfault, OOM, config error
  • Config file missing/corrupted → check if NixOS generation has it
  • Dependency failure → another service it depends on is down
  • Resource exhaustion → disk full, OOM killer, too many connections
  • Bad deploy → most recent nixos-rebuild introduced the issue

Remediation (ordered by safety)

Level 1: Restart the service

shell_exec({ command: "systemctl restart nginx" })

Safe, fast, fixes 80% of issues.

Level 2: NixOS rollback

If restart doesn't fix it, or if config is corrupted:

shell_exec({ command: "nixos-rebuild switch --rollback" })

This atomically reverts to the last known-good NixOS generation.

Level 3: Targeted config fix

If you can identify the exact config issue:

file_read({ path: "/etc/nixos/configuration.nix" })

Fix the config, then rebuild:

shell_exec({ command: "nixos-rebuild switch" })

Level 4: Resource relief

If disk/memory is the problem:

shell_exec({ command: "nix-collect-garbage -d" })
shell_exec({ command: "journalctl --vacuum-size=500M" })

Read the full file on GitHub · 143 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. 11d ago First seen · 143 lines · 43 tokens per session scan A 7e874c985759

Subscribe to this mod's changes

self-healing is a skill published in the GitHub repository bolivian-peru/os-moda (117 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 43 tokens to every session and 964 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

gateway-doctor

Use when diagnose and fix MCP gateway routing issues, health checks, and server connectivity problems. Use when working with gateway doctor.

oyi77/1ai-skills · 29 tokens

devops-incident-responder

Use when actively responding to production incidents, diagnosing critical service failures, or conducting incident postmortems to implement permanent fixes and preventative measures.

risadams/ink-and-agency · 34 tokens

analyzing-linux-elf-malware

Analyzes malicious Linux ELF (Executable and Linkable Format) binaries including botnets, cryptominers, ransomware, and rootkits targeting Linux servers, containers, and cloud infrastructure. Covers static analysis, dynamic tracing, and reverse engineering of x8664 and ARM ELF samples. Activates for requests involving…

pinkpixel-dev/skills-collection-1 · 88 tokens

analyzing-linux-kernel-rootkits

Detect kernel-level rootkits in Linux memory dumps using Volatility3 linux plugins (checksyscall, lsmod, hiddenmodules), rkhunter system scanning, and /proc vs /sys discrepancy analysis to identify hooked syscalls, hidden kernel modules, and tampered system structures.

pinkpixel-dev/skills-collection-1 · 65 tokens

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens