double-loop

double-loop is a skill for Claude Code, Codex from jxoesneon/Ciel. It costs 60 tokens per session (987 once invoked), scanned A, original, Apache-2.0.

A two-level coordination method for large software worklists. A supervisor divides work into separate packets, assigns them to temporary workers, independently checks their results, and replans when new evidence changes the situation.

In plain words
What is it for?
It is for dividing many implementation tasks, assigning file ownership, running workers in parallel, verifying their results, issuing corrections, and integrating completed work.
Why use it?
It helps manage work that is too large for one agent or one context while reducing conflicts between workers editing overlapping files. Failed work can be corrected rather than accepted on the worker's claim alone.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit It is for dividing many implementation tasks, assigning file ownership, running workers in parallel, verifying their results, issuing corrections, and integrating completed work.

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

Made for: Claude Code, Codex.

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 double-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/jxoesneon/ciel/double-loop/github.svg)](https://agentmods.dev/skills/jxoesneon/ciel/double-loop)
Your own site
<a href="https://agentmods.dev/skills/jxoesneon/ciel/double-loop"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/double-loop/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 double-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/jxoesneon/ciel/double-loop"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/double-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 987 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.00060 $0.00987
Opus 5.5 $0.00024 $0.00395
Sonnet 5.5 $0.00012 $0.00197
Haiku 4.5 $0.00006 $0.00099

Measured 24d ago against content hash 71f74b8bd89e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

double-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 24d 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/double-loop/SKILL.md · 59 lines

How it starts

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

CIEL ADAPTATION: Double Agentic Loop

Two nested loops on different cadences, separated by a single structured channel:

  • Outer loop (Supervisor — this session): decomposes the goal into file-disjoint Work Packets, maintains the slot pool, independently verifies every returned result (never accepts the worker's own say-so), issues Correction Packets on failure, and replans when mid-run evidence changes the picture. The outer loop holds all global state: the worklist, the file-ownership map, the integration order.
  • Inner loop (Worker — one ephemeral subagent per packet): runs its own tool-use loop on exactly one packet — implement, self-verify, report a Structured Result. The inner loop holds only local state. It never sees the whole plan.

The loops are connected by two channels only: the packet going down, and the structured result coming up. The interrupt channel is the worker's BLOCKED/NEEDS_CONTEXT report plus the supervisor's own file-state reads.

The Core Protocol

Pre-dispatch hooks (run once per activation)

  1. Worklist freeze: enumerate every open item; assign each a stable WP id.
  2. File-ownership map: for every WP, list the exact files it may touch. Two WPs may not run concurrently if their file sets intersect. Shared files force sequencing or merging into one WP.
  3. Tree-state check: git status clean or accounted-for; note in-flight work from other sessions and route around it.
  4. Wave plan: order WPs so sweeping refactors (cross-cutting type/DI changes) run LAST, serially, after all localized packets land.

Per-packet hooks

  • Packet author hook: every packet carries — scope, exact target files, acceptance criteria, evidence citations (file:line), commit-message convention, and the "NO PUSH / NO unrelated files" rule. Pass only what the worker needs.
  • Completion hook (mandatory independent verification): on each worker return —
    1. git log/git diff — the commit exists and touches ONLY the packet's files.
    2. Run the packet's own verification evidence (the tests it claims) — spot-run them yourself; do not trust the report alone.
    3. Confirm acceptance criteria against the actual diff.
    4. Close the tracked issue with a resolution comment citing the commit.
    5. Then — and only then — hot-swap the freed slot to the next packet.
  • Failure hook: on BLOCKED/test failure/partial work — diagnose from the diff, author a Correction Packet (narrow, specific, referencing the failing evidence), re-dispatch the SAME slot. Never let a failed packet silently drop.
  • Integration hook: after each wave, run the affected test files together and dart analyze (or project equivalent) across the union of changed files — cross-packet conflicts surface here, not in the worker loops.

Read the full file on GitHub · 59 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. 24d ago First seen · 59 lines · 60 tokens per session scan A 71f74b8bd89e

Subscribe to this mod's changes

double-loop is a skill published in the GitHub repository jxoesneon/Ciel (1 stars, last pushed today), licensed Apache-2.0. It adds 60 tokens to every session and 987 once invoked, about $0.0002 per session on Opus 5.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-09-24.

Related

Other skills, from other repositories