statuslinelisted
Install: claude install-skill josefheld/claude-plugins
# Configurable statusline
The plugin ships `statusline-command.sh` plus an installer that points Claude
Code's `statusLine` setting at it. Because the setting points into the plugin
directory, every plugin update also updates the script. Nothing gets copied
into `~/.claude`.
## Prerequisite
`jq` must be on the PATH (`brew install jq`, `apt-get install jq`). Without it
the script prints nothing.
## Install
Run the installer. `${CLAUDE_PLUGIN_ROOT}` is set when the skill runs, so use
it verbatim:
```sh
sh "${CLAUDE_PLUGIN_ROOT}/scripts/install-statusline.sh"
```
It backs up `settings.json` first (`settings.json.bak-<timestamp>`), refuses to
touch the file if it is not valid JSON, and prints the resulting `statusLine`
entry.
`${CLAUDE_PLUGIN_ROOT}` points into `~/.claude/plugins/cache/<marketplace>/<plugin>/<sha>/`,
and that `<sha>` changes with every plugin update. The installer therefore
rewrites it to the stable `~/.claude/plugins/marketplaces/<marketplace>/plugins/<plugin>/`
before writing `settings.json`. Check the path it prints, and never hand-write
a cache path into `settings.json`. The statusline appears in the next session, not the current one, so tell
the user to restart Claude Code.
Variants:
| Command | Effect |
|---|---|
| `install-statusline.sh model,context,git` | only these segments, in this order |
| `install-statusline.sh --project` | writes `.claude/settings.json` in the current repo instead of the user settings |
| `install-statusline.sh --show` |