iterative-loop

iterative-loop is a skill for Claude Code from jnPiyush/AgentX. It costs 44 tokens per session (3,915 once invoked), scanned A, original, Apache-2.0.

A repeat-and-check workflow for improving code or agent tasks over several passes. It includes TDD, where tests are written before implementation, followed by code changes and refactoring until defined checks pass.

In plain words
What is it for?
Use it for incremental features, refactoring, test-first development, and code generation with clear completion checks.
Why use it?
It turns large or uncertain tasks into smaller verified steps and helps catch mistakes during the work instead of at the end.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./.frontier/runtime/frontier.sh loop start \.

Good fit Use it for incremental features, refactoring, test-first development, and code generation with clear completion checks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jnPiyush/AgentX
agentmods
npx agentmods add skills/jnpiyush/agentx/iterative-loop

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnpiyush/agentx/iterative-loop"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/iterative-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,915 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 399
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00044 $0.03915
Opus 5.5 $0.00018 $0.01566
Sonnet 5.5 $0.00009 $0.00783
Haiku 4.5 $0.00004 $0.00392

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

Security

Grade A, and why

iterative-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 4d 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.

.github/skills/development/iterative-loop/SKILL.md · 421 lines

How it starts

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

Iterative Loop (Ralph Loop)

Purpose: Iterative self-referential refinement loops for AI agent tasks. Scope: Loop setup, completion criteria, progress tracking, self-correction patterns.

Test Execution Boundary

Quality loops and reviews MUST NOT launch test suites, coverage, mutation, property or fuzz runs, directly or through wrappers. Author and inspect tests; verify with appropriate build, typecheck, lint, syntax and schema checks. The canonical policy is .github/AGENT-PROTOCOL.md section 1.4.

After loop complete succeeds, the owning agent MUST ask, "Would you like to run the test suite now?" Identify the proposed scope and wait for explicit approval through the host's input tool/UI. No answer, dismissal or a decline means not run. If approved, run the selected suite as a separate verification task. A failure requires a new fix/review loop, not an automatic suite rerun.

CI/release gates and explicit standalone testing requests remain separate. Review approval never implies tests passed or coverage was measured.


When to Use This Skill

Applicability: AGENT-PROTOCOL.md section 1.1 (artifact/action, not role/keywords), then class minima.

  • Tasks requiring multiple passes to reach quality (implementation, refactoring)
  • Incremental feature building with verifiable milestones
  • Self-correcting code generation (write -> inspect/check -> fix -> review)
  • Any work with clear, machine-verifiable completion criteria
  • Greenfield implementations where autonomous iteration beats one-shot

When NOT to Use

  • Research/review-only/check/commit-only work and non-covered artifacts (section 1.1); delegates reuse the parent loop.

Prerequisites

  • Frontier CLI installed (.frontier/runtime/frontier.ps1 or .frontier/runtime/frontier.sh)
  • Clear completion criteria defined before starting
  • Non-test verification commands identified; proposed suites reserved for the post-loop offer

Rationalization Table

The loop is the gate, not a suggestion. Push back against these common ways of skipping it.

Read the full file on GitHub · 421 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. 4d ago Changed · +2 lines · +5 tokens per session 10149ec626a6
  2. 7d ago Changed · -115 lines · -29 tokens per session b0a93aa83887
  3. 20d ago Changed · +1 lines 81cb0691093e
  4. 23d ago Changed · -2 lines f81d878b20ad
  5. 1mo ago Changed 5b6405dac18e
  6. 1mo ago First seen · 535 lines · 68 tokens per session scan A 1b1eabf32e1f

Subscribe to this mod's changes

iterative-loop is a skill published in the GitHub repository jnPiyush/AgentX (16 stars, last pushed 3d ago), licensed Apache-2.0. It adds 44 tokens to every session and 3,915 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-03.