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.
npx agentmods add skills/joris887/exosuit/refine-loopnpx skills add joris887/exosuit --skill refine-loopgit clone --depth 1 https://github.com/joris887/exosuitWrote 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/joris887/exosuit/refine-loop)<a href="https://agentmods.dev/skills/joris887/exosuit/refine-loop"><img src="https://agentmods.dev/badge/skills/joris887/exosuit/refine-loop.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01430 |
| Opus 5 | $0.00000 | $0.00715 |
| Sonnet 5 | $0.00000 | $0.00286 |
| Haiku 4.5 | $0.00000 | $0.00143 |
Grade A, and why
refine-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 3d 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 — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
refine-loop
Refining: $ARGUMENTS
Argument Parsing
| Argument | Required | Default | Description |
|---|---|---|---|
<task> |
Yes | - | What to produce or improve |
--until "<criteria>" |
Yes | - | Completion condition (must be verifiable) |
--max <N> |
No | 5 (50 if --autonomous) |
Maximum iterations before stopping |
--autonomous |
No | false | Extended unattended mode: higher iteration cap, TSV logging, diminishing-returns auto-stop |
Failure State Persistence
At loop entry, write docs/sessions/.failure-state.md with YAML frontmatter so the Stop hook and /continue can programmatically detect incomplete workflows.
At loop entry (before first execution):
---
status: active
skill: refine-loop
phase: "1"
phase_name: "Initial Execution"
started_at: "[ISO-8601 timestamp from date -u +%Y-%m-%dT%H:%M:%SZ]"
story: "[from $ARGUMENTS — the task description]"
branch: "[from git branch --show-current]"
next_action: "Execute task and produce first draft"
autonomous: [true|false]
files_modified: []
---
## Context
Task: [task description]
Criteria: [completion criteria]
Iteration: 1 of [max]
Mode: [standard | autonomous]
At each iteration: Update phase to the iteration number, phase_name to "Iteration N", next_action to the specific improvement being applied, and append to files_modified. Update the Context section with iteration progress and remaining gaps.
When criteria are met (or max iterations reached): Delete .failure-state.md — clean state means no failure to recover from.
Process
1. Initial Execution
Execute the task to produce the first draft/version.
If --autonomous: Initialize the iteration log file:
docs/sessions/.refine-log.tsv:
iteration criteria_met criteria_total gap_description action_taken timestamp
0 0 <total> Initial execution Produced first draft <ISO-8601>
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.
- 3d ago First seen · 162 lines · 0 tokens per session scan A 1445e64c5480
refine-loop is a skill published in the GitHub repository joris887/exosuit (4 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,430 tokens. 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.
Other skills, from other repositories
moai-workflow-docs-claim-check
Read-only check of whether the claims a public-facing document makes (README, release notes, install and usage guides) are supported by user-supplied evidence. Runs Preflight, Claim Triage, and Validation, splits composite claims into atomic ones, and labels each. Runs no commands and writes no fixes.
moai-ref-seo
Search-visibility and crawlability reference for web output: canonical URL discipline, per-page title and meta description uniqueness, robots.txt and sitemap.xml as host-derived artifacts, JSON-LD structured data with entity consistency, and the document-semantics rules that decide whether a machine can read a page at…
moai-workflow-project
Integrated project management system covering documentation, language initialization, template optimization, docs generation, and JIT document loading. Absorbed from moai-workflow-templates, moai-docs-generation, and moai-workflow-jit-docs.
truthmark-document
Use when the user asks to document existing implemented behavior, or Sync, Check, or Structure finds implemented behavior missing canonical truth. Not for functional-code changes, doc-first implementation, or topology repair that needs Structure.
doncheli-prd
Generate professional Product Requirement Documents (PRD) from multiple sources — Figma designs, briefs, user research, existing code. Includes risk analysis, RICE prioritization, Gherkin stories and launch plan. Activate when user mentions "PRD", "product requirements", "requirement document", "product spec", "figma…
doncheli-data-policy
Audit and document what personal or sensitive data the project collects, processes, and stores. Activate when user mentions "privacy", "data policy", "what data", "GDPR", "personal data", "data retention", "PII".