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/grburgess/mindgap/loop-systemnpx skills add grburgess/mindgap --skill loop-systemgit clone --depth 1 https://github.com/grburgess/mindgapWhat 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.00219 | $0.02487 |
| Opus 5 | $0.00110 | $0.01243 |
| Sonnet 5 | $0.00044 | $0.00497 |
| Haiku 4.5 | $0.00022 | $0.00249 |
Grade B, and why
loop-system scanned grade B with 1 finding 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 yesterday.
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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
`<project>/.claude/settings.local.json` allowing exactly what the How it starts
The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loop System
Goal-driven loops: an independent verifier grades a maker's work against hard criteria, memory persists across manually-restarted sessions in markdown, lessons compound into skills. The model is stateless; this system isn't.
Dispatch — do this first
Scan self-learning-loop/*/STATE.md under the project root:
- None found → INIT.
- Exactly one → resume it — unless the user's prompt states a goal that does not match that loop's GOAL.md section 1; then INIT a new loop alongside it.
- Several → resume the one named in the user's prompt. Ambiguous →
list each loop (name + its
Last sessionline) and ask which.
INIT
- Interview for the hard gate. Skim references/lessons.md for
recorded misfires first. GOAL.md (templates/GOAL.md) has 7
required fields. Derive everything you can from the user's prompt
first; ask one question at a time only for what's missing. The loop
MUST NOT start until all 7 fields are filled — an unmeasurable
gate means the verifier can never return PASS and the loop burns
budget without converging.
- Done-criteria must be measurable and checkable by a verifier that sees only the artifact. "Make it better" is not a criterion.
- If the user can't supply a measurable criterion, propose a proxy: a verifier checklist of N observable properties. If they decline proxies too, refuse to loop — do the task one-shot and say why.
- Pick the engine per the decision rule in references/loop-patterns.md. Record choice + one-line reason in GOAL.md. Non-git project → note "no worktrees, sequential makers" in GOAL.md §7.
- Scaffold
self-learning-loop/<loop-name>/in the project root:<loop-name>= short kebab-case slug from the goal; offer the user the chance to rename.- Copy templates/GOAL.md and templates/STATE.md, fill every
{{field}}. Zero{{...}}may survive scaffolding. - Resolve §6 routing: ceiling = the current session model (auto-detected from the in-context "powered by …" line, never asked); classifier-block sibling = opus when the ceiling is fable, else none; seed the task-class list with kebab labels derived from §2 done-criteria. The only absolute model names written are the alias-ladder constant and the resolved sibling.
- Create empty
artifacts/dir.
- Optional project skill: if lessons will be procedural and
project-scoped, offer to create
<project>/.claude/skills/<loop-name>-lessons/SKILL.mdfrom templates/project-skill.md. Only with user approval. - Permissions (with user approval): unattended sessions stall on
permission prompts, so offer to write
<project>/.claude/settings.local.jsonallowing exactly what the loop needs — Edit/Write plus the specific Bash commands derived from GOAL.md's done-criteria checks and the project's build/test commands, e.g.:
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.
- yesterday First seen · 190 lines · 219 tokens per session scan B ab5cc2e06861
loop-system is a skill published in the GitHub repository grburgess/mindgap (0 stars, last pushed 1mo ago), licensed MIT. It adds 219 tokens to every session and 2,487 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…