agentleFS
MasonFlint44MasonFlint44/claude-spend-statusline/skills/doctor/SKILL.md

doctor

Skill0 starsChanged 2 months agoMITView on GitHub

Diagnose the spend statusline — why the day and month bars are blank or stale, whether the credentials, usage endpoint, limit and cache are all in order. Use when the user says the spend bars are missing, empty, stuck, stale, wrong, or asks whether the statusline is working. An element the user hid on purpose through the display file is the display skill's job.

81 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use uninstall, cancel and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    uninstall

    Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.

    Also in 6 projects that use this

  • woosikkimSkill

    cancel

    Clear any stale OMC-Slim state

    Also in 3 projects that use this

  • ibahgatSkill

    mode

    Inspect or switch omi operating mode/profile for speed, depth, autonomy, or strict quality gates.

    Also in 3 projects that use this

  • BlockSkill

    open

    Open markdown documents in Penpal for collaborative review. Use when you want a human to review a document, plan, or research artifact.

    Also in 3 projects that use this

  • QinghongLinSkill

    editor

    Read analyst.json and detective.json, make all editorial decisions — what the blog argues, which findings matter, narrative arc and section structure. No visual design. Outputs editor.md (prose) and editor.json (structure with edt_xx IDs).

    Also in 3 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 15 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 61 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the doctor says bars: will show but the user still sees none, the statusline is rendering from a different config dir or a different …

    line 37
  2. Distinctive:

    Do not print, copy or echo the token.

    line 43
  3. Distinctive:

    Do not edit the plugin's own copy of the script.

    line 44
  4. Distinctive:

    Do not guess at the cause when the doctor has named one.

    line 45
  5. Very specific:

    Do not summarize the doctor's block in place of quoting it.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 61 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Diagnose the spend statusline

The spend bars hide whenever any step of the usage refresh fails, and the statusline itself never says which. The script's --doctor flag runs those steps in the foreground, one at a time, and names the first one that fails. This skill finds the installed script, runs the flag, and turns its output into a fix.

Steps

  1. Find the installed script. Read statusLine.command in $CFG/settings.json (CFG="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"). It names the script, normally written as "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/statusline/spend-statusline.sh" (shell text that resolves to $CFG/statusline/spend-statusline.sh; older installs spell out an absolute path), and may carry inline knobs such as CLAUDE_SPEND_MONTHLY_LIMIT=... or CLAUDE_SPEND_TZ=... in front of it, and names the interpreter (bash; older macOS installs name an absolute path such as /opt/homebrew/bin/bash): use the same one. If there is no statusLine entry, or it names another script, the spend statusline is not installed: say so and point the user at /spend-statusline:install.
  2. Run the doctor with exactly those knobs, that interpreter and that path, and quote its output as printed, every line through the final bars: verdict, rather than summarizing it: the user needs the exact lines to match against the table below and to report if something is off.
    [KNOBS] [BASH] "$CFG/statusline/spend-statusline.sh" --doctor
    It prints one line per step (version, tools, config dir, spend clock, calendar, this month's workdays, display, credentials, the live usage fetch, the limit, the cache) and ends with bars: will show (exit 0) or bars: hidden (exit 1) right after the step that failed. A third ending, bars: hidden by <display file> (day and month both hidden) with exit 0, means nothing failed: the user's own display file hides both bars. A successful run also refreshes the cache, so the next render shows current figures.
  3. Explain the failing line and the fix. The doctor's message names the cause; the usual ones:

    Doctor saysWhat it meansFix
    tools: missing: ...a required tool (jq, curl, awk, readlink) or a bash older than 4.4the line carries the install command for this platform (apt, dnf, pacman, brew, winget); run it, then rerun the doctor
    no credentials file / no OAuth tokenClaude Code is using an API key, or has never logged in through claude.ai on this machineclaude then /login; API-key sessions have no usage token, so the bars cannot show there
    the OAuth token expiredthe CLI refreshes it on its next requeststart a Claude Code session; rerun the doctor
    HTTP 401 / HTTP 403the token was rejectedlog in again
    HTTP 429rate limited; the statusline backs off five minuteswait, then rerun
    curl failedno network, a proxy, or the endpoint timed outcheck connectivity from this shell
    spend.enabled is falsethe organization has spend billing switched off, so there is no dollar figurenothing to fix in the statusline; the bars need a plan that reports dollars
    no spend figure in the responsethe plan reports no dollars (a personal Pro/Max plan), or the endpoint changed shapesame; if the account does show dollars on /usage, this is a shape change worth an issue on the repo
    limit: nonethe response carries no monthly limitset CLAUDE_SPEND_MONTHLY_LIMIT inline in the statusLine command
    line(s) not parsed on the calendar linea calendar entry is malformed; the bars still show, the workday count may be offrun /spend-statusline:calendar to see and fix the line
    display: <file>: hidden day, month and bars: hidden by <file>both bars are hidden on purpose by the display file; the fetch is skippednothing is broken; /spend-statusline:display brings them back if that is not what the user wants
    line(s) not parsed on the display linea display entry is malformed; the good lines still applyrun /spend-statusline:display to see and fix the line

    If the doctor says bars: will show but the user still sees none, the statusline is rendering from a different config dir or a different script than the one in settings: compare the config dir: line with $CLAUDE_CONFIG_DIR in the session, and the script path with statusLine.command.

  4. Apply the fix only with the user's agreement, then rerun the doctor and show the result. Editing settings.json for a knob follows the same rule as the installer: show the exact change first.

Do not

  • Do not print, copy or echo the token; the doctor never shows it and neither should you.
  • Do not edit the plugin's own copy of the script; run the installed one.
  • Do not guess at the cause when the doctor has named one; quote its line.
  • Do not summarize the doctor's block in place of quoting it. Its lines, through the bars: verdict, are what the user compares against the table and pastes into an issue.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.