self-healing
Skill118 starsChanged 6 months agoApache-2.0View on GitHub
Detect service failures and system anomalies. Diagnose root causes. Auto-remediate using NixOS rollback, service restart, or config repair. Every action logged to the hash-chained audit ledger.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- AhmedAbdelfattah0/AI-Skillstheir own version, first seen Sep 28, 2026
- bbeliso/belisodw-their own version, first seen Jun 21, 2026
- yawningwhaleAI/SKILLStheir own version, first seen Jun 5, 2026
- vikneshwaran16032005-alt/claude-skillstheir own version, first seen Jun 5, 2026
- pskoett/pskoett-ai-skillstheir own version, first seen Apr 13, 2026
- luyuehm/openclaw-practical-skillstheir own version, first seen Apr 10, 2026
Used with
Projects with it also use build-premium-website, instantly-campaign and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
vikneshwaran16032005-altSkillbuild-premium-website
Build a premium, animated marketing website (React + Vite + Tailwind + GSAP) for any industry. Use when the user asks to "build a website", "make a landing page for [business]", "build a marketing site", or wants a high-end animated company website. Adapts color, copy, services, and signature animation to the industry.
Also in 3 projects that use this
vikneshwaran16032005-altSkillinstantly-campaign
Create a new Instantly cold-email campaign in the proven 5-email structure of the user's top-performing campaign (~16% reply rate). Use when the user wants to launch a new outbound campaign, write a cold email sequence, create an Instantly campaign, draft outreach for a new service or niche, or set up a sales sequence.
Also in 3 projects that use this
composio-communitySkillcomposio
Use 1000+ external apps via Composio - either directly through the CLI or by building AI agents and apps with the SDK
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- pskoett/pskoett-ai-skills★ 309same name
- AhmedAbdelfattah0/AI-Skills★ 4same name
- daianepepes-lab/claude-skills★ 4same name
- vikneshwaran16032005-alt/claude-skills★ 2same name
- bbeliso/belisodw-★ 0same name
- henriquepimenta1/claude-skills★ 0same name
- luyuehm/openclaw-practical-skills★ 0same name
- yawningwhaleAI/SKILLS★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- app-deployerSkill
- deploy-ai-agentSkill
- drift-detectionSkill
- file-managerSkill
- flight-recorderSkill
- generation-timelineSkill
- morning-briefingSkill
- natural-language-configSkill
- network-managerSkill
- nix-optimizerSkill
- predictive-resourcesSkill
- scaled-swarm-predictSkill
- security-hardeningSkill
- service-explorerSkill
- spec-driven-developmentSkill
- swarm-predictSkill
- system-configSkill
- system-monitorSkill
- system-packagesSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
When you detect a service failure or anomaly during a heartbeat check:
- Distinctive: line 42
If the service is down, check again after 10 seconds.
- Distinctive: line 73
If restart doesn't fix it, or if config is corrupted:
- Distinctive: line 80
If you can identify the exact config issue:
- Distinctive: line 90
If disk/memory is the problem:
- Distinctive: line 98
ALWAYS do these three things:
- Distinctive: line 119
After fixing an issue, compose a clear message for the user:
- Distinctive: line 134
Keep it factual, concise, and include the audit reference.
- Distinctive: line 138
NEVER make changes without logging them
- Distinctive: line 139
NEVER skip verification after a fix
- Distinctive: line 140
If unsure, restart is safer than rollback
- Distinctive: line 141
If rollback fails, STOP and alert the user — don't cascade
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
- Check teachd for historical patterns first — teachd observes the system 24/7 between conversations
This surfaces slow-burn issues (memory leaks, recurring failures, correlated events) that you wouldn't catch in a single conversation.teach_context({ context: "nginx failure service down" }) teach_patterns({ min_confidence: 0.5 }) - Confirm the failure — don't act on a single check
If the service is down, check again after 10 seconds. If still down, proceed.service_status({ service: "nginx" }) - Check journal logs for why it failed
journal_logs({ unit: "nginx", lines: 30, priority: "err" }) - 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" })After remediation
ALWAYS do these three things:
- Verify the fix worked
service_status({ service: "nginx" }) - Store in memory
memory_store({ summary: "nginx failure: config missing, rolled back to gen 47", detail: "Full diagnosis and fix details...", category: "diagnosis", tags: "self-healing,nginx,rollback" }) - Log to audit ledger — this happens automatically through agentd
Notification
After fixing an issue, compose a clear message for the user:
I detected nginx was down at 03:17 UTC.
Cause: The configuration file /etc/nginx/nginx.conf referenced
a missing upstream. This was introduced in NixOS generation 48
(rebuilt 2 hours ago).
Action: Rolled back to generation 47. nginx is running again.
All health checks pass.
Audit entry: #52 (hash: a7f3b2...)Keep it factual, concise, and include the audit reference.
Critical rules
- NEVER make changes without logging them
- NEVER skip verification after a fix
- If unsure, restart is safer than rollback
- If rollback fails, STOP and alert the user — don't cascade
- Store EVERY incident in memory — patterns build over time
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

