finite-recursum
Skill9 starsChanged 3 months agoMITView on GitHub
Audit the repo's Claude instructions for self-correction death spirals — verify-your-work prompts, Stop/advisory hooks that re-fire on unchanged state, unbounded review→fix→re-review loops, and obligations that can never be discharged. Use for "Claude keeps re-checking itself", "the session never ends", "hooks keep waking it up", "it loops on verification", or as part of /opus-pocus. Read-only; reports findings with file:line and a fix per class. NOT for debugging application-level infinite loops — instruction layer only.
In this repository20 other files it gives its agents.
- accio-rulebookSkill
- alohomoraSkill
- avada-verbosaSkill
- clarificus-maximaSkill
- configureSkill
- contradicto-revelioSkill
- descriptio-reducioSkill
- legilimens-anthropicaSkill
- muffliato-hookusSkill
- nihil-revelioSkill
- obliviate-fossiliumSkill
- opus-pocusSkill
- priori-incantatoSkill
- protegoSkill
- quietus-capslockiusSkill
- sorting-hatSkill
- tempus-mutaturSkill
- the-pensieveSkill
- the-remembrallSkill
- the-room-of-requirementSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
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 16
Every memory file the repo carries — CLAUDE.md, AGENTS.md, nested, user-level if opted in
- Distinctive: line 17
Every hook that fires on Stop / session-end / post-tool events
- Distinctive: line 18
Every skill or agent definition containing review, verification, or completion procedures
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🛡 Finite Recursum
"The robot was checking its work checking its work checking its—"
The 5-family verifies its own work without being told. Instructions and hooks written to force verification on older models now stack on top of that and produce spirals: the model re-checks, finds nothing new, and the instruction layer demands it re-check again.
What to scan
- Every memory file the repo carries —
CLAUDE.md,AGENTS.md, nested, user-level if opted in - Every hook that fires on Stop / session-end / post-tool events
- Every skill or agent definition containing review, verification, or completion procedures
- Output styles and system-prompt fragments
Anti-patterns to find
Verify-your-work incantations that have a loop partner. "Double-check your work", "verify before finishing", "always confirm correctness", "re-read your changes" — as standing prose rules where something re-raises the obligation: a Stop or session-end hook, a re-firing advisory, or a second copy of the rule elsewhere. That combination is loop fuel.
Not a finding on its own. A rule naming a concrete, non-inferable artifact check —
run npm test before claiming done,run terraform plan and paste the output— is load-bearing and stays. The model self-verifies its reasoning; it does not know your commands. In a repo with no Stop or advisory hooks this class has no instances: say so, rather than flagging the prose.- Re-firing advisories with no state fingerprint. A Stop/advisory hook that emits the same warning every time it runs, regardless of whether the underlying state changed. The model answers, stops, the hook fires again on identical state: wake→answer→stop→wake.
- Unbounded review loops. A review→fix→re-review procedure with no round cap and no exit criterion besides "no findings". Reviewers on the 5-family will always find something; minor findings extend the loop forever.
- Undischargeable obligations. A rule demanding a condition the agent cannot always satisfy ("all tests must pass before you stop" when the suite needs approval to run; "verify in the editor" when the agent has no editor). The obligation can't be discharged, so it re-surfaces every turn.
- Staleness-free verification demands. "Verify X before claiming done" with no allowance for evidence already gathered this session — forcing re-verification of unchanged subjects per message instead of per change.
- Advisory text that reads as blocking. A warning phrased like a wall ("BLOCKED", "not landable") on a condition that is actually advisory — agents stop doing legitimate work.
Fix prescriptions
| Finding class | Fix |
| Verify-your-work prose with a loop partner | Remove the loop partner first — that is the mechanism. Then narrow the prose to the one artifact check that is genuinely load-bearing ("read the artifact, not the exit code"). Deleting a rule that names a real command, in a repo with nothing re-raising it, costs the user a check the model cannot infer |
| Re-firing advisory | Fingerprint the state (not the rendered text); emit once per fingerprint; explicit "silence = already reported, not verified clean" wording |
| Unbounded review loop | Cap rounds (≤3–5), then adjudicate: land with gaps named / park with a ruling / escalate. Minor findings never extend the loop |
| Undischargeable obligation | Give it a terminal state: "if you cannot perform X, state that and stop" — an explicit out that discharges the obligation by reporting |
| Per-message re-verification | Staleness rule: evidence stands while its subject is unchanged; re-run after a change, not per message |
| Advisory-as-wall | Reword the verdict to name the action that still proceeds ("lands with a bare <command>") |
| Any of the above enforced by a hook | Add a wake/round budget at the hook layer as a backstop — the mechanism, not the prose, is what actually bounds a spiral |
Bounds
- Scope: memory files, hooks that fire on Stop or session-end, and the review/verification/completion procedures inside skills and agents. Not application source, not dependencies, not another installed plugin.
- Cap: 15 findings, ranked by whether the spiral fires today or only under conditions.
- Done when the declared scope has been swept once and ranked — not when the sweep stops finding loops.
- Quote once, at read time; mark anything you cannot re-confirm
UNVERIFIEDrather than re-reading to check yourself. - See
skills/opus-pocus/references/casting-safety.mdfor the full rules.
Report format
Per finding: file:line · class (1–6) · the quoted text · the prescription · severity
(does it loop today, or only under conditions). End with the loop census: how many distinct
spiral mechanisms exist and how many have a bound. SCANNED NOTHING if no instruction layer
was found.
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.

