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/cobusgreyling/loop-engineering/loop-budgetnpx skills add cobusgreyling/loop-engineering --skill loop-budgetgit clone --depth 1 https://github.com/cobusgreyling/loop-engineeringWhat 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.00032 | $0.00413 |
| Opus 5 | $0.00016 | $0.00206 |
| Sonnet 5 | $0.00006 | $0.00083 |
| Haiku 4.5 | $0.00003 | $0.00041 |
Grade A, and why
loop-budget 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.
What it actually says
Loop Budget Guard
Run at the start and end of every loop iteration.
Start of run
- Read
loop-budget.mdfor daily caps and kill-switch flags. - Read recent entries in
loop-run-log.md(last 24h). - Sum
tokens_estimatefor the active pattern today. - If spend ≥ 80% of the pattern's daily cap → report-only mode (no sub-agents, no auto-fix).
- If spend ≥ 90% and High Priority items remain in
STATE.md, yield to the budget-negotiator skill (if installed). Otherwise, if spend ≥ 100% orloop-pause-allis set → exit immediately with a one-line note in STATE.md. - If watchlist/state has no actionable items → exit in <5k tokens (do not spawn sub-agents).
End of run
Append one JSON object to loop-run-log.md:
{
"run_id": "<ISO8601>",
"pattern": "<pattern-id>",
"duration_s": <number>,
"items_found": <number>,
"actions_taken": <number>,
"escalations": <number>,
"tokens_estimate": <number>,
"outcome": "no-op | report-only | fix-proposed | escalated"
}
Rules
- Never exceed
max sub-agent spawns/runfromloop-budget.md. - High-cadence patterns (CI Sweeper, PR Babysitter) must early-exit when nothing is actionable.
- On self-throttle, append a line to
loop-budget.mdunder Alerts This Period.
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 First seen · 40 lines · 32 tokens per session scan A afc4674711e7
loop-budget is a skill published in the GitHub repository cobusgreyling/loop-engineering (10,811 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 413 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-30.
Other skills, from other repositories
aw-author
Author, validate, and improve GitHub Agentic Workflow (gh-aw) markdown files. Use when the user wants to create a new workflow, validate an existing workflow, improve a workflow, or debug workflow issues. Triggers on: "aw-author", "agentic workflow", "gh-aw workflow", "workflow markdown", "workflow frontmatter"…
aw-daily
Fully autonomous daily pipeline for the aw-author plugin. Executes intelligence research (web search + GitHub activity queries), posts to Discussions, performs gap analysis against reference files, creates issues, implements changes on develop branch, creates PR, requests review, and auto-merges. Designed for…
gh-aw-report
Daily intelligence reporting for the GitHub Agentic Workflows (gh-aw) ecosystem. Executes 8+ targeted web searches, synthesizes findings into a structured Markdown report, updates the persistent knowledge base, and optionally posts to GitHub Discussions. Triggers on: "aw-report", "gh-aw report", "intelligence sweep"…
hive-maintainer
Discipline for developing Hive itself — PR sizing, review handling, merge discipline, release workflow, delegation, and cleanup hygiene. Use this skill when working on Hive repo changes that span multiple PRs or review cycles.
hive-essentials
Hive mental model and orientation. Read this first before using any other Hive skill. Covers the entity hierarchy, observe-and-steer pattern, drivers, sandboxes, console vs CLI, and workspace conventions.
hive-work-loop
The core agent work cycle in Hive — from finding a task through claiming, launching a run, handling approvals, finishing, and promoting. Use this skill for task-first project work, governed runs, and clean handoff.