Loop Engineering is a collection of patterns, starter projects, and command-line tools for designing recurring workflows around AI coding agents. It is for developers who want agents to discover work, make changes, verify results, and preserve project state across tasks. The catalogue entries provide the project's reusable skills, agents, plugin, and instruction.
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/budget-negotiatornpx skills add cobusgreyling/loop-engineering --skill budget-negotiatorgit clone --depth 1 https://github.com/cobusgreyling/loop-engineeringWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cobusgreyling/loop-engineering/budget-negotiator)<a href="https://agentmods.dev/skills/cobusgreyling/loop-engineering/budget-negotiator"><img src="https://agentmods.dev/badge/skills/cobusgreyling/loop-engineering/budget-negotiator.svg" alt="Measured on agentmods" height="20"></a>What 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.1 | $0.00043 | $0.00820 |
| Opus 5 | $0.00022 | $0.00410 |
| Sonnet 5 | $0.00009 | $0.00164 |
| Haiku 4.5 | $0.00004 | $0.00082 |
Grade A, and why
budget-negotiator 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Budget Negotiator
When you detect that you are nearing your daily token cap (e.g., ≥90% spend) via the loop-budget skill, DO NOT just exit silently. You must negotiate for an extension based on your Return on Investment (ROI).
Goal
Ensure that critical work is not arbitrarily blocked by token budgets if the loop has demonstrated a high success rate and the remaining work is critical.
Rules & Precedence
- Precedence:
budget-negotiatorONLY activates whenloop-budgetwould otherwise hard-exit (i.e. ≥90% spend), and ONLY when there areHigh Priorityitems remaining. If work is not High Priority, yield to the standardloop-budgetexit sequence. - Safety: This skill touches L3 (unattended) safety boundaries. See Safety Boundaries for threat models.
- Strict Cap Limitation: You are strictly forbidden from self-raising the caps in
loop-budget.md. A human MUST explicitly editloop-budget.mdto increase the cap before you can resume. - Human Decline: If a human declines the negotiation by removing the
[BUDGET NEGOTIATION]tag without increasing the budget, you must revert to report-only mode and NOT ask again today. - Cap the Ask: You may only request a maximum of +20% or +50k tokens per negotiation. You may only negotiate a maximum of one time per day.
Negotiation Protocol
-
Calculate ROI:
- Read
loop-run-log.mdand sum up theactions_taken,outcome(specifically successes), andtokens_estimatefields for today. - Read
STATE.mdto identify the severity of the remaining actionable items in theWatch ListorHigh Prioritysections.
- Read
-
Draft Justification:
- If the remaining items are High Priority (e.g., CI is red, P0 bugs, security vulnerabilities), draft a concise business justification.
- The justification must include:
- The current spend vs the limit.
- The exact
actions_takencount and successful outcomes you've completed today based on the JSON log. - The specific critical issue(s) remaining.
- A precise request for an extension tied to the specific
loop-budget.mdfield (e.g., "Requesting +50k tokens for the 'Validate/Audit (CI)' max tokens/day").
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.
- 6d ago First seen · 50 lines · 43 tokens per session scan A 637e9d7f0815
budget-negotiator is a skill published in the GitHub repository cobusgreyling/loop-engineering (10,959 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 820 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
github-actions
Use when authoring or fixing GitHub Actions CI/CD — workflows under .github/workflows, triggers, job matrix, caching, token permissions, OIDC cloud deploys, environment gates, reusable workflows. NOT the Dockerfile or image build strategy (that is docker), NOT the branching model (that is git-workflow), NOT release…
github-workflow-automation
Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management.
securing-github-actions-workflows
This skill covers hardening GitHub Actions workflows against supply chain attacks, credential theft, and privilege escalation. It addresses pinning actions to SHA digests, minimizing GITHUBTOKEN permissions, protecting secrets from exfiltration, preventing script injection in workflow expressions, and implementing…
deployment
Use when taking an app from source to live: choosing the deploy target from requirements (Hetzner+Coolify vs Vercel vs a third), then wiring container → CI → registry → host with build secrets, healthchecks and rollback. NOT one platform's mechanics (that is coolify, vercel, railway, render), NOT the Dockerfile alone…
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…