Borrowing it
Nothing to install: this file belongs to cairn-framework/cairn. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cairn-framework/cairn/main/.claude/skills/cairn-loop-recovery/SKILL.mdgit clone --depth 1 https://github.com/cairn-framework/cairnWrote 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/cairn-framework/cairn/cairn-loop-recovery)<a href="https://agentmods.dev/skills/cairn-framework/cairn/cairn-loop-recovery"><img src="https://agentmods.dev/badge/skills/cairn-framework/cairn/cairn-loop-recovery.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00071 | $0.01480 |
| Opus 5 | $0.00036 | $0.00740 |
| Sonnet 5 | $0.00014 | $0.00296 |
| Haiku 4.5 | $0.00007 | $0.00148 |
Grade A, and why
cairn-loop-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 8d 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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cairn-loop-recovery
Recover loop state for the preflight verdict loop mode's table selected. Loop mode owns the verdict table (state classification and the fail-closed backstops); this skill owns the procedure each recovery row expands into. Run the section matching the verdict and return the token it declares.
Exit tokens
This skill declares the mid-iteration tokens loop mode routes on. Return exactly one, as the final line, then let loop mode's flow continue:
RECOVERED- the state was recovered; continue the iteration at the phase the calling verdict names (Verify for in-place recovery, Scope for an adopted branch, or continue preflight after cleanup/quarantine-park).LOOP HALTED- the state is unclassifiable or unrecoverable by this skill (intent unclear, conflicting evidence, a violation the maintainer must judge). Touch nothing; report; halt.
Paths that finish the iteration (open-PR recovery after merge, quarantine
via a recover-todo) hand off to cairn-loop-landing; that skill emits
the terminal token (ITERATION COMPLETE or LOOP HALTED). This skill does
not re-emit a terminal token after a successful hand-off.
1. Dirty tree on a loop/* branch whose slug maps to a known unit
Finishing that unit IS this iteration. Recover in place:
- Read the full diff against the unit's intent (the todo body or finding
code):
git diff,git log origin/main..HEAD, and the unit's artefacts. - Decide coherence: complete the unfinished work, or trim incomplete work back to a single coherent landed unit. Prefer trimming over expanding when the diff has sprawled beyond one reviewable PR.
- Return
RECOVERED. Loop mode continues at Verify, then Land viacairn-loop-landing. Do not invoke landing from this skill.
Invariant (a fail-closed backstop, owned by loop mode): no checkout of
any kind until the tree is clean. If intent is unclear, do not guess; emit
LOOP HALTED.
2. Clean tree, exactly one open loop/* PR
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.
- 8d ago First seen · 117 lines · 71 tokens per session scan A 9ae94ff37925
cairn-loop-recovery is a skill published in the GitHub repository cairn-framework/cairn (41 stars, last pushed yesterday), licensed Apache-2.0. It adds 71 tokens to every session and 1,480 once invoked, about $0.0004 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-30.
Other skills, from other repositories
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
re0-merge
Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…
codex-autoresearch
Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…