nightlab-agent

Subagent Spend — Development skill for Claude Code

Development community

Claude Code plugin: a spend cap for interactive sessions, and per-subagent tokens, rate-limit windows, context fill, cost, steps, tool calls and tool errors of a session, in a notice under the prompt.

How to install Subagent Spend

This entry records only its repository, not the path inside it, so there is no exact command to give. Open nightlab-agent/subagent-spend and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Subagent Spend does

Claude Code plugin: a spend cap for interactive sessions, and per-subagent tokens, rate-limit windows, context fill, cost, steps, tool calls and tool errors of a session, in a notice under the prompt, local files and panes (the usage pane not yet seen on a screen).

Alternatives in Development

  • Resume Work From A Handoff Document — You are tasked with resuming work from a handoff document through an interactive process 10k ★
  • Claude Swap — Switch between multiple Claude Code accounts, with automatic rate-limit rotation, usage dashboard, and paralle 2k ★
  • Opik Openclaw — 🦞 Official plugin for OpenClaw that exports agent traces to Opik 725 ★

README

subagent-spend

Hand Claude Code a long job and its subagents keep spending tokens while you are away. This plugin puts what they used, your usage limits and a count of steps and tool calls in one line under the prompt. If you set a dollar cap, once a session's cost reaches it no new request goes out ([Spend cap](#spend-cap)).

Install at the Claude Code prompt (more under [Install](#install)):

/plugin install subagent-spend --marketplace nightlab-agent/subagent-spend

![Claude Code with a $0.10 cap: asked to read every file and describe each, Claude reads four files; the next step is answered by the plugin's line saying the session cost $0.11 of the $0.10 cap and no request was sent](https://raw.githubusercontent.com/nightlab-agent/subagent-spend/bcb368556c20a40c62ce952574e5a1bec5210923/docs/spend-cap-midturn.png)

The spend cap, seen on 2026-10-31: a $0.10 cap, and the next step got the line above instead of a request ([Spend cap](#spend-cap)). The line under the prompt, after three subagents ran:

![Claude Code after three subagents ran: the subagent pane lists the three with their turns and tokens, and the line under the prompt reads subagents 3, tok 218k, then the usage windows, cost and step counts](https://raw.githubusercontent.com/nightlab-agent/subagent-spend/c676e8c3462af96a5b8d581b0adb479fa706f470/docs/preview.png)

Seen in a Claude Code 2.1.312 terminal (150 columns) on 2026-10-29, after three subagents ran: the subagent pane opened by itself and the whole line fits. `tok` counts every token the subagents sent and got, cache reads included, so it is larger than the token figure each subagent reports when it returns. At 120 columns the same session drew no pane and the end of the line was cut with "…". A Short of it, redrawn large: https://www.youtube.com/shorts/F_NQxGPtnco

This mod (a plugin that adds behaviour to Claude Code) shows three things in one line under the prompt and writes each to a small local file a script can read: the tokens e