Skip to content
cccskills
FreePublished on GitHub

loop-budget

Check estimated token usage against daily limits before and after each automated loop run. Switch to reporting only, exit early when required, and record run outcomes so repeated agent work stays within configured limits.

OriginalShow the original description

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.

See how to install

Good for

  • Checking daily token usage before a run
  • Switching to reporting only near budget limits
  • Exiting early when there is no actionable work
  • Recording usage estimates and run outcomes

Files included (1)

  • SKILL.md1.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Drafts a token budget extension request when an autonomous loop approaches its daily limit and high priority work remains. Uses logged results and remaining issues to justify the request, then pauses until a human increases the budget.

  • Requesting extra budget for remaining critical work
  • Summarizing daily token spending and successful actions
  • Preparing a budget request for a human maintainer
cobusgreyling/loop-engineering11.6KUpdated Oct 18, 2026

changelog-scan

FreeSummary

Scans merged pull requests and commits since a chosen reference, using titles, labels, milestones, and messages to categorize changes. Produces a release notes draft, highlights breaking changes and security items, and records the scan window.

  • Collecting changes since the previous release tag
  • Sorting updates into features, fixes, and other categories
  • Identifying breaking changes and security items
cobusgreyling/loop-engineering11.6KUpdated Oct 18, 2026

changelog-scan

FreeSummary

Review merged pull requests and significant commits within a release window, then organize features, fixes, breaking changes, and security signals into structured source material for drafting release notes.

  • Collecting changes since the last release
  • Checking breaking changes and security signals
  • Preparing source material for release notes
cobusgreyling/loop-engineering11.6KUpdated Oct 18, 2026

changelog-scan

FreeSummary

Scan recent merges, pull requests, and commits for release note material. Produce structured entries and a summary with PR references, highlighting breaking changes and security items while filtering routine dependency and bot noise.

  • Gathering release note material from recent changes
  • Identifying breaking changes and security items
  • Organizing changes with PR references
cobusgreyling/loop-engineering11.6KUpdated Oct 18, 2026

changelog-scan

FreeSummary

Scan merges and commits since the previous release to collect user-facing changes for a changelog. Produce structured entries and a summary, with explicit lists of breaking changes and security signals.

  • Collecting changes since the previous release
  • Organizing user-facing updates
  • Listing breaking changes and security signals
cobusgreyling/loop-engineering11.6KUpdated Oct 18, 2026

ci-triage

FreeSummary

Analyze failures in CI, the automated checks run during development. Identify the failing job and step, classify the likely cause, and suggest a small fix, continued monitoring, or human review.

  • Identifying failed jobs and steps in CI
  • Distinguishing intermittent failures from code regressions
  • Routing environment failures to a human
cobusgreyling/loop-engineering11.6KUpdated Oct 18, 2026

See all skills by cobusgreyling

Report a problem with this skill