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

install

Skill0 starsChanged 2 months agoMITView on GitHub

Install or update the spend statusline — copies the statusline files to a stable location under ~/.claude and wires statusLine in settings.json. Use when the user asks to install, set up, enable or update the spend statusline, says the statusline is not showing at all, has just updated the plugin and wants the installed copy refreshed, wants the statusLine command to work from a devcontainer or another account that shares ~/.claude, or is on macOS and needs Homebrew's bash 4.4+ instead of the system 3.2.

  • Installs packages

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update and release.

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

    update

    Sync tasks and refresh memory from your current activity. Use when pulling new assignments from your project tracker into TASKS.md, triaging stale or overdue tasks, filling memory gaps for unknown people or projects, or running a comprehensive scan to catch todos buried in chat and email.

    Also in 3 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Wire settings: Read $CFG/settings.json. Show the user the exact change before making it, then set statusLine.command to this text exactly …

    line 34
  2. Distinctive:

    Never touch any other key.

    line 42
  3. Very specific:

    Do not point statusLine at the plugin directory — it changes on update.

    line 54
  4. Very specific:

    Do not overwrite an existing calendar.conf or display.conf.

    line 55
  5. Distinctive:

    Do not edit settings without showing the change first.

    line 56
  6. Very specific:

    Do not expand ${CLAUDE_CONFIG_DIR:-$HOME/.claude} or write an absolute path (to the script or to bash) into the command.

    line 57
  7. Very specific:

    Do not finish on macOS without a 4.4+ Homebrew bash.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 18 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

Install the spend statusline

Plugins cannot set statusLine themselves, and the plugin's own directory moves on every version update, so this skill copies the files somewhere stable and points settings at that copy. Idempotent: safe to re-run after a plugin update.

Steps

  1. Locate the source. The files ship with this plugin at ${CLAUDE_PLUGIN_ROOT}/statusline/:

    • spend-statusline.sh
    • config/calendar.conf (the work-week and holiday calendar)
    • config/display.conf (which elements the statusline shows)

    Resolve the config dir as ${CLAUDE_CONFIG_DIR:-$HOME/.claude}; call it $CFG below.

  2. Copy to the stable location, preserving the subfolders:
    CFG="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
    mkdir -p "$CFG/statusline/config"
    cp "${CLAUDE_PLUGIN_ROOT}/statusline/spend-statusline.sh" "$CFG/statusline/"
    [ -e "$CFG/statusline/config/calendar.conf" ] || \
      cp "${CLAUDE_PLUGIN_ROOT}/statusline/config/calendar.conf" "$CFG/statusline/config/"
    [ -e "$CFG/statusline/config/display.conf" ] || \
      cp "${CLAUDE_PLUGIN_ROOT}/statusline/config/display.conf" "$CFG/statusline/config/"
    chmod +x "$CFG/statusline/spend-statusline.sh"
    The script is refreshed every time. calendar.conf and display.conf are copied only if absent — once installed they are the user's own (they may have edited them) and must not be overwritten on update.
  3. Check the bash. The script needs bash 4.4+. On Linux and in Git Bash on Windows, bash is fine. On macOS the system bash is 3.2; the script hands itself to Homebrew's bash when one is installed, so check /opt/homebrew/bin/bash (Apple silicon) then /usr/local/bin/bash (Intel) with "$candidate" -c 'echo ${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}'. If neither reports 4.4 or newer, stop and tell the user to run brew install bash, then re-run this skill. The command below says plain bash either way; never write an absolute bash path into it.
  4. Wire settings. Read $CFG/settings.json. Show the user the exact change before making it, then set statusLine.command to this text exactly as written, with the shell expressions left unexpanded:
    "statusLine": { "type": "command", "command": "bash \"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/statusline/spend-statusline.sh\"" }
    Claude Code runs the command through a shell, so each machine resolves the path for itself: the same settings file then works when ~/.claude is shared with a devcontainer or another user account whose home directory differs. Write it with a JSON tool (jq --arg) or check the result with jq -r .statusLine.command, which must print bash "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/statusline/spend-statusline.sh".
    • Updating an earlier install whose command names the script by an absolute path (bash /home/<user>/.claude/statusline/spend-statusline.sh, or a Homebrew bash path in front): that is this plugin's own command, so replace it with the form above without asking, keeping any inline knobs (NAME=value words) in front of bash.
    • A different statusline already set (a command naming another script): say so and ask before replacing it.
    • Shared config dir. If the user says this config dir is shared with a devcontainer, another machine or another account, suggest pinning the spend clock with an inline CLAUDE_SPEND_TZ=<their zone> in front of bash (for example CLAUDE_SPEND_TZ=America/Chicago bash "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/..."). The cache lives in the shared dir, and two machines on different time zones (containers often run on UTC) disagree about the date for part of each day, which would reset the day bar and refetch on every render.
    • Never touch any other key.
  5. Run the doctor on the installed copy, with any inline knobs the statusLine command has in front, and show its output:
    bash "$CFG/statusline/spend-statusline.sh" --doctor
    It checks the tools (jq, curl, awk; a missing one comes with the install command for this platform), the credentials, fetches the usage figures once in the foreground, and ends with bars: will show or bars: hidden after the step that failed. If the bars will be hidden, explain the failing line (an API-key session has no usage token; a plan with no dollar figure cannot show spend bars; a missing limit needs CLAUDE_SPEND_MONTHLY_LIMIT) and point at /spend-statusline:doctor for later.
  6. Tell the user the new statusline appears on the next refresh, no restart needed (Claude Code picks up the settings change live). A successful doctor run has already filled the cache, so the bars show on the first render. Point them at the plugin's README.md for what the bars mean and the knobs (CLAUDE_SPEND_MONTHLY_LIMIT, CLAUDE_SPEND_TZ, CLAUDE_SPEND_REFRESH, CLAUDE_SPEND_CALENDAR, CLAUDE_SPEND_DISPLAY), at /spend-statusline:calendar for editing the calendar (work week, holidays, PTO), at /spend-statusline:display for hiding or showing elements (the pace tick, the cache cue, the repository row), and at /spend-statusline:doctor if the bars ever go blank.

Do not

  • Do not point statusLine at the plugin directory — it changes on update.
  • Do not overwrite an existing calendar.conf or display.conf.
  • Do not edit settings without showing the change first.
  • Do not expand ${CLAUDE_CONFIG_DIR:-$HOME/.claude} or write an absolute path (to the script or to bash) into the command; the literal form is what lets a shared settings file work everywhere.
  • Do not finish on macOS without a 4.4+ Homebrew bash; stop and name brew install bash.

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.