livelock-recovery

livelock-recovery is a skill for Claude Code from ihabkhaled/AI-Psychiatry. It costs 37 tokens per session (211 once invoked), scanned A, original, MIT.

A recovery procedure for when repeated coding work produces no change. It helps identify the stuck result, change the investigation approach, and narrow the task.

In plain words
What is it for?
Use it to diagnose stalled debugging, implementation, testing, review, or planning cycles.
Why use it?
It prevents wasted time repeating the same edits, searches, tests, or plans without learning anything new. It also defines when to retry and when to report a blocker.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-psychiatry plugin — 55 skills shipped together

Good fit Use it to diagnose stalled debugging, implementation, testing, review, or planning cycles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ihabkhaled/ai-psychiatry/livelock-recovery
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 ihabkhaled/AI-Psychiatry --skill livelock-recovery
Clone the repo
git clone --depth 1 https://github.com/ihabkhaled/AI-Psychiatry

Made for: Claude Code.

Or install ai-psychiatry, the plugin that ships this one along with the rest of its 55 skills.

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 livelock-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/ihabkhaled/ai-psychiatry/livelock-recovery/github.svg)](https://agentmods.dev/skills/ihabkhaled/ai-psychiatry/livelock-recovery)
Your own site
<a href="https://agentmods.dev/skills/ihabkhaled/ai-psychiatry/livelock-recovery"><img src="https://agentmods.dev/badge/skills/ihabkhaled/ai-psychiatry/livelock-recovery/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 livelock-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/ihabkhaled/ai-psychiatry/livelock-recovery"><img src="https://agentmods.dev/badge/skills/ihabkhaled/ai-psychiatry/livelock-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 211 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.
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.00037 $0.00211
Opus 5 $0.00018 $0.00105
Sonnet 5 $0.00007 $0.00042
Haiku 4.5 $0.00004 $0.00021

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

Security

Grade A, and why

livelock-recovery 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.

.ai/skills/livelock-recovery/SKILL.md · 37 lines

What it actually says

Livelock Recovery

Core principle

Stop repeated activity, identify the unchanged outcome, change strategy materially, and reduce the search space.

Procedure

  1. Freeze the repeating action.
  2. Compare recent actions semantically.
  3. Name the outcome that did not change.
  4. Remove speculative branches and invalid assumptions.
  5. Choose a new hypothesis, evidence source, isolation, or layer.
  6. Reduce scope, retry once, then escalate or block if still unchanged.

Required output

Repeated cycle, unchanged metric, new strategy, reduced scope, and retry result.

Limits

Reset after 4 stalled cycles or 3 same-strategy attempts.

Common mistakes

Do not make recovery generate more hypotheses or perform a fourth equivalent attempt.

Stop condition

Stop when measurable progress resumes or an exact blocker is proven.

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. 12d ago First seen · 37 lines · 37 tokens per session scan A ddd731a3beb4

Subscribe to this mod's changes

livelock-recovery is a skill published in the GitHub repository ihabkhaled/AI-Psychiatry (3 stars, last pushed 28d ago), licensed MIT. It adds 37 tokens to every session and 211 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-31.

Related

Other skills, from other repositories

angular

Use when building, refactoring, or debugging Angular (v20/21+): standalone components, signals, zoneless change detection, @if/@for/@defer control flow, inject() DI, resource()/httpResource(), RxJS interop, NgRx SignalStore, ng CLI. NOT React (that is react), NOT Next.js (that is nextjs), NOT a TypeScript language…

ericrisco/rsc-harness · 89 tokens

cpp

Use when writing, reviewing, modernizing, building, or debugging C++ - RAII and resource lifetime, smart-pointer ownership, move semantics and the Rule of Zero/Five, target-based CMake with FetchContent, and killing undefined behavior with ASan/UBSan/TSan plus clang-tidy. NOT borrow-checker / Result-Option / cargo…

ericrisco/rsc-harness · 81 tokens

debug

Use when something is broken — a failing or flaky test, crash, wrong result or regression — and the root cause must be reproduced and proven before any fix. On-demand; callable mid-implement. NOT a feature to spec or build (that is specify/implement), NOT the lint/test gate (that is verify), NOT adversarial diff…

ericrisco/rsc-harness · 85 tokens

gamedev-physics

Use when working with a game engine's physics — rigid bodies, colliders, collision layers and masks, character controllers, joints, forces versus impulses, raycasts and shapecasts, or when a simulation is unstable (tunnelling, jitter, missed overlaps). Covers the Godot, Unity and Unreal equivalents. NOT rendering or…

ericrisco/rsc-harness · 102 tokens

observability

Use when instrumenting a service from the inside so an incident can be explained from telemetry alone — wiring OpenTelemetry logs, metrics and traces, standing up a Collector, exporting via OTLP, and defining telemetry-driven alerts. NOT outside-in uptime probes, on-call rotation, or who-gets-paged (that is…

ericrisco/rsc-harness · 70 tokens

autonomous-bug-fix

Reproduces, diagnoses, fixes, and verifies bugs unaided.

andreaswasita/copilot-agents-dojo · 21 tokens