agentleFS
flopperjflopperj/dotfiles-core/.claude/skills/smart-statusline/SKILL.md

smart-statusline

Skill3 starsChanged 10 days agoMITView on GitHub

Install a Claude Code statusline that shows model name, session cost, a 10-block context usage bar, and color-coded warnings (/compact prompts at 30%, urgency at 90%). Use when the user types /smart-statusline, asks to set up a statusline, wants to see context usage in their terminal, asks how full their context window is, wants cost tracking in Claude Code, or says things like 'show me context percentage', 'set up my statusline', or 'I want to see how much context I have left'.

  • Deletes or force-pushes
  • Installs packages

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    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:

    If you're installing via npx @dev-devsuccess/skills, the skill directory will be at ~/.claude/skills/smart-statusline/ (global) or …

    line 43
  2. Very specific:

    Add the statusLine key to your Claude Code settings.json.

    line 47
  3. Distinctive:

    If the user asks you to install the statusline for them:

    line 66
  4. Very specific:

    Read the user's ~/.claude/settings.json (create it if missing), add the statusLine block, write it back

    line 70
  5. Very specific:

    After the user confirms it's working, clean up: rm -rf <skill-dir>

    line 72
  6. Very specific:

    Use the project-scoped .claude/settings.json if the user is working in a specific repo and says so.

    line 74
  7. Distinctive:

    If you discover something during this task that would improve this skill, propose the change and ask me to confirm before saving it.

    line 84

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Claude Code Statusline

Just installed this skill? Say: "install my statusline" — Claude will set everything up automatically.

Installs a statusline script for Claude Code that shows at a glance:

  • Model name — which Claude model is active
  • Session cost — running USD total for the session
  • Context bar — 10-block progress bar (each block = 10% of context window)
  • Color-coded warnings — green → orange → red as context fills up

Example output:

Sonnet 4.6  $0.42  ████░░░░░░  38% — run /compact now

Color thresholds:

  • Green (0–29%) — plenty of room
  • Yellow (30%) — consider /compact
  • Orange (31–89%) — run /compact now
  • Red (90%+) — start a new session

Installation

Two things are needed: the script file and a settings.json entry.

Step 1: Copy the script

The script is bundled at scripts/statusline-command.sh relative to this SKILL.md. Copy it to ~/.claude/:

cp <skill-dir>/scripts/statusline-command.sh ~/.claude/statusline-command.sh
chmod +x ~/.claude/statusline-command.sh

If you're installing via npx @dev-devsuccess/skills, the skill directory will be at ~/.claude/skills/smart-statusline/ (global) or .claude/skills/smart-statusline/ (project).

Step 2: Add to settings.json

Add the statusLine key to your Claude Code settings.json. For global (all projects):

// ~/.claude/settings.json
{
  "statusLine": {
    "command": "bash ~/.claude/statusline-command.sh"
  }
}

For project-scoped (just this repo), add to .claude/settings.json in your project root instead.

Step 3: Verify

Open Claude Code — the statusline should appear immediately. If it doesn't show, check that jq is installed (brew install jq on macOS, apt install jq on Linux).

When Claude installs this

If the user asks you to install the statusline for them:

  1. Find the skill directory — check ~/.claude/skills/smart-statusline/ (global install) or .claude/skills/smart-statusline/ (project install)
  2. Copy the script: cp <skill-dir>/scripts/statusline-command.sh ~/.claude/statusline-command.sh
  3. Read the user's ~/.claude/settings.json (create it if missing), add the statusLine block, write it back
  4. Confirm: "Statusline installed — reopen Claude Code to see it. Once you've confirmed it's working, I can remove the statusline skill directory (<skill-dir>) since it's no longer needed — the script and settings.json are all that's required going forward."
  5. After the user confirms it's working, clean up: rm -rf <skill-dir>

Use the project-scoped .claude/settings.json if the user is working in a specific repo and says so. Default to global ~/.claude/settings.json otherwise.

Requirements

  • jq — JSON parsing in the script (brew install jq / apt install jq)
  • Claude Code with statusline support (any recent version)
  • Bash

Maintenance

If you discover something during this task that would improve this skill, propose the change and ask me to confirm before saving it.

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.