statusline
Skill4 starsChanged 3 months agoMITView on GitHub
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Add a statusLine entry to ~/.cursor/cli-config.json:
- Distinctive: line 127
If the command exits non-zero with empty stdout, the status line is not updated (previous text is kept).
- Distinctive: line 128
If the command times out or a new update arrives while the script is running, the in-flight process is killed.
- Distinctive: line 190
Test a script with mock input:
“Common” is measured: kept by at least 6 in 10 of the 13 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
CLI Status Line
The CLI supports a user-configurable status line rendered above the prompt. A command is spawned on each conversation update, receives a JSON payload on stdin describing the session, and its stdout is displayed as the status line. The spec is aligned with Claude Code's status line.
Configuration
Add a statusLine entry to ~/.cursor/cli-config.json:
{
"statusLine": {
"type": "command",
"command": "~/.cursor/statusline.sh",
"padding": 2
}
}The command field supports full paths, ~ expansion, and shell-style argument splitting. You can point it at a script file or use an inline command like jq -r '...'.
| Field | Required | Default | Description |
type | yes | — | Must be "command" |
command | yes | — | Path to an executable or inline command. ~ is expanded. |
padding | no | 0 | Horizontal inset (in characters) for the status line container. |
updateIntervalMs | no | 300 | Minimum interval between invocations. Clamped to >= 300ms. |
timeoutMs | no | 2000 | Maximum time the command may run before it is killed. |
Stdin payload
The command receives a JSON object on stdin. The TypeScript interface is StatusLinePayload in packages/agent-cli/src/hooks/use-status-line.ts.
Full JSON schema
{
"session_id": "abc123",
"session_name": "my session",
"transcript_path": "/path/to/transcript.jsonl",
"render_width_chars": 120,
"cwd": "/Users/me/project",
"autorun": false,
"model": {
"id": "claude-4-opus",
"display_name": "Claude 4 Opus",
"param_summary": "(Thinking)",
"max_mode": true
},
"workspace": {
"current_dir": "/Users/me/project",
"project_dir": "/Users/me/project/.cursor/transcripts",
"added_dirs": []
},
"version": "1.2.3",
"output_style": {
"name": "default"
},
"context_window": {
"total_input_tokens": 15234,
"total_output_tokens": null,
"context_window_size": 200000,
"used_percentage": 34.5,
"remaining_percentage": 65.5,
"current_usage": null
},
"vim": {
"mode": "NORMAL"
},
"worktree": {
"name": "my-feature",
"path": "/Users/me/.cursor/worktrees/repo/my-feature"
}
}Available fields
| Field | Description |
session_id | Unique session identifier |
session_name | Custom session name. Absent if no name has been set |
transcript_path | Path to conversation transcript file |
render_width_chars | Usable terminal columns minus built-in padding |
cwd, workspace.current_dir | Current working directory (both contain the same value) |
autorun | true when auto-run is enabled for the current session |
workspace.project_dir | Directory where transcripts are stored |
workspace.added_dirs | Additional directories (empty array for now) |
model.id, model.display_name | Current model identifier and display name |
model.param_summary | Formatted parameter summary (e.g. "(Thinking)", "High"). Absent when empty |
model.max_mode | true when max mode is enabled. Absent otherwise |
version | CLI version string |
output_style.name | "default" or "compact" |
context_window.total_input_tokens | Estimated input tokens (derived from used_percentage) |
context_window.total_output_tokens | Cumulative output tokens (null when not tracked) |
context_window.context_window_size | Maximum context window size in tokens |
context_window.used_percentage | Percentage of context window used |
context_window.remaining_percentage | Percentage of context window remaining |
context_window.current_usage | Token counts from the last API call (null before first call) |
vim.mode | "NORMAL" or "INSERT" when vim mode is enabled |
worktree.name | Worktree name when running inside a worktree |
worktree.path | Absolute path to the worktree directory |
Fields that may be absent
session_name— only present when a custom name has been setmodel.param_summary— only present when model has non-default parametersmodel.max_mode— only present when max mode is enabledvim— only present when vim mode is enabledworktree— only present when running in a worktree
Fields that may be null
context_window.current_usage— null before the first API callcontext_window.used_percentage,context_window.remaining_percentage— may be null early in the session
Stdout / rendering
- Multiple lines are supported: each line of stdout renders as a separate row in the status area.
- ANSI color codes are supported (use chalk, tput,
\033[32m, etc.). - If the command exits non-zero with empty stdout, the status line is not updated (previous text is kept).
- If the command times out or a new update arrives while the script is running, the in-flight process is killed.
- The status line runs locally and does not consume API tokens.
Examples
Basic: model + context usage
#!/usr/bin/env bash
payload=$(cat)
model=$(echo "$payload" | jq -r '.model.display_name')
pct=$(echo "$payload" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
printf "\033[90m%s ctx %s%%\033[0m" "$model" "$pct"Context progress bar
#!/usr/bin/env bash
input=$(cat)
MODEL=$(echo "$input" | jq -r '.model.display_name')
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
BAR_WIDTH=10
FILLED=$((PCT * BAR_WIDTH / 100))
EMPTY=$((BAR_WIDTH - FILLED))
BAR=""
[ "$FILLED" -gt 0 ] && printf -v FILL "%${FILLED}s" && BAR="${FILL// /▓}"
[ "$EMPTY" -gt 0 ] && printf -v PAD "%${EMPTY}s" && BAR="${BAR}${PAD// /░}"
echo "[$MODEL] $BAR $PCT%"Multi-line with git info
#!/usr/bin/env bash
input=$(cat)
MODEL=$(echo "$input" | jq -r '.model.display_name')
DIR=$(echo "$input" | jq -r '.workspace.current_dir')
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
BRANCH=""
git rev-parse --git-dir > /dev/null 2>&1 && BRANCH=" | 🌿 $(git branch --show-current 2>/dev/null)"
echo -e "\033[36m[$MODEL]\033[0m 📁 ${DIR##*/}$BRANCH"
echo -e "ctx $PCT%"Inline jq command (no script file)
{
"statusLine": {
"type": "command",
"command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'"
}
}Testing
Test a script with mock input:
echo '{"model":{"display_name":"Opus"},"context_window":{"used_percentage":25}}' | ./statusline.shThe command is spawned with child_process.spawn (no shell on Unix, shell: true on Windows for .cmd/.bat compatibility). Updates are debounced at the configured interval. If a new update triggers while a script is running, the in-flight process is killed via AbortController and the new invocation starts immediately.
Other versions20 projects use a version of this.
Word for word · 3
- Goodnessmbakara/codex-skills★ 1100% same
- filipefalcaofs/repo-padrao★ 0100% same
- marslo/skills★ 0100% same
Edited · 3
- JameMy0001/antigravity-skills-hub★ 196% same
- leishifu666/skills★ 199% same
- PandelisZ/skills★ 199% same
Wrote their own version · 14
- etr/groundwork★ 44same name
- Alexander-Tyagunov/magician★ 14same name
- LarryStanley/pi-delegate★ 4same name
- skrrt-sh/skills★ 3same name
- 0mlkrizzz655335v/claude-skills-zh★ 2same name
- Eliasjunit/vibestretch★ 2same name
- zedarvates/botte-secrete★ 2same name
- bananasfromwork/claude-code-plugin★ 1same name
- Galliard7/skills★ 1same name
- psw7205/skills★ 1same name
4 more not listed
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.
Used alongsideProjects with it also use review-bugbot, origin and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 4 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
- +1 more from 0mlkrizzz655335v
In this repository48 other files it gives its agents.
- .claude/templates/AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .cursor/rules/core.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/k8s.mdcCursor rule
- .cursor/rules/node.mdcCursor rule
- .cursor/rules/python.mdcCursor rule
- .cursor/rules/rust.mdcCursor rule
- .cursor/rules/tdd.mdcCursor rule
- .cursor/rules/workbench.mdcCursor rule
- llms-full.txtllms.txt
- llms.txtllms.txt
- cmux-sprint-orchestratorSkill
- config-auditSkill
- doneSkill
- eurekaSkill
- goalSkill
- go-reviewSkill
- handoffSkill
- js-reviewSkill
- k8s-debugSkill
- k8s-reviewSkill
- kickoffSkill
- pr-review-ingestSkill
- pr-reviewSkill
- python-reviewSkill
- reflectionSkill
- skill-evalSkill
- tdd-protocolSkill
- team-executeSkill
- team-planSkill
- team-shutdownSkill
- test-reviewSkill
- validate-recommendationSkill
- worktree-guideSkill
- babysitSkill
- canvasSkill
- create-hookSkill
- create-ruleSkill
- create-skillSkill
- create-subagentSkill
- migrate-to-skillsSkill
- sdkSkill
- shellSkill
- split-to-prsSkill
- update-cli-configSkill
- update-cursor-settingsSkill
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.

