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/joymin5655/agent/loopnpx skills add joymin5655/Agent --skill loopgit clone --depth 1 https://github.com/joymin5655/AgentWhat 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.00103 | $0.01223 |
| Opus 5 | $0.00051 | $0.00611 |
| Sonnet 5 | $0.00021 | $0.00245 |
| Haiku 4.5 | $0.00010 | $0.00122 |
Grade A, and why
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 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.
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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/loop
Goal
Run a mission as a bounded series of attempts: pick one idea, make exactly
one change, grade it, keep or discard, and stop at a hard cap, a per-attempt
timeout, or two consecutive GATE failures (circuit breaker) — never on trust
alone. All mechanical enforcement (state, ledger, cap, breaker) lives in
core/infra/loop-run.sh; this skill is the iteration protocol that calls it.
Relationship to skills/harness-loop
This skill is the generic protocol: fresh context per iteration, exactly one
task per iteration, resumable on-disk state, hard budget. /harness-loop is
a SPECIALIZATION of it for one fixed mission — improving this harness's own
reviewer prompts under §5's rules (fixed TARGET regex, GATE floor, branch
convention). If the mission is "improve the harness itself", follow
/harness-loop instead of the generic steps below — its numbered procedure
is the maintained regulation for that mission.
Steps
-
Mission intake. From the request, determine: a slug (short, kebab-case), a TARGET file-path regex the loop may edit, a base ref (the mission's starting commit — usually HEAD), an attempt cap (default 5), and a per-attempt timeout in seconds (default 600). Confirm any ambiguous one with the user — a loop whose edit scope isn't pinned down is not this skill's contract.
-
Initialize.
bash core/infra/loop-run.sh init <slug> --target '<regex>' --base <ref> \ [--cap N] [--timeout-s N] --mission "<one-line description>"This creates the SQLite goal row (
supervisor-goal.sh, attempts modeled as waves), the JSON state file, and the active-loop flag that armscore/hooks/loop-write-guard.pyfor the rest of the session. -
Iterate. Each iteration is a fresh context turn — start a new conversation turn or subagent dispatch per iteration rather than carrying the previous iteration's reasoning forward, so each attempt is judged on its own diff, not on accumulated history — doing exactly one task: a. Pick one improvement idea within the declared TARGET. b. Edit only TARGET files. c.
git committhe change. d. Grade it:bash core/infra/loop-run.sh attempt <slug> --desc "<=80 char idea summary>"e. Read the
LOOP:line at the end of the output — the only line to act on:LOOP: continue— the same output'sATTEMPT: status=…line says whether to keep this commit orgit reset --hardback to the pre-attempt commit; then start the next iteration.LOOP: stop(cap)orLOOP: stop(circuit-breaker)— the loop ended on its own; go to step 5.
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 · 93 lines · 103 tokens per session scan A 53e277799889
loop is a skill published in the GitHub repository joymin5655/Agent (2 stars, last pushed 7d ago), licensed MIT. It adds 103 tokens to every session and 1,223 once invoked, about $0.0005 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
regex-mastery
Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.
shell-scripting
Use this skill when writing bash or zsh scripts, parsing arguments, handling errors, or automating CLI workflows. Triggers on bash scripting, shell scripts, argument parsing, process substitution, here documents, signal trapping, exit codes, and any task requiring portable shell script development.
agent-vitals
Introspect the user's local AI agent infrastructure in real time. Use proactively: before starting tasks, before scheduling cron/timer work, when stuck, after long tasks, or when claiming something works. Exposes tools: vitalssummary, shadowlist, shadowstale, burnoutsummary, burnoutstucksessions.
agent-reach
MUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g. 全网调研 X / 帮我调研一下 X / 查一下 X / 搜搜 X / 看看大家怎么评价 X / X 上有什么讨论 / research this topic。 Also MUST USE when user mentions any platform or shares any URL/链接: 小红书/xiaohongshu/xhs, Twitter/推特/X, B站/bilibili, Reddit, Facebook, Instagram…
memory
Use durable BB memory when prior project knowledge or cross-project user preferences can improve the current task, and save durable new learning through the bb memory CLI.
workflows
Execute a workflow script that orchestrates multiple subagents deterministically. Use when the user explicitly requests a workflow, multi-agent orchestration, parallel or sequential agent pipelines, structured agent outputs, or a durable background workflow run.