Imported from comp4020-agentic-coding-studio/core (
comp4020-statusline/skills/statusline/SKILL.md). Install upstream withnpx skills add comp4020-agentic-coding-studio/core --skill statusline. Copyright stays with the author.
COMP4020 budget status line
This plugin ships the script; the student's settings.json points at it. Both
halves have to be in place, which is the source of nearly every "it isn't
working" report.
Opus · comp4020 $41.20/$100 (41%)
Green through amber to red as the weekly cap approaches. In a session that
isn't running on course credits — a personal subscription or key, or no key at
all — it shows a dim own plan instead, so which wallet a session draws from is
always visible. For a student running the course key alongside their own Claude
plan, that flip is the main reason to want it.
The model leads either rendering (Opus · own plan), since which model a
session is on is the other thing that moves what it costs. On course credits an
Opus model is picked out in magenta rather than dimmed — an Opus request costs
several times a Sonnet one — and that colour deliberately sits outside the
budget figure's green-amber-red, so it reads as a price rather than a warning
about the cap. On someone's own plan the spend isn't the course's to flag, so
the model stays dim there whatever it is.
Install
It needs jq (and curl, which every supported platform already has).
Check with command -v jq; if it's missing, install it first with
mise use -g jq (the course's install path — see onboard step 2). Without jq
the segment just reads comp4020 budget: needs jq.
It's a Unix shell script, so macOS, Linux and WSL. On native Windows there is
nothing to install — that's the WSL2 nudge /comp4020:doctor already gives.
-
The plugin is installed (you're running its skill), and its
SessionStarthook copies the script to~/.claude/comp4020/statusline.shat the start of the next session. If it isn't there yet, don't hunt for it — carry on and tell them it lights up when they restart. -
Merge this into
~/.claude/settings.json— read the file first and add just this key, preserving everything else verbatim. Installing the plugin never writes it: a plugin cannot setstatusLine, which is exactly why the student's consent is needed here.{ "statusLine": { "type": "command", "command": "$HOME/.claude/comp4020/statusline.sh" } }If they already have a
statusLine, leave it alone and say so — their existing one can append this one's output instead:printf ' %s' "$(printf '%s' "$input" | "$HOME/.claude/comp4020/statusline.sh")"where
$inputis the session JSON their script has already read from stdin. Feeding it</dev/nullinstead is also fine and prints everything but the model name — which a hand-rolled status line usually shows already. -
Tell them it appears in new sessions, not this one.
When it isn't working
The script always prints one of two tags, so the first question is which of three states they're in. Work down in this order:
- completely empty segment — the script isn't running at all. Check, in
order:
command -v jq;claude plugin listshowscomp4020-statusline;test -x ~/.claude/comp4020/statusline.sh(if the plugin is installed but the script is missing, itsSessionStarthook hasn't run yet — restarting Claude Code installs it); andstatusLine.commandin~/.claude/settings.jsonactually points at that path. That last one is the step people miss, because installing the plugin does not write it. AnenabledPluginsentry naming the plugin whileclaude plugin listdoesn't show it means it was never installed: enabling is not installing, and onlyclaude plugin install comp4020-statusline@comp4020fetches it. own plan— the script works, but the session isn't routed through strproxy. It shows the budget only whenANTHROPIC_BASE_URLnames the strproxy host andANTHROPIC_AUTH_TOKENholds a virtual key, by design, so it never sends a credential to a host it wasn't given. Whether that's correct depends on the setup: on someone's own Claude subscription outside course work it's exactly right, and for a student running both plans it's right everywhere except inside a course repo. Seeing it there means the repo's.claude/settings.local.jsonis missing — usually a fresh weekly clone. Fix:/comp4020:onboard, the dual-plan branch.comp4020with a stale or missing figure — not a broken setup.budget: ?means the script has never reached/api/me, nearly always the ANU VPN; a number that won't move is the 60-second cache, which off the VPN sits on the last figure it fetched indefinitely. Their Claude sessions are unaffected either way.- the right tag but no model name — the script isn't being handed the
session JSON. Nearly always a status line of their own calling ours with
</dev/null; the append recipe above pipes it through instead. Everything else works without it, by design.
A student who already had their own status line may have it pointing elsewhere — that's fine and deliberate; check whether their script calls ours (the append recipe above).
What it is, and isn't
It reads a figure cached and refreshed at most once a minute in the background:
an indicator, not a ledger. The authoritative number is /comp4020:balance —
say so if the two disagree, rather than trusting the bar.
Turning it off
Delete the statusLine block from ~/.claude/settings.json. To also stop the
hook reinstalling the script:
claude plugin uninstall comp4020-statusline@comp4020
rm -rf ~/.claude/comp4020
The comp4020 skills plugin is unaffected either way.