🛡️
AutomationJavaScript

Loop Budget Guard

by cobusgreyling

Loop Budget Guard is an Automation skill for Claude Code, published by cobusgreyling in loop-engineering.

10.4K stars1.4K forkson cobusgreyling/loop-engineeringAdded 2026/08/15+1% in starsRepository updated 2026/08/15
agentic-aiai-agentsai-codinganthropicautomationclaudeclaude-codecodexcoding-agentsdevops-automationdevtoolsgithub-actionsgrokllmloop-engineeringmcpprompt-engineering
Install in seconds
Install Loop Budget Guard
Copy Loop Budget Guard into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/cobusgreyling/loop-engineering/tree/main/skills/loop-budget ~/.claude/skills/loop-budget

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/cobusgreyling/loop-engineering.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/loop-budget/SKILL.md in cobusgreyling/loop-engineering
Installs to
~/.claude/skills/loop-budget
Collection
One of 23 skills cataloged from this repository
Category
Automation1523 skills

What Loop Budget Guard does

Loop Budget Guard checks token budget and run-log spend before and after each loop iteration and enforces early exit when over budget or when there is no actionable work.

Loop Budget Guard is cataloged under Automation on DirSkills. Loop Budget Guard comes from a repository tagged agentic-ai, ai-agents, ai-coding, anthropic and automation.

Documentation

README

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:

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Loop Budget Guard

  • What else does cobusgreyling publish alongside Loop Budget Guard?

    Loop Budget Guard is one of 23 skills that DirSkills catalogs from cobusgreyling/loop-engineering, the repository it ships in. Its siblings there include Budget Negotiator, CI Triage and CI Triage. Each one is a separate skill with its own page in this directory, installs the same way Loop Budget Guard does, and is maintained by cobusgreyling in that same repository. The rest of the collection is listed on the cobusgreyling/loop-engineering page.

  • How does Loop Budget Guard compare to other Automation skills?

    Loop Budget Guard ranks #179 by stars among the 1523 Automation skills in this catalog. The most-starred ones next to it are Autonomous Loops, Autonomous Agent Harness and Automation Audit Ops. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Loop Budget Guard against them. Open each page to compare what they document and how they install.

More from cobusgreyling/loop-engineering

Loop Budget Guard is one of 23 skills cataloged on DirSkills from cobusgreyling/loop-engineering.

See all 23 skills
💰
2w ago

Budget Negotiator

Budget Negotiator enables an L3 autonomous loop to request a token budget increase when near its cap and high-priority work remains. It calculates ROI from run logs and escalates a tagged request for human approval.
AI Engineering
10.4K1.4K
🩺
2w ago

CI Triage

CI Triage classifies failing CI checks into clear regressions, infra flakes, security-test failures, and non-deterministic failures, then updates ci-sweeper-state.md with suggested next actions and attempt counts. Use it when you need to decide whether to auto-fix, retry, or escalate each CI failure.
DevOps
10.4K1.4K
🔍
2w ago

CI Triage

CI Triage parses CI failures, identifies the failing job and step, and classifies each failure as flake, regression, env, or config to guide next actions. Use it before attempting any fix to decide whether to minimal-fix, watch, or escalate.
DevOps
10.4K1.4K
📝
2w ago

Changelog Scan

Changelog Scan scans merged PRs and commits since a given reference, extracting titles, labels, types, and signals. It produces structured input for release notes drafting.
DevOps
10.4K1.4K
📋
2w ago

Changelog Scan

Changelog Scan reviews recent merges, PRs, and commits to extract release note content, returning structured per-item blocks and a scan summary. It surfaces breaking and security changes explicitly and ignores dependency and bot noise unless security-related.
DevOps
10.4K1.4K
📋
2w ago

Changelog Scan

Changelog Scan analyzes recent merges and commits since the last release to extract user-facing changes, breaking changes, and security signals. Use it to generate structured changelog entries for release notes.
DevOps
10.4K1.4K