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/frankxai/claude-skills-librarynpx agentmods add skills/frankxai/claude-skills-library/loop-designerWrote 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/frankxai/claude-skills-library/loop-designer)<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/loop-designer"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/loop-designer/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/frankxai/claude-skills-library/loop-designer"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/loop-designer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00106 | $0.03177 |
| Opus 5.5 | $0.00042 | $0.01271 |
| Sonnet 5.5 | $0.00021 | $0.00635 |
| Haiku 4.5 | $0.00011 | $0.00318 |
Grade A, and why
loop-designer 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.
How it starts
The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loop Designer
You are compiling a loop, not writing a prompt. A prompt asks an agent to do something once; a loop is a durable program — goal, state, iteration discipline, verification, and exit conditions — stored in files so that any agent can pick it up cold, run exactly one iteration, and leave it resumable. The agent is the interpreter; the loop is the program. Design accordingly: everything that matters must survive a context wipe.
Trigger Boundaries
- Activate when: Converting a recurring or multi-iteration objective into a file-backed
.loop/<name>/contract (LOOP.md,state.json,backlog.md,signs.md,runs.jsonl), defining ratchet metrics, budgets, independent verifier gates, or stall/escalation triggers. - Do NOT activate when: Executing a one-shot task that fits in a single session, or when no mechanically checkable
Done-whenpredicate exists (fix verifiability first).
The compilation pipeline
Work through these six steps in order. Steps 1–3 are thinking; 4–6 emit files.
1. Extract the invariant goal
Interview the user (or the task description) until you can state:
- Goal — one sentence, outcome-shaped, stable across weeks ("all 40 hub pages pass the a11y audit", not "work on a11y").
- Done-when — a mechanically checkable predicate. If you cannot express done-when as a command, script, or countable file state, the loop is not designable yet; push back and narrow the goal.
- Never-do — the guardrail list (no deploys, no sends, no deletes, no spend, no force-push…). Inherit the repo's hard stops; add loop-specific ones.
2. Pick the archetype
Match against the taxonomy in references/archetypes.md (read it now). Summary:
| Archetype | Core mechanic | Terminates? |
|---|---|---|
| backlog-drain | pick top item → do → verify → strike through | yes — backlog empty |
| ratchet-climb | move one metric monotonically; revert regressions | yes — target reached |
| red-green | write failing test → make it pass → refactor | yes — spec covered |
| watch-and-report | read-only scan → diff vs last state → report | no — runs on cadence |
| evaluate-optimize | generate → judge against rubric → keep best → retry | yes — rubric satisfied |
| babysitter | poll external state (CI/PR) → kick until terminal | yes — merged/green |
| pipeline | stage N's output is stage N+1's input, each gated | yes — final gate passes |
What ships with it
6 files 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.
- 2d ago Changed · +79 lines 2aadb1ce1629
- 1mo ago First seen · 91 lines · 106 tokens per session scan A 0af939b7474c
loop-designer is a skill published in the GitHub repository frankxai/claude-skills-library (47 stars, last pushed today), licensed MIT. It adds 106 tokens to every session and 3,177 once invoked, about $0.0004 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
token-saver
Token optimization guide for Claude Code. This skill should be used when the user wants to reduce API costs, learn model routing strategies, or understand how to use free/cheaper tools (Ollama, Haiku) instead of burning expensive Claude tokens on routine tasks. Triggers on: save tokens, reduce costs, token tips, cheap…
wayfinder
A planning method that maps a large, uncertain project into linked decision tickets in a repository's issue tracker. An issue tracker is a system for recording and organizing project work.
scaffold-exercises
A directory scaffold for course exercises, with sections, exercise folders, and optional problem, solution, or explanation versions. It creates the required Markdown files and checks the result with the repository's linter.
domain-modeling
A practice for building and maintaining a project’s domain model: the shared terms, concrete scenarios, and recorded architecture decisions that describe what the software is about.
migrate-to-shoehorn
A testing guide for Shoehorn, a TypeScript library that lets tests provide only the fields they need from a larger data type.
ask-matt
A skill router that helps choose the right workflow or skill for the current task. It maps work from an initial idea through building and shipping, with separate paths for research, prototypes, and multi-session projects.