README.md

claude-mods #

Mods for Claude Code.

starship-statusline #

A status line in the style of a starship onedark powerline prompt: user, directory (truncated to the repo), jj status, detected languages, the model with its context fill, a pill per plan usage window (5-hour and 7-day, with the time to reset, yellow from 80% and red from 95%), and the active gcloud project and kube context on the right. Under it, the context-graph rows when that mod is installed.

The starship status line, with the context-graph rows under it

Clone this repo and point statusLine in ~/.claude/settings.json at the script:

"statusLine": {
  "type": "command",
  "command": "bash /path/to/claude-mods/starship-statusline/statusline.sh",
  "refreshInterval": 1
}

It needs jq, git, a truecolor terminal and a Nerd Font. The jj segment needs starship-jj and is left out without it; the gcloud and kube segments read ~/.config/gcloud and ~/.kube/config and are left empty without them.

context-graph #

A powerline-style graph of the context window under your status line, split the way /context splits it (system prompt, tools, MCP, agents, memory, skills, messages, free space, autocompact buffer), with a pill showing used/window percent that turns yellow at 60% and red at 80%. A legend row with each category's tokens and the compaction threshold shows or hides with /context-legend, or a key you bind to it.

The context graph with its legend

Install #

At the prompt of a terminal session:

/plugin install context-graph --marketplace mcginleyr1/claude-mods

Answer y to add the marketplace, then pick a scope (user scope loads it in every session).

From a shell:

claude plugin install context-graph --marketplace mcginleyr1/claude-mods

In the desktop app, where /plugin does not run: click + next to the prompt box, then Plugins, Add marketplace with mcginleyr1/claude-mods, then Add plugin.

Draw it in your status line #

The mod only writes the breakdown, to /tmp/claude-context-graph/<session_id>.json; context-graph/statusline.sh draws it. starship-statusline already calls it. For a status line of your own, clone this repo (or copy that script), and at the end of your status line script pipe the status line's JSON into it:

input=$(cat)
# ... print your own status line ...
bash /path/to/claude-mods/context-graph/statusline.sh <<< "$input"

It needs jq, a truecolor terminal and a Nerd Font for the rounded caps.

Toggle the legend with a key #

Bind the mod's command in ~/.claude/keybindings.json:

{
  "bindings": [
    { "context": "Chat", "bindings": { "ctrl+x l": "command:context-legend" } }
  ]
}

The status line only redraws on events such as a new message, so give it a timer in ~/.claude/settings.json for the toggle to show within a second:

"statusLine": { "type": "command", "command": "bash /path/to/your-statusline.sh", "refreshInterval": 1 }

The images #

docs/demo.sh draws the images above from the scripts themselves, run in a sandbox with placeholder names and sample usage, each glyph an outline from JetBrains Mono Nerd Font so they look the same without the font. Run it again after changing the look: bash docs/demo.sh.