auto-balance

auto-balance is a skill for Claude Code, Codex from mr-tbot/Auto-Everything. It costs 135 tokens per session (3,169 once invoked), scanned A, original, MIT.

A procedure for sharing computer resources among several editors, coding agents, builds, and connected devices.

In plain words
What is it for?
It helps measure the machine, record its usual workload and connected hardware, limit concurrency, and rebalance work across sessions.
Why use it?
It helps prevent competing work from exhausting CPU or memory, killing processes, or fighting over a phone or development board.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Install

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.

agentmods
npx agentmods add skills/mr-tbot/auto-everything/auto-balance
Any agent
npx skills add mr-tbot/Auto-Everything --skill auto-balance
Clone the repo
git clone --depth 1 https://github.com/mr-tbot/Auto-Everything

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for auto-balance

README.md
[![agentmods](https://agentmods.dev/badge/skills/mr-tbot/auto-everything/auto-balance.svg)](https://agentmods.dev/skills/mr-tbot/auto-everything/auto-balance)
Your own site
<a href="https://agentmods.dev/skills/mr-tbot/auto-everything/auto-balance"><img src="https://agentmods.dev/badge/skills/mr-tbot/auto-everything/auto-balance.svg" alt="Measured on agentmods" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,169 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00135 $0.03169
Opus 5 $0.00068 $0.01584
Sonnet 5 $0.00027 $0.00634
Haiku 4.5 $0.00014 $0.00317

Measured yesterday against content hash 673d1368d983, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

auto-balance 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 yesterday.

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.

skills/auto-balance/SKILL.md · 223 lines

How it starts

The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/auto-balance — machine truth and account budget for parallel agents

Make this session a good citizen on a machine that is running several others. Cap what it consumes, take turns on hardware, and size its own agent count so the account never hits a limit.

First run does setup and writes the environment description down. Every later run re-balances against what is actually running now.

Step 1 — First-Run Setup (once per repo)

Ask, then persist to .agent/balance.json (gitignored — it may name hosts):

  1. The machine: cores, RAM, and whether builds routinely OOM today.
  2. Typical concurrency: how many editor windows / agent sessions run at once.
  3. Attached hardware: Android devices, dev boards, ESP32s, anything on serial.
  4. Remote hosts: a Mac for iOS work, a build server. Ask for connection details — an SSH Host alias, a Tailscale name, the user to connect as. Store the alias, never a key or password; the key lives in ~/.ssh/ and is referenced by config.
  5. Claude plan and session habits: which plan, and how many sessions typically run at once.

Record what you measured alongside what you were told:

nproc; grep -E '^(MemTotal|MemAvailable|SwapTotal)' /proc/meminfo
cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers
oomctl        # works unprivileged: SwapUsedLimit, DefaultMemoryPressureLimit, duration

oomctl is step zero on every run — it tells you what will kill you and at what threshold before you start anything.

Step 2 — Know What Actually Works Here

Resource controls fail silently more often than they fail loudly. Establish the truth per machine:

cgroup delegation. A user slice typically delegates cpu memory pids and not io. Consequence:

systemd-run --user --scope -p CPUQuota=50%  ...    # works
systemd-run --user --scope -p MemoryMax=2G  ...    # works
systemd-run --user --scope -p IOWeight=50   ...    # EXIT 0, NO ERROR, NO EFFECT

Read the full file on GitHub · 223 lines

Changes

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.

  1. yesterday Changed · -17 lines · +39 tokens per session 673d1368d983
  2. 5d ago First seen · 240 lines · 96 tokens per session scan A ad7c7cf0a3a3

Subscribe to this mod's changes

auto-balance is a skill published in the GitHub repository mr-tbot/Auto-Everything (7 stars, last pushed 4d ago), licensed MIT. It adds 135 tokens to every session and 3,169 once invoked, about $0.0007 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-31.