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 enricai/leerie --skill llm-self-healgit clone --depth 1 https://github.com/enricai/leerieWrote 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/enricai/leerie/llm-self-heal)<a href="https://agentmods.dev/skills/enricai/leerie/llm-self-heal"><img src="https://agentmods.dev/badge/skills/enricai/leerie/llm-self-heal/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/enricai/leerie/llm-self-heal"><img src="https://agentmods.dev/badge/skills/enricai/leerie/llm-self-heal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
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 →
- high Excessive Agency · line 179 Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
- medium analysis-evasion · line 1 Suspicious Unicode normalization or mixed-script contentFix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
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.00125 | $0.03218 |
| Opus 5 | $0.00063 | $0.01609 |
| Sonnet 5 | $0.00025 | $0.00644 |
| Haiku 4.5 | $0.00013 | $0.00322 |
Grade A, and why
llm-self-heal 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 12d 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 — 307 lines — stays where its author put it; the contents beside it link to each section on GitHub.
- Baseline — run n=N unpatched replays per failing sample via
claude -p, score each, establish noise floor. - Loop — invoke the patch-generator worker (a direct
claude -pcall) to propose a minimal patch to the system prompt, apply the patch, replay the patched arm, score, check convergence. - Report — write
<heal-dir>/<call_type>/healing-<call_type>.mdwith the verdict (SUCCESS / PLATEAUED / BUDGET_EXHAUSTED / TIMEOUT / REGRESSED), the best patch found, and the full iteration history.
Output: per call_type with failures, a heal report under the run's
<heal_subdir>/ directory (default heal-out/; configurable via
--heal-dir / LEERIE_HEAL_DIR / leerie.toml heal_dir).
Production prompts in prompts/ are NOT modified by this skill.
Patches are proposed evidence — applying them is a separate manual step.
<execution_context>
Arguments parsed from $ARGUMENTS:
- First positional:
<run-id>or path to acalls.ndjsonfile or its parent directory. If a run-id is given, the skill resolves<state-root>/runs/<run-id>/calls.ndjsonand the corresponding heal output dir<state-root>/runs/<run-id>/heal-out/, where<state-root>is the resolved leerie state directory (default$HOME/.leerie/<basename>/, overridable viaLEERIE_STATE_DIR/--state-dir/leerie.toml state_dir;/leerie-stateinside the container) — never a path relative to CWD. --call-type <name>(optional): heal only this call_type; default heals all call_types that have failing verdicts in the verdict files found underjudge-out/.--verdict-dir <dir>(optional): where judge-llm-batch wrote its verdict JSON files. Defaults to<run-dir>/judge-out/.--heal-dir <dir>(optional): where to write heal-loop state and reports. Defaults to<run-dir>/heal-out/or the value resolved fromLEERIE_HEAL_DIR/leerie.toml heal_dir.--max-iterations <N>(default 10,HEAL_MAX_ROUNDS_DEFAULT): hard cap on loop iterations per call_type.--n-replays <N>(default 5,HEAL_N_REPLAYS_DEFAULT): replays per arm (baseline or each patched iteration) per failing sample.--success-threshold <0..1>(default 0.9,HEAL_SUCCESS_THRESHOLD_DEFAULT): pass-rate target for SUCCESS exit.--plateau-window <N>(default 3,HEAL_PLATEAU_WINDOW_DEFAULT): consecutive iterations of small delta → PLATEAUED exit.--plateau-delta <0..1>(default 0.03,HEAL_PLATEAU_DELTA_DEFAULT): "small delta" threshold in pass-rate units.--model <alias>(defaultsonnet,MODEL_DEFAULT_PER_WORKER["heal"]): model alias passed toclaude -pfor replay arms. Override viaLEERIE_MODEL_HEALor--heal-modelon the main orchestrator, or pass--modeldirectly to this skill invocation.
All default values match IMPLEMENTATION.md §2 "Heal-loop convergence parameters". </execution_context>
call_type → prompt-file mapping
Each call_type has exactly one system-prompt source (IMPLEMENTATION.md §10):
| call_type | Prompt source |
|---|---|
| classifier | prompts/classifier.md |
| planner | prompts/planner.md |
| reconciler | prompts/reconciler.md |
| implementer | prompts/implementer.md |
| integrator | prompts/integrator.md |
| conformer | prompts/conformer.md |
The heal loop reads the current file from prompts/ as the base
prompt text for any call_type it heals.
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.
- 12d ago First seen · 307 lines · 125 tokens per session scan A ef5be4a3298f
llm-self-heal is a skill published in the GitHub repository enricai/leerie (10 stars, last pushed 9d ago), licensed MIT. It adds 125 tokens to every session and 3,218 once invoked, about $0.0006 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-31.
Other skills, from other repositories
audit-prompt-caching
Use whenever the user mentions cachedtokens=0,totalcachedtokens,cachereadinputtokens,cachecreationinputtokens,cachewritetokens,promptcachekey,promptcacheoptions,promptcachebreakpoint,previousinteractionid,cachecontrol/cachePoint,TTFT,KV reuse…
structured-output
This skill should be used when the user mentions "structured output", "json mode", "tool schema", "function calling", "json parse error", "responseformat", "pydantic ai", "invalid json from the model", or "the model's JSON keeps breaking". It provides a methodology for getting reliably valid, schema-conformant…
forkmind
Use when debugging, comparing, or regression-testing LLM / agent calls — when the user wants to capture LLM traffic, see a conversation as a branchable DAG, fork an alternative prompt or model from a past turn, or pin good outputs as baselines to catch drift. ForkMind is local-first (no cloud, no account) and proxies…
langfuse
Expert in Langfuse - the open-source LLM observability platform. Covers tracing, prompt management, evaluation, datasets, and integration with LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and improving LLM applications in production.
llm-debugger
Diagnoses LLM output failures including hallucinations, constraint violations, format errors, and reasoning issues. Provides root cause classification, prompt fixes, tool improvements, and new test cases. Use for "debugging AI", "fixing prompts", "quality issues", or "output errors".
chat-quality-doctor
A troubleshooting guide for unsatisfying roleplay chats with AI characters. It covers problems such as robotic wording, broken character behavior, forgotten details, overly long or short replies, refusals, and stalled plots.