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.
npx skills add wrg32786/aigent-os --skill learn-from-failuregit clone --depth 1 https://github.com/wrg32786/aigent-osWrote 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.
[](https://agentmods.dev/skills/wrg32786/aigent-os/learn-from-failure)<a href="https://agentmods.dev/skills/wrg32786/aigent-os/learn-from-failure"><img src="https://agentmods.dev/badge/skills/wrg32786/aigent-os/learn-from-failure/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.
<a href="https://agentmods.dev/skills/wrg32786/aigent-os/learn-from-failure"><img src="https://agentmods.dev/badge/skills/wrg32786/aigent-os/learn-from-failure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
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 22 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.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00781 |
| Opus 5 | $0.00000 | $0.00391 |
| Sonnet 5 | $0.00000 | $0.00156 |
| Haiku 4.5 | $0.00000 | $0.00078 |
Grade A, and why
learn-from-failure 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/learn-from-failure — Convert failure to reusable artifact
When a failure occurs, classify it, check for repetition, and produce a durable artifact that prevents recurrence.
Trigger
/learn-from-failure or /learn-from-failure <failure description>
Caddy auto-surfaces on: "same issue", "happened again", "recurring", "third time", "keeps happening"
Flow
1. Identify failure
- If argument provided: use it
- If no argument: ask "What failed?"
2. Classify failure mode
| Mode | Description | Example |
|---|---|---|
routing |
Task sent to wrong agent/model/tool | Opus used for a read-only task |
verification |
Output accepted without checking data flow | Video "looked fine" but spec was wrong |
tool |
Tool unavailable, broken API, wrong usage | Gmail MCP auth expired |
knowledge |
Agent lacked domain knowledge | Didn't know SDK v6 changed type strings |
authority |
Agent acted outside delegation zone | the AIgent made a Level 3 decision |
3. Check for repetition
Read $AIGENT_VAULT/memory/FAILURE_MODES.md. Search for Pattern lines matching the current failure's root cause.
- 0-1 prior occurrences: Phase 1 — log and monitor
- 2+ occurrences: Phase 2 — mandatory artifact. A log entry is not enough.
- 3+ occurrences: The prior artifact failed. Diagnose why and fix or replace it.
4. Log to FAILURE_MODES.md
Append a new entry following the existing format:
## {YYYY-MM-DD} — {short symptom name}
**Symptom:** {what went wrong, user-visible}
**Verified cause:** {exact mechanism}
**Fix:** {what was done}
**Layer:** {which system layer}
**Pattern:** {one-line category — this is the load-bearing piece for repetition detection}
5. Determine artifact type
| Failure mode | Artifact | Target |
|---|---|---|
routing |
Caddy trigger or hook | .claude/hooks/ or .claude/skill-index.json |
verification |
Checklist item in doctrine | Relevant doctrine note |
tool |
SKILL_GAPS entry + skill spec | memory/SKILL_GAPS.md |
knowledge |
Vault note or memory candidate | concepts/ or memory/ |
authority |
Flag to the operator | aigent_authority_matrix.md |
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.
- 7d ago First seen · 82 lines · 0 tokens per session scan A 78451ac18e14
learn-from-failure is a skill published in the GitHub repository wrg32786/aigent-os (18 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 781 tokens. 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-09-01.
Other skills, from other repositories
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.
triage-issue
Analyze a GitHub issue, verify claims against the codebase, and close invalid issues with a technical response.
hive.error-recovery
Follow a structured recovery decision tree when tool calls fail instead of blindly retrying or giving up.
skill-repair
Diagnose and fix failing or degraded skills automatically - systemic-first triage, per-category playbooks, and a verification plan.
self-improve
Improve the agent itself, or audit its recent performance - better skills, prompts, workflows, and config, plus a quality/reliability/memory-hygiene review of what it did and what failed.
systematic-debugging
Systematic approach to diagnosing and fixing errors.