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/jun0-ds/sonmat/autoloopnpx skills add jun0-ds/sonmat --skill autoloopgit clone --depth 1 https://github.com/jun0-ds/sonmatWrote 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/jun0-ds/sonmat/autoloop)<a href="https://agentmods.dev/skills/jun0-ds/sonmat/autoloop"><img src="https://agentmods.dev/badge/skills/jun0-ds/sonmat/autoloop.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.00040 | $0.04850 |
| Opus 5 | $0.00020 | $0.02425 |
| Sonnet 5 | $0.00008 | $0.00970 |
| Haiku 4.5 | $0.00004 | $0.00485 |
Grade A, and why
autoloop 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 — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Autoloop — Autonomous Loop Protocol
0. Entry Routing
On receiving a task, judge complexity:
| Signal | L0 (direct) | Full loop |
|---|---|---|
| Files to modify | 1 | Multiple |
| Iteration needed | One-shot | Expected |
L0: Skip planning questions and definition. Apply core.md + hints.md → execute → verify → done. Escalate to full loop if a trigger fires.
Full loop: Proceed to section 1.
Bridge-note check: Before starting any task, check if the sonmat bridge note exists (bridge-note.md in $SONMAT_PROJECTS_BASE/<slug>, default ~/.sonmat/projects/<slug>/ where <slug> is the cwd path with /→-; legacy .claude/sonmat/ as fallback). If relevant context is found, incorporate it silently. Mention to user only if directly relevant to the new task.
1. Planning Questions
When no loop definition exists, build one through conversation. Ask 2-3 at a time, not all at once.
Required Questions
| # | Question | Collects |
|---|---|---|
| 1 | What is the end goal? | loop.name + objective |
| 2 | Which files/scope to modify? | loop.modify |
| 3 | How to run after modification? | loop.run |
| 4 | How to evaluate results? | loop.evaluate |
| 5 | Keep/discard/refine criteria? | loop.judge |
| 6 | Constraints? (off-limits files, time, preservation zones) | loop.constraints |
| 7 | When to stop? | loop.exit |
Skip rules
- Already answered in task description → fill without asking.
- Clearly inferable from context → fill without asking.
- At minimum, secure
modify,run,evaluate.
Confirmation
Show the loop definition YAML and get user approval before starting. For L0 tasks: one-line summary suffices — "Proceeding like this: [summary]. Object if not."
2. Loop Protocol
[Plan] → [Define] → [Execute] → [Evaluate] → [Judge] → [Record] → [Repeat/Exit]
[Plan]
- No definition → run section 1 questions.
- Has definition → proceed to [Define].
- Milestone-scale planning → escalate to L3 (see below).
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 · 375 lines · 40 tokens per session scan A fc20a77d2743
autoloop is a skill published in the GitHub repository jun0-ds/sonmat (6 stars, last pushed 6d ago), licensed BSD-3-Clause. It adds 40 tokens to every session and 4,850 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.
Other skills, from other repositories
auto-review-loop
Autonomous multi-round research review loop. In Copilot CLI it defaults to the native complementary rubber-duck subagent with host-event model evidence; elsewhere it uses Codex, while explicit external reviewer overrides remain available. Implements fixes and re-reviews until a policy-approved positive assessment or…
proof-checker
Rigorous mathematical proof verification and fixing workflow. Reads a LaTeX proof, identifies gaps via cross-model review (external reviewer backend, ultra reasoning), fixes each gap with full derivations, re-reviews, and generates an audit report. Use when user says "检查证明", "verify proof", "proof check", "审证明"…
auto-paper-improvement-loop
Autonomously improve a generated paper via GPT-5.6-Sol xhigh review → implement fixes → recompile, for 2 rounds. Use when user says "改论文", "improve paper", "论文润色循环", "auto improve", or wants to iteratively polish a generated paper.
citation-audit
Zero-context verification that every bibliographic entry in the paper is real, correctly attributed, and used in a context the cited paper actually supports — catching hallucinated authors, wrong years, fabricated venues, version mismatches, and wrong-context citations. Use when user says "审查引用", "check citations"…
grant-proposal
Draft a structured grant proposal from research ideas and literature. Supports KAKENHI (Japan), NSF (US), NSFC (China, including 面上/青年/优青/杰青/海外优青/重点), ERC (EU), DFG (Germany), SNSF (Switzerland), ARC (Australia), NWO (Netherlands), and generic formats. Use when user says "write grant", "grant proposal", "申請書", "write…
idea-creator
Generate and rank research ideas given a broad direction. Use when user says "找idea", "brainstorm ideas", "generate research ideas", "what can we work on", or wants to explore a research area for publishable directions.