ratchet-loop

ratchet-loop is a skill for Claude Code from afrizzal/ratchet. It costs 140 tokens per session (6,519 once invoked), scanned A, original, MIT.

An automated work loop for completing items in a BACKLOG.md file, which is a written list of development tasks. Each item is implemented, checked against its requirements, committed to Git, and recorded before the next item starts.

In plain words
What is it for?
Use it to work through a verified engineering backlog, select eligible tasks, run acceptance checks, make atomic commits, and continue until the backlog is finished or a stop condition occurs.
Why use it?
It keeps unfinished work, verification results, and reasons for stopping in one file. This reduces unclear task status and prevents code from being treated as complete before its checks pass.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the ratchet plugin — 5 skills shipped together

Good fit Use it to work through a verified engineering backlog, select eligible tasks, run acceptance checks, make atomic commits, and continue until the backlog is finished or a stop condition occurs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/afrizzal/ratchet/ratchet-loop
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 afrizzal/ratchet --skill ratchet-loop
Clone the repo
git clone --depth 1 https://github.com/afrizzal/ratchet

Made for: Claude Code.

Or install ratchet, the plugin that ships this one along with the rest of its 5 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 ratchet-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/afrizzal/ratchet/ratchet-loop.svg)](https://agentmods.dev/skills/afrizzal/ratchet/ratchet-loop)
Your own site
<a href="https://agentmods.dev/skills/afrizzal/ratchet/ratchet-loop"><img src="https://agentmods.dev/badge/skills/afrizzal/ratchet/ratchet-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,519 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.00140 $0.06519
Opus 5 $0.00070 $0.03259
Sonnet 5 $0.00028 $0.01304
Haiku 4.5 $0.00014 $0.00652

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

Security

Grade A, and why

ratchet-loop 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.

skills/ratchet-loop/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ratchet Loop — the executor

You are executing a ratchet backlog. Your contract is forward motion only: an item is either done-verified-committed, or it is not done and the Ledger says exactly why. Nothing in between survives your run.

The backlog file is the single source of state. You are stateless; treat every run as if a different agent did the previous one (often true). Everything you learn that matters goes in the file, not in your head.

Load the executor rules first. Read executor-rules.md from this skill's own directory (the folder this SKILL.md lives in) before touching any item — 13 binding, do-this-exactly rules distilled from field runs. When a rule and your instinct disagree, follow the rule.

Invocation

/ratchet-loop [path] [--lane NAME] [--max-items N] [--only ID[,ID...]] [--verify inline|fresh] [--dry-run]
  • path — backlog file. Default: ratchet/BACKLOG.md, else BACKLOG.md at repo root. If neither exists, say so and suggest /ratchet-audit or /ratchet-backlog create. The resolved path is the backlog file everywhere below, and its containing directory is the loop's state directory (default ratchet/).
  • --lane NAME — v2 backlogs only (error on a v1 file): restrict eligibility to items with Lane: NAME and write state only to lanes/NAME.md. This is the parallel-safe mode — see "v2 backlogs — lanes" below. --lane is a state selector, not routing: it never satisfies the high-stakes gate's --only requirement.
  • --max-items N — stop after N items reach a terminal state this run.
  • --only — restrict eligibility to the listed IDs (dependencies still respected). Also the explicit-routing signal the high-stakes gate requires — see below.
  • --verify — verification mode, see "Verification modes" below. Default inline.
  • --dry-run — do Phase 0 only: validate, report the execution plan and any recovery a real run would perform, write and commit nothing.

The state file. Everywhere below, your ledger and journal writes go to the state file: in v1 that is the backlog file itself; in v2 it is your lane's file, lanes/<lane>.md, and the backlog file is read-only to you.

Read the full file on GitHub · 131 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 131 lines · 140 tokens per session scan A 245492ae7d72

Subscribe to this mod's changes

ratchet-loop is a skill published in the GitHub repository afrizzal/ratchet (6 stars, last pushed 1mo ago), licensed MIT. It adds 140 tokens to every session and 6,519 once invoked, about $0.0007 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

release

CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.

oliver-kriska/claude-elixir-phoenix · 60 tokens

catchup

Summarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.

oliver-kriska/claude-elixir-phoenix · 48 tokens

pr-review

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

oliver-kriska/claude-elixir-phoenix · 59 tokens

phx-pr-review

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

oliver-kriska/claude-elixir-phoenix · 61 tokens

watch-pr

Watch an Elixir/Phoenix PR with an Amp Orb keep-alive lease until required non-deployment CI is green and review threads are resolved. Use after opening or updating a PR.

oliver-kriska/claude-elixir-phoenix · 41 tokens

pr-workflow

Crear pull requests completas con descripcion, labels y reviewers.

686f6c61/alfred-dev · 14 tokens