setup-statusline
Skill37 starsChanged 4 months agoMITView on GitHub
Wire the frugal savings segment into the user's Claude Code statusline - creates a minimal statusline if none exists, or merges the segment into an existing one.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ww-w-ai/super-token-savertheir own version, first seen Aug 25, 2026
- UnicodeDigital/claude-skillstheir own version, first seen Jun 16, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ww-w-ai/super-token-saver★ 35same name
- UnicodeDigital/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- modelsSkill
- router-statsSkill
- routingSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Add the frugal savings badge to the user's statusline.
- Very specific: line 15
Use the resulting absolute glob pattern ($HOME/.claude/plugins/cache/<marketplace>/frugal/*/scripts/statusline.py with a literal * for the …
- Very specific: line 21
b. No
statusLineconfigured: create ~/.claude/frugal-statusline.sh with the content below, make it executable, and set "statusLine": … - Distinctive: line 39
c. An existing statusline is configured: read the script or command it points at, then merge the segment into it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add the frugal savings badge to the user's statusline. The badge comes from scripts/statusline.py in this plugin, which prints frugal $<session>/$<lifetime> saved (or nothing when no metrics exist yet).
Steps
- Locate the segment script. Find the installed copy:
Use the resulting absolute glob pattern (ls -d ~/.claude/plugins/cache/*/frugal/*/scripts/statusline.py 2>/dev/null | head -1$HOME/.claude/plugins/cache/<marketplace>/frugal/*/scripts/statusline.pywith a literal*for the version directory, resolved vials ... | head -1at runtime) so plugin updates keep working. Read
~/.claude/settings.jsonand check thestatusLinefield. Three cases:a. Already references
statusline.pyfrom this plugin (in the command itself or inside the script the command runs): report that it is already configured and stop.b. No
statusLineconfigured: create~/.claude/frugal-statusline.shwith the content below, make it executable, and set"statusLine": {"type": "command", "command": "bash \"$HOME/.claude/frugal-statusline.sh\""}in settings.json (ask the user before writing settings.json).#!/bin/bash # Minimal statusline: model + cwd + frugal savings badge INPUT=$(cat) MODEL=$(echo "$INPUT" | jq -r '.model.display_name // empty' 2>/dev/null) DIR=$(basename "$(echo "$INPUT" | jq -r '.cwd // "~"' 2>/dev/null)") SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty' 2>/dev/null) FRUGAL="" FRUGAL_SCRIPT=$(ls -d "$HOME"/.claude/plugins/cache/*/frugal/*/scripts/statusline.py 2>/dev/null | head -1) if [ -n "$FRUGAL_SCRIPT" ]; then TXT=$(python3 "$FRUGAL_SCRIPT" ${SESSION_ID:+--session "$SESSION_ID"} 2>/dev/null) [ -n "$TXT" ] && FRUGAL=" \033[38;5;114m[${TXT}]\033[0m" fi printf '%b\n' "[${MODEL:-claude}] [${DIR}]${FRUGAL}"c. An existing statusline is configured: read the script or command it points at, then merge the segment into it. Preferred merge: compute the badge early and append it to the script's assembled output, following this shape:
FRUGAL="" FRUGAL_SCRIPT=$(ls -d "$HOME"/.claude/plugins/cache/*/frugal/*/scripts/statusline.py 2>/dev/null | head -1) if [ -n "$FRUGAL_SCRIPT" ]; then SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty' 2>/dev/null) TXT=$(python3 "$FRUGAL_SCRIPT" ${SESSION_ID:+--session "$SESSION_ID"} 2>/dev/null) [ -n "$TXT" ] && FRUGAL="\033[38;5;114m[${TXT}]\033[0m" fiAdapt to the script's own conventions (variable names, how it reads stdin, how it assembles the final line). If the statusline is an inline command rather than a script, wrap it: create
~/.claude/frugal-statusline.shthat pipes$INPUTto the original command and appends the badge to its output, then pointstatusLine.commandat the wrapper. Show the user the proposed edit and get consent before modifying their statusline or settings.json.- Verify. Pipe a fake payload through the final statusline command and confirm it exits 0 and renders (badge may be absent if no metrics exist yet - that is correct behaviour, not a failure):
echo '{"session_id":"test","cwd":"'$HOME'","model":{"display_name":"test"}}' | <statusline command> - Tell the user the badge appears after the first frugal worker runs (metrics land in
~/.claude/frugal/metrics.jsonl), and that the statusline refreshes on its own.
Notes: never delete or rewrite unrelated parts of an existing statusline; make the smallest edit that adds the badge. jq and python3 are required; if missing, say so instead of installing anything.
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
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.

