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.
git clone --depth 1 https://github.com/jnPiyush/AgentXnpx agentmods add skills/jnpiyush/agentx/iterative-loopWrote 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.
[](https://agentmods.dev/skills/jnpiyush/agentx/iterative-loop)<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.
<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>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once 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 |
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.
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.ps1or.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.
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.
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.
- 4d ago Changed · +2 lines · +5 tokens per session 10149ec626a6
- 7d ago Changed · -115 lines · -29 tokens per session b0a93aa83887
- 20d ago Changed · +1 lines 81cb0691093e
- 23d ago Changed · -2 lines f81d878b20ad
- 1mo ago Changed 5b6405dac18e
- 1mo ago First seen · 535 lines · 68 tokens per session scan A 1b1eabf32e1f
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.
Other skills, from other repositories
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
conductor-implement
Execute tasks from a track's implementation plan following TDD workflow.
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.
iterative-development
TDD iteration loops using Claude Code Stop hooks - runs tests after each response, feeds failures back automatically.
python
Python development with ruff, mypy, pytest - TDD and type safety.
tdd
This skill should be used when the user wants to implement features or fix bugs using test-driven development. Enforces the RED-GREEN-REFACTOR cycle with vertical slicing, context isolation between test writing and implementation, human checkpoints, and auto-test feedback loops. Uses multi-agent orchestration with the…