backlog-loop

A workflow for taking one task from a backlog—a prioritized list of unfinished work—and iterating on it until another AI reviewer confirms it is complete.

In plain words
What is it for?
Use it to select the next task or a specified task, implement it, run checks, have a Judge review the result, and fix remaining problems within a set number of iterations.
Why use it?
It reduces the risk of stopping after an incomplete implementation by requiring verification, review, fixes, and another review for the same task.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/mazen160/backlog/backlog-loop
Any agent
npx skills add mazen160/backlog --skill backlog-loop
Clone the repo
git clone --depth 1 https://github.com/mazen160/backlog

Made for: Claude Code, Codex.

Per session 133 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,687 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00133 $0.05687
Opus 5 $0.00067 $0.02844
Sonnet 5 $0.00027 $0.01137
Haiku 4.5 $0.00013 $0.00569

Measured 2d ago against content hash da77d4c69358, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backlog-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 2d 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/backlog-loop/SKILL.md · 511 lines

How it starts

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

backlog-loop

One task in. Iterate until a skeptical Judge says it's actually done. Exit.

The name is a callback to the Ralph loop: the loop is on a single task — implement → verify → judge → fix → re-judge — bounded by a max iteration count. This skill never picks up a second task.

Requires: the backlog skill

Load skills/backlog/skill.md first. It is the canonical reference for every CLI flag, command, ID format (TASK-N / bare integer / ULID), JSON shape, and enum value. This skill assumes you know how to drive the CLI.

In this repo, always pass --profile default (per docs/CLAUDE/MEMORY.mdgo test can pollute the profile registry) and --as ai:claude-opus-4-7 (or the current model's exact ID) on every write.

Invocation

/backlog-loop <project>          # pull next todo task from <project>, iterate to done, exit
/backlog-loop <project> <ref>    # work a specific task (TASK-N, bare integer, or ULID)
/backlog-loop help               # print the headless-execution help and exit

If the user omits <project> (and didn't pass help), list available projects and ask which one — do not guess:

./backlog --profile default project list --json

If the user passes help, jump to the Headless execution section below, print it, and exit. Do not pick up a task.

Hard rules

  • One task only. The skill never moves to a second task. The user invokes it again if they want more.
  • Mandatory Judge gate. The task only moves to done after a [JUDGE RECEIPT] says PASS. The implementing agent never self-marks done.
  • Max 5 attempts. Implement → verify → judge counts as one attempt. After 5 failed Judge verdicts, stop and mark the task blocked with a full diagnosis.
  • Never expand scope silently. Work discovered mid-execution that's outside the task → new task, not silent expansion of this one.
  • Always attribute writes. --as ai:claude-opus-4-7 on every write.
  • Always --profile default in this repo.

Read the full file on GitHub · 511 lines

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. 2d ago First seen · 511 lines · 133 tokens per session scan A da77d4c69358

Subscribe to this mod's changes

backlog-loop is a skill published in the GitHub repository mazen160/backlog (15 stars, last pushed 1mo ago), licensed MIT. It adds 133 tokens to every session and 5,687 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-30.

Related

Other skills, from other repositories

team-workflow

Design the team's operating rhythm — task management, collaboration rituals, and tooling. Use when the day-to-day cadence needs structure. For a time-boxed sprint, use design-sprint-plan.

Owl-Listener/designer-skills · 43 tokens

importing-a-codebase

Use when the repo holds real source code but no specs: the existing-codebase branch of setting-up-a-project, normally reached via that dispatcher, directly only when the situation is unmistakable. Not for empty workspaces (starting-a-new-project) or feature work in a specced project (brainstorming).

JetBrains/thinkrail · 69 tokens

starting-a-new-project

Use when the workspace is empty — no code yet — and the user brings a raw idea: the brand-new branch of setting-up-a-project, normally reached via that dispatcher, directly only when the situation is unmistakable. Not for features in an existing project — use brainstorming instead.

JetBrains/thinkrail · 61 tokens

todos

This chat has a shared, live TODO plan — your tasks for the conversation, which the user also edits. Read this skill and reach for the todo tools whenever a request takes more than a couple of steps. It covers the plan model (group = task, items = its steps; loose items are the user's lane), how to work it: propose…

JetBrains/thinkrail · 127 tokens

writing-workflow-skills

Use when adding a new workflow skill to pi-thinkrail-workflow, changing an existing workflow skill's role, trigger, handoff, or structure, or checking a workflow skill against the workflow system's rules. Not for authoring general-purpose skills outside this package.

JetBrains/thinkrail · 60 tokens

brainstorming

Use this BEFORE any creative or feature work: building a new feature, adding functionality, changing behavior, or making a nontrivial design decision. Turns the user's request into a validated design — recorded as a spec-graph task-spec — before any implementation. Do not skip this because a change looks small.

JetBrains/thinkrail · 65 tokens