setup-statusline

Solid

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.

AI & Automation 32 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
51
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

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 1. **Locate the segment script.** Find the installed copy: ``` ls -d ~/.claude/plugins/cache/*/frugal/*/scripts/statusline.py 2>/dev/null | head -1 ``` Use the resulting absolute glob pattern (`$HOME/.claude/plugins/cache/<marketplace>/frugal/*/scripts/statusline.py` with a literal `*` for the version directory, resolved via `ls ... | head -1` at runtime) so plugin updates keep working. 2. **Read `~/.claude/settings.json`** and check the `statusLine` field. Three cases: **a. Already references `statusline.py` from this plugin** (in the command itself or inside the script the command runs): report that it is already configured and stop. **b. No `statusLine` configured:** create `~/.claude/frugal-statusline.sh` with 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). ```bash #!/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) FRUGA...

Details

Author
ThomasLangbroek
Repository
ThomasLangbroek/frugal
Created
2 weeks ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category