setup-statuslinelisted
Install: claude install-skill ThomasLangbroek/frugal
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