statusline
Skill4 starsChanged 3 months agoMITView on GitHub
Add a live pi dispatch indicator to the Claude Code status line, composed with whatever status line the user already has
10 other projects use a version of this.
Adopted by
Most recently taken up by
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- leishifu666/skillstheir own version, first seen Sep 29, 2026
- Alexander-Tyagunov/magiciantheir own version, first seen Sep 28, 2026
- etr/groundworktheir own version, first seen Sep 10, 2026
- Instafill/statuslinetheir own version, first seen Sep 4, 2026
- statusdone/claude-skillstheir own version, first seen Jul 22, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- etr/groundwork★ 43same name
- Alexander-Tyagunov/magician★ 14same name
- Bangs00/claude-media-control★ 4same name
- Galliard7/skills★ 1same name
- JameMy0001/antigravity-skills-hub★ 1same name
- leishifu666/skills★ 1same name
- PandelisZ/skills★ 1same name
- psw7205/skills★ 1same name
- Instafill/statusline★ 0same name
- statusdone/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 53
If nothing is running it prints nothing, which is correct and worth saying out loud — the row only exists while a dispatch is in flight.
- Distinctive: line 93
If they would rather not have the timer, the indicator still works — it just only updates when something else already caused a redraw.
- Very specific: line 133
Write the wrapper. Substitute their real command into PI_DELEGATE_ORIGINAL (single-quoted, with any embedded ' escaped as '\''), or leave …
- Distinctive: line 184
Verify by running the wrapper the same way Claude Code will, and show them the result:
- Distinctive: line 191
If that prints their original status line unchanged, the composition worked.
- Very specific: line 200
Removing it: read PI_DELEGATE_ORIGINAL out of the wrapper, put it back as statusLine.command, and drop refreshInterval if they did not have …
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
The user wants the pi indicator in their status line: $ARGUMENTS
statusLine is a single global field in ~/.claude/settings.json. There is exactly one,
and a plugin cannot ship its own — the plugin settings.json supports only agent and
subagentStatusLine. So there is no way to add this without writing to the user's settings,
and every step below exists because of that: whatever is already there is theirs, it is
probably the only status line they have, and replacing it is not a thing to do quietly.
Work through this with them. Do not run it end to end and report afterwards.
1. Find out what is already there
python3 -c "
import json, os
p = os.path.expanduser('~/.claude/settings.json')
d = json.load(open(p)) if os.path.exists(p) else {}
print(json.dumps(d.get('statusLine', None), indent=2))
print('refreshInterval:', (d.get('statusLine') or {}).get('refreshInterval', '(unset)'))
"If the command contains pi-delegate/statusline-wrapper.sh, it is already ours. Stop and
go to step 6 (update in place). Wrapping a wrapper is the obvious way to end up running the
user's real status line twice, and then four times.
2. Probe it — do not reason about it
Whatever is there, run it and look. It gets a JSON payload on stdin, so give it one:
printf '%s' '{"session_id":"probe","cwd":"'"$PWD"'","model":{"id":"claude-opus-5","display_name":"Opus 5"},"workspace":{"current_dir":"'"$PWD"'","project_dir":"'"$PWD"'"},"version":"2.0.0","context_window":{"used_percentage":25}}' \
| <their command> > /tmp/pi-probe.out 2>/tmp/pi-probe.err
echo "exit=$? lines=$(wc -l < /tmp/pi-probe.out)"
cat /tmp/pi-probe.outThis is the whole reason the composition is safe for people whose setup you have never seen. You are not guessing at ccstatusline, starship, powerline or a personal shell script — you are looking at the bytes it produced. Note the line count; that is what the "after" preview needs.
Then show them their pi segment, on its own:
"${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh"If nothing is running it prints nothing, which is correct and worth saying out loud — the row only exists while a dispatch is in flight. To show them what it will look like, fake one:
mkdir -p ~/.claude/pi-delegate/status
{ echo "pid=$$ running=2 oldest=$(( $(date +%s) - 192 )) updated=$(date +%s) models=Qwen3.8-27B"
echo "$CLAUDE_CODE_MESSAGING_SOCKET"; } > ~/.claude/pi-delegate/status/preview.status
"${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh"
rm ~/.claude/pi-delegate/status/preview.statusThe second line is the owner: the session that wrote the file. The reader shows only files whose owner matches its own, so a preview written without it renders nothing — and so does another Claude Code window's real dispatch, which is the point.
Show them before and after — their real output, then their real output with the pi row under it — and ask before writing anything.
3. Say what it costs, before they answer
Two things, and neither is obvious from the preview:
refreshIntervalis required, not decorative. Without it the status line only reruns on conversation events, and those go quiet exactly when an async dispatch is running and the session is idle — which is the entire case this feature exists for. The recommended value is1, the minimum Claude Code allows.- Why
1and not something cheaper: the default row shows an elapsed seconds counter, and a counter refreshed every 2 seconds skips numbers — 8s, 10s, 12s. That reads as broken rather than as slow, and it is the first thing anyone notices. Anything above1needs the counter taken out offmt_elapsed(show only minutes, or drop the duration) to look deliberate. refreshIntervalreruns the whole thing, including their existing status line. If theirs shells out togit(most do), that is now running every second for as long as Claude Code is open. Use the timing you measured in step 2: a status line taking ~100ms is roughly 10% of one core at1, 5% at2. If their probe was slow, say the number and offer2or3— paired with editingfmt_elapsedso the seconds counter is not left skipping.- How many rows it can take. There is one row per running dispatch, capped at
MAX_ROWS(4) with a… +N moreline beyond that. Added to whatever they already have, that is their existing height plus up to five. Worth saying out loud to anyone whose status line is already two or three lines tall;MAX_ROWSis theirs to lower.
If they would rather not have the timer, the indicator still works — it just only updates when something else already caused a redraw. Say that plainly rather than talking them into the timer.
4. Install their own copy of the segment
Copy the script to a stable path instead of pointing settings at the plugin:
mkdir -p ~/.claude/pi-delegate
cp "${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh" ~/.claude/pi-delegate/statusline.sh
chmod +x ~/.claude/pi-delegate/statusline.shThe plugin's own path carries its version (.../pi-delegate/0.13.1/...) and every release gets
a new directory, so a settings.json pointing into it breaks on the next /plugin update —
silently, because a status line that fails just doesn't render.
This copy is also where the user's taste goes. The script separates gathering from
rendering: everything above the render banner collects the facts — including deciding which
status files are this session's — and render_row alone decides what a row looks like. It is
called once per running dispatch with started, count and model, plus $DOT and $now;
fmt_elapsed formats the duration and MAX_ROWS caps how many rows print. If they want
different wording, no breathing dot, a different colour, their own glyphs, minutes instead of
seconds, fewer rows — that is all inside those three. Offer this; it is the point of the file
being shaped that way. Leave everything above the banner alone, ownership check included.
One row per dispatch is the contract, not a detail. Two dispatches started ten minutes
apart get a row each, with their own elapsed and their own colour threshold, because a single
aggregated row could only ever tell the truth about the older of them. If they edit
render_row into something multi-line, MAX_ROWS stops bounding the height and the status bar
can grow without limit — worth saying if they start redesigning it.
5. Compose, back up, and write
Back up first, with a timestamp, and tell them the path:
cp ~/.claude/settings.json ~/.claude/settings.json.bak.$(date +%Y%m%d-%H%M%S)Write the wrapper. Substitute their real command into PI_DELEGATE_ORIGINAL (single-quoted,
with any embedded ' escaped as '\''), or leave it empty if they had no status line:
cat > ~/.claude/pi-delegate/statusline-wrapper.sh <<'WRAPPER'
#!/usr/bin/env bash
# Generated by /pi-delegate:statusline. Runs the status line that was configured before
# pi-delegate touched it, then appends the pi row underneath when a dispatch is running.
#
# To restore the original: put PI_DELEGATE_ORIGINAL back as settings.json's
# statusLine.command, or just run /pi-delegate:statusline and ask to remove it.
PI_DELEGATE_ORIGINAL=''
# Deliberately NO `set -e`. The two halves must not be able to take each other down: a
# broken status line is present on every screen the user looks at, so a failure in one half
# has to degrade to "that half is missing", never to an empty bar.
# stdin can only be read once, and both halves want it.
input=$(cat)
if [ -n "$PI_DELEGATE_ORIGINAL" ]; then
printf '%s' "$input" | eval "$PI_DELEGATE_ORIGINAL" || true
fi
# Prints nothing at all unless a pi dispatch is running, so this row costs no height when
# there is nothing to say.
[ -x "$HOME/.claude/pi-delegate/statusline.sh" ] && "$HOME/.claude/pi-delegate/statusline.sh" || true
exit 0
WRAPPER
chmod +x ~/.claude/pi-delegate/statusline-wrapper.shThen point settings at it, preserving every other key:
python3 - <<'PY'
import json, os
p = os.path.expanduser('~/.claude/settings.json')
d = json.load(open(p)) if os.path.exists(p) else {}
d['statusLine'] = {
'type': 'command',
'command': os.path.expanduser('~/.claude/pi-delegate/statusline-wrapper.sh'),
'refreshInterval': 1,
}
json.dump(d, open(p, 'w'), indent=2)
open(p, 'a').write('\n')
print('statusLine ->', d['statusLine'])
PYVerify by running the wrapper the same way Claude Code will, and show them the result:
printf '%s' '{"session_id":"probe","cwd":"'"$PWD"'","model":{"display_name":"Opus 5"},"workspace":{"current_dir":"'"$PWD"'","project_dir":"'"$PWD"'"}}' \
| ~/.claude/pi-delegate/statusline-wrapper.shIf that prints their original status line unchanged, the composition worked. The pi row appears on the next real dispatch. Tell them it takes effect immediately — no reload needed.
6. Updating or removing it later
Updating after a plugin upgrade: re-run step 4's cp. Warn them first if they edited
render — the copy is theirs, and overwriting it silently would throw their work away. Diff it
against the plugin's version and let them decide.
Removing it: read PI_DELEGATE_ORIGINAL out of the wrapper, put it back as
statusLine.command, and drop refreshInterval if they did not have one before (check the
backup). If PI_DELEGATE_ORIGINAL is empty they had no status line, so remove the statusLine
key entirely rather than leaving one that prints only pi rows.
What this deliberately does not do
It does not put pi into the subagent panel below the prompt. subagentStatusLine can only
override the rows Claude Code already renders for its own subagents — override one by id,
or hide it with an empty string. There is no way to add a row, and a pi dispatch is not a
Claude Code subagent. The main status line is the only surface available, so the pi row
imitates that style rather than living there.
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
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.

