loop-implement-test-fix

A bounded work loop makes a small code change, runs relevant tests, fixes failures, and repeats for up to three rounds.

In plain words
What is it for?
Taking a focused coding task from implementation through testing and limited repair.
Why use it?
It prevents endless attempts by stopping when checks pass, nothing changed, or the same failure appears twice. Each round requires human approval before changes or other sensitive actions.

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/jsuvic/agent-profile/loop-implement-test-fix
Any agent
npx skills add jsuvic/agent-profile --skill loop-implement-test-fix
Clone the repo
git clone --depth 1 https://github.com/jsuvic/agent-profile

Made for: Claude Code, Codex.

Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 361 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.00035 $0.00361
Opus 5 $0.00017 $0.00180
Sonnet 5 $0.00007 $0.00072
Haiku 4.5 $0.00003 $0.00036

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

Security

Grade A, and why

loop-implement-test-fix 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.

fixtures/automation-pack-enabled/expected/.agents/skills/loop-implement-test-fix/SKILL.md · 42 lines

What it actually says

Loop: Implement, Test, Fix

Drive a small implementation to green through a bounded number of iterations. Each iteration makes one focused change, runs the relevant checks, and reacts to the result.

Loop Steps

  1. Implement the smallest change that moves the task toward its acceptance criteria.
  2. Prove the change with a focused test first; run tdd-change for the red/green discipline.
  3. Run the narrowest relevant test or check command and read the result.
  4. If it fails, apply one focused fix and continue to the next iteration.

Max Iterations

The loop runs at most 3 iterations. When it reaches 3 iterations without meeting a stop condition, it stops unconditionally and reports the unfinished state and the outstanding work; it never raises the bound to keep going.

Stop Conditions

Stop the loop as soon as any of these holds:

  • The relevant tests and checks are green.
  • An iteration produces no diff.
  • The same failure repeats identically across two consecutive iterations.

Approval Gate

  • Get explicit human approval before any write, commit, or destructive step in each iteration.
  • The loop never self-approves, never continues past the iteration bound, and never runs destructive commands on its own authority.
  • Pause and surface the state whenever approval is missing.

Safety

  • Do not upload source code.
  • Do not read or print secrets.
  • APC does not run this loop; a human or agent follows these instructions and remains in control.
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 · 42 lines · 35 tokens per session scan A 9204736d89ea

Subscribe to this mod's changes

loop-implement-test-fix is a skill published in the GitHub repository jsuvic/agent-profile (3 stars, last pushed 9d ago), licensed Apache-2.0. It adds 35 tokens to every session and 361 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

lanshu-create-ai-presenter-video

Turn a topic or finished script plus an authorized adult presenter image into a complete, publish-ready AI presenter video. Use for new presenter videos and for continuing, revising, captioning, lip-sync repairing, or re-exporting an existing presenter-video job. Keep model and provider selection capability-based and…

cclank/lanshu-create-ai-presenter-video · 75 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens

xiaobei-skill-rebuild-image-in-powerpoint

Use when a user wants Codex to directly operate PowerPoint and reconstruct an entire reference image as editable PowerPoint objects while preserving its full layout, labels, connectors, and visual relationships. Do not use for paper-to-deck generation or VBA-only output.

xiao24bei/xiaobei-skill · 62 tokens

xiaohongshu-magazine

《小红书运营手册 · AI工作台》杂志感选题库技能。用于用户想把小红书账号当成一本杂志来办、确定内容母题(刊魂)、设计固定栏目、用开枝散叶方法批量生成选题、区分账号围绕业务还是围绕个人 IP、让每一篇都在攒信任或攒喜欢、或搭建可长期复用的选题库时触发。输入可以是账号定位、目标用户、产品或服务、个人经历和已有素材。输出母题、栏目结构、按信任和喜欢分类的选题库、每根栏目的角度公式和优先级建议。它负责战略层选题库,日历和系列排期交给 xiaohongshu-topic-planner。.

mengke-wang/xiaohongshu-ai-workbench · 184 tokens

xiaohongshu-conversion-path

《小红书运营手册 · AI工作台》成交路径设计技能。用于用户想把小红书内容、主页承接、置顶笔记、评论区、私信和产品/服务转化串起来时触发,重点处理从刷到内容到私信、预约、购买、体验、反馈或成交的路径。适合服务号、产品号、个人 IP、自由职业者和小程序推广。输入可以是账号定位、产品/服务、客单价、用户顾虑、当前内容和转化目标。输出内容分工、信任路径、私信筛选和成交动作。若用户只想改简介、看主页第一眼或优化置顶表达,应使用 xiaohongshu-profile。.

mengke-wang/xiaohongshu-ai-workbench · 168 tokens

xiaohongshu-profile

《小红书运营手册 · AI工作台》主页体检和简介改写技能。用于用户想优化主页第一眼、账号简介、昵称、头像描述、置顶笔记、信任感和定位表达时触发。输入可以是主页截图描述、昵称、简介、置顶笔记、账号定位、产品/服务和目标用户。输出主页诊断、问题优先级、简介改写和置顶建议。若用户重点询问内容到私信、购买、预约、体验或成交路径,应使用 xiaohongshu-conversion-path。.

mengke-wang/xiaohongshu-ai-workbench · 131 tokens