use-loop

A repeatable work loop for implementation, product, quality assurance, cleanup, refactoring, evaluation, performance, or research tasks. It continues trying toward a measurable result and checks the result with a defined verifier.

In plain words
What is it for?
Run repeated implementation or investigation attempts, verify each result with tests or other evidence, keep state across attempts when needed, and stop when the target is met or a real blocker is found.
Why use it?
Long or iterative tasks can stop after an unverified attempt or lose track of what counts as success. This workflow sets a goal, baseline, proof method, and stopping conditions.

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

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 629 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.00067 $0.00629
Opus 5 $0.00034 $0.00315
Sonnet 5 $0.00013 $0.00126
Haiku 4.5 $0.00007 $0.00063

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

Security

Grade A, and why

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

skills/use-loop/SKILL.md · 61 lines

How it starts

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

Use Loop

Turn the request into one measurable goal, start the host's real goal-continuation mechanism, and keep working until verified or genuinely blocked.

Start

Before changing anything, establish:

  • Goal: the specific outcome.
  • Target: the observable success condition.
  • Verifier: the exact command, test, metric, tool, or product surface.
  • Access: tools, runtime, credentials, data, and continuation mechanism.
  • Baseline: current state when measurable.
  • Stop conditions: success, blocker, decision gate, stalled progress, or budget.

Use self-test to choose the highest-signal proof path. If the repo lacks a reasonable proof lane, add the smallest repeatable one as part of the work. If the target cannot be reached, report the exact blocker rather than silently weakening proof.

Start /goal or the available goal tool after these controls are clear. Create a goal only for an explicit loop request or when the surrounding system instructions authorize it.

Read references/state-and-artifacts.md when the loop will span many attempts, needs a durable ledger, or requires visual proof.

Iterate

  1. Establish or confirm the baseline.
  2. Make one coherent attempt.
  3. Measure it with the declared verifier.
  4. Keep improvements; discard or revise regressions.
  5. Record only the state needed to resume reliably.
  6. Continue until a stop condition is met.

The target remains the source of truth. Do not weaken or replace it without human approval when that changes the requested outcome.

Surface only blockers, consequential decisions, surprising results, or useful progress changes while the loop runs. Do not narrate routine attempts.

Decision Gates

Pause for product judgment, destructive actions, publishing, deployment, credential use, meaningful scope expansion, or ambiguous trade-offs. Ordinary implementation and verification steps continue autonomously.

Gotchas

  • Do not call a one-shot attempt a loop; use the host continuation mechanism.
  • Do not rely on intention or chat history as proof.
  • Do not keep a worse attempt merely because work was invested in it.
  • Do not confuse a stopped loop with a successful loop.
  • Do not replace real-surface verification with internal tests when the changed contract is user-visible.
  • Do not create scheduled follow-up automation unless the task explicitly owns ongoing monitoring.

Read the full file on GitHub · 61 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. 2d ago First seen · 61 lines · 67 tokens per session scan A 41f98b88be74

Subscribe to this mod's changes

use-loop is a skill published in the GitHub repository minghinmatthewlam/agent-guards (36 stars, last pushed 14d ago), licensed MIT. It adds 67 tokens to every session and 629 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

hr-onboarding

A new-hire onboarding plan as a single page — first week schedule, buddy + manager intro, learning track, equipment checklist, and "you're set when…" outcomes. Use when the brief mentions "onboarding", "new hire", "first week plan", or "入职".

nexu-io/open-design · 62 tokens

lark-im

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。.

larksuite/cli · 140 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

reflect

Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.

alvinunreal/oh-my-opencode-slim · 53 tokens

mochi-remind

Handle due reminders — notify the user with natural language and mark them done.

kirodotdev/KiroCrew · 20 tokens

organize-threads

猫猫辅助整理未分类 thread,分析标题和元数据,建议合适的标签。 Use when: 用户说"帮我整理"、"分类 thread"、点击整理按钮。 Not for: 删除/编辑标签本身。 Output: 按 thread 的标签建议列表。.

zts212653/clowder-ai · 65 tokens