Skip to content
Agentmart
Submit a tool

setup-statusline

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…

Skill by ThomasLangbroek

IndexedMIT★ 38
Write a review

Chalk Labs

Need help deploying setup-statusline?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/thomaslangbroek-setup-statusline

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/setup-statusline

What's inside

Skill name
setup-statusline
Description
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.
License
MIT
Instructions
56 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • files: referenced but missing: scripts/statusline.py

Files (1)

  • SKILL.md

SKILL.md (first lines)

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)
   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:

   ```bash
   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"
   fi
   ```

   Adapt 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.sh` that pipes `$INPUT` to the original command and appends the badge to its output, then point `statusLine.command` at the wrapper. **Show the user the proposed edit and get consent before modifying their statusline or settings.json.**

3. **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>
   ```

4. 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.

From ThomasLangbroek/frugal, MIT.

Signals

Stars
38
Forks
5
Open issues
1
Last commit (this folder)
Jul 8, 2026 (3 months ago)
Last release
Oct 6, 2026 (25 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from ThomasLangbroek

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get setup-statusline running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying setup-statusline?

CallGet help
Cite this page

setup-statusline skill. Agent Mart. https://agentmart.dev/skills/thomaslangbroek-setup-statusline (last updated 2026-10-24)