agentleFS
cobusgreylingcobusgreyling/loop-engineering/skills/loop-budget/SKILL.md

loop-budget

Skill11k starsChanged 4 months agoMITView on GitHub

Check token budget and run-log spend before and after a loop run. Enforces early exit when over budget or when there is no actionable work.

Trending

Quiet since September.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 21 mentionsJul 2026: 6 mentionsAug 2026: 15 mentionsSep 2026: 6 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cobusgreyling/loop-engineering repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cobusgreyling/loop-engineering

The biggest 5 of 48 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 48

Talked about on GitHub and Bluesky (48 times).

On GitHub · 42

37 more on GitHub

On Bluesky · 6

1 more on Bluesky

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run at the start and end of every loop iteration.

    line 8
  2. Very specific:

    Read loop-budget.md for daily caps and kill-switch flags.

    line 12
  3. Very specific:

    Read recent entries in loop-run-log.md (last 24h).

    line 13
  4. Distinctive:

    If spend ≥ 80% of the pattern's daily cap → report-only mode (no sub-agents, no auto-fix).

    line 15
  5. Very specific:

    If spend ≥ 90% and High Priority items remain in STATE.md, yield to the budget-negotiator skill (if installed).

    line 16
  6. Distinctive:

    If watchlist/state has no actionable items → exit in <5k tokens (do not spawn sub-agents).

    line 17
  7. Very specific:

    Never exceed max sub-agent spawns/run from loop-budget.md.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Loop Budget Guard

Run at the start and end of every loop iteration.

Start of run

  1. Read loop-budget.md for daily caps and kill-switch flags.
  2. Read recent entries in loop-run-log.md (last 24h).
  3. Sum tokens_estimate for the active pattern today.
  4. If spend ≥ 80% of the pattern's daily cap → report-only mode (no sub-agents, no auto-fix).
  5. If spend ≥ 90% and High Priority items remain in STATE.md, yield to the budget-negotiator skill (if installed). Otherwise, if spend ≥ 100% or loop-pause-all is set → exit immediately with a one-line note in STATE.md.
  6. 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/run from loop-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.md under Alerts This Period.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.