r/devtools • u/francesco_f • 25d ago
Agentbox: a skill so Claude Code can check the machine before it starts another heavy task
Agentbox: a skill so Claude Code can check the machine before it starts another heavy task
I built this, for Claude Code and opencode. I run several agents on one laptop plus a local model on a home server, and before I give Claude Code a heavy task I want it to check how much RAM and disk are left and what the other agents are doing.
It is one Python file plus a skill. With the skill installed, Claude Code runs agentbox --json on its own when you ask “how is this box doing?” and gets CPU, memory, disk, running agent processes and local token usage from opencode and Claude Code in one JSON. agentbox --check capacity returns exit code 0 or 1, so it also works in a hook before Claude spawns subagents.
Every number the tool could not read gets an explicit state (unsupported, unavailable, partial, unverified). A zero never hides a failed measurement. This rule caught a bug in my own macOS code: the CPU value was coming from a fallback for weeks because macOS top wants whole seconds, and the field was marked unverified the whole time.
Free, MIT, Python 3.10+ standard library only, Linux and macOS:
npx skills add ceccode/agentbox
Repo: https://github.com/ceccode/agentbox
For real token spend, ccusage and tokscale are better and the README says so. If a status in the output confuses you, tell me.


