loop

loop is a skill for Claude Code, Codex from ZaxbyHub/opencode-swarm. It costs 72 tokens per session (3,756 once invoked), scanned A, original, MIT.

A repeatable software-development workflow that moves through brainstorming, planning, implementation, review, and improvement in separate stages.

In plain words
What is it for?
Running multi-step coding tasks, coordinating delegated work, reviewing results, and recording lessons for later cycles.
Why use it?
It gives large tasks checkpoints and independent review so mistakes are caught before the work is considered finished.

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/zaxbyhub/opencode-swarm/loop
Any agent
npx skills add ZaxbyHub/opencode-swarm --skill loop
Clone the repo
git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm

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 loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/zaxbyhub/opencode-swarm/loop.svg)](https://agentmods.dev/skills/zaxbyhub/opencode-swarm/loop)
Your own site
<a href="https://agentmods.dev/skills/zaxbyhub/opencode-swarm/loop"><img src="https://agentmods.dev/badge/skills/zaxbyhub/opencode-swarm/loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,756 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.00072 $0.03756
Opus 5 $0.00036 $0.01878
Sonnet 5 $0.00014 $0.00751
Haiku 4.5 $0.00007 $0.00376

Measured today against content hash 0de4c65d03e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 today.

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.

.opencode/skills/loop/SKILL.md · 323 lines

How it starts

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

Compound-Engineering Loop Protocol

MODE: LOOP runs an objective end to end as a series of gated phases, then loops to compound improvements until the objective is met or a stop condition fires. Each cycle reuses the existing mode skills (brainstorm, plan, critic-gate, execute, phase-wrap) and ends with a learning-capture step so the next cycle is cheaper — that is what makes the loop compounding rather than merely repeating.

This is a real implementation workflow: it delegates to the coder, declares scope, and mutates source code through the normal EXECUTE path. It is distinct from full-auto (a critic gate via the critic_oversight agent that intercepts phase completions and high-risk actions for review — full-auto never plans, delegates, or executes; the architect retains ALL delegation duty) and turbo (parallel lanes within a single phase). LOOP is a user-initiated, gated, sequential, compounding workflow.

The two design rules that everything below serves:

  1. Separate the generator from the verifier. The context that writes a change must never be the only context that approves it. Implementation, independent review, and critic challenge live in separate delegated contexts. Review is report-only; a distinct fix step applies changes.
  2. Stop on positive evidence or a budget — never on vibes. Every phase has an entry gate and an exit gate backed by concrete evidence, and the loop has layered stop conditions so it can never run away.

Step 0 — Parse Header

Parse the [MODE: LOOP ...] header to extract:

  • objective: the goal text after the header (the WHAT to achieve). Empty only when resume=true.
  • max_cycles: integer 1..5 (default 3) — hard cap on outer improvement cycles.
  • autonomy: auto (default) or checkpoint.
    • auto: proceed across gates without prompting, but still enforce every hard stop condition and the mandatory review/critic gates.
    • checkpoint: pause at each phase gate and wait for explicit user approval before continuing.
  • depth: standard (default) or exhaustive (wider exploration in BRAINSTORM and PLAN: more candidate approaches, deeper localization).
  • resume: true | false. When true, resume the existing run from durable state instead of starting a new objective.

Read the full file on GitHub · 323 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. today Changed 0de4c65d03e4
  2. yesterday First seen · 323 lines · 72 tokens per session scan A 98c44e8e2d99

Subscribe to this mod's changes

loop is a skill published in the GitHub repository ZaxbyHub/opencode-swarm (464 stars, last pushed today), licensed MIT. It adds 72 tokens to every session and 3,756 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-09-03.

Related

Other skills, from other repositories

ux-create-manifest

Create the initial Product UX Bible for an existing web or full-screen web app by deeply auditing the repository, using sub-agents when available, and generating docs/ux manifests, schemas, budgets, surface maps, action taxonomy, and design-token policies from observed code.

h0x91b/dev-3.0 · 58 tokens

ux-principal

Principal UX architect skill for deciding WHERE a UI feature belongs, before it is implemented. Reads and maintains docs/ux manifests, classifies the feature, decides placement, navigation, surface, action hierarchy and complexity budgets, and produces a precise implementation brief without coding unless explicitly…

h0x91b/dev-3.0 · 87 tokens

verify-changes

How to test and verify work in the dev-3.0 repo — which vitest config covers what, how to write a test that fits the house style, mocking Electrobun RPC and i18n providers, what coverage is actually expected, and the browser QA hand-off. Use when writing or fixing tests, deciding what a change needs covered, hitting a…

h0x91b/dev-3.0 · 124 tokens

debug-ui

Drive and visually QA the dev-3.0 UI in a real browser (headless Chromium via agent-browser). Use when verifying a UI/UX change, reproducing a visual bug, taking screenshots of the running app, or self-QA before review. Triggers — "check the UI", "screenshot the app", "does this render", "QA this screen", "verify the…

h0x91b/dev-3.0 · 93 tokens

full_unpackd_rep

Use when the task is to unpack a local reference repository into a Chinese structural topic page, update site navigation, stamp dates, and leave behind a reusable deconstruction note for the repo.

Harzva/learn-likecc · 42 tokens

gen-zhihu-article

Generate Zhihu article in the style of 22-庖丁解牛专题页-知乎图文终版.md.

Harzva/learn-likecc · 32 tokens