Agent skill

Statusline Config

by sd0xdev in sd0xdev/sd0x-harness

Customize Claude Code statusline. An agent skill from sd0xdev/sd0x-harness.

MITAuto-check passedDevelopment

Install Statusline Config

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill statusline-config -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness statusline-config --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/statusline-config .claude/skills/statusline-config && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
statusline-config
GitHub stars
192
Token cost
~2.9k tokens
SKILL.md length
777 words
Files
3 (incl. references)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Customize Claude Code statusline. An agent skill from sd0xdev/sd0x-harness.

  • Works in 6 steps: Read current script: cat… → Ask segments to enable/disable… → Ask theme preference (AskUserQuestion… → …
  • : user says statusline
  • SKILL.md covers When NOT to Use, Segments, Themes and Semantic Tokens, plus 6 more sections
  • Calls git and jq

What it does

Statusline Config is an agent skill from sd0xdev/sd0x-harness. Customize Claude Code statusline. Use when: user says 'statusline', 'status line', 'customize statusline', 'modify statusline', 'statusline settings', 'statusline theme', 'change theme', 'color scheme', wants to add/remove/change segments (cost, git, model, context), switch color themes (catppuccin, dracula, nord), or asks what can be shown in the statusline.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/json-schema.md` and `references/themes.md`).

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • : user says statusline
  • Customize statusline
  • Modify statusline
  • Statusline settings

Example prompts

  • “statusline”
  • “status line”
  • “customize statusline”
  • “/statusline-config”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Read current script: cat ~/.claude/statusline-command.sh
  2. Ask segments to enable/disable (AskUserQuestion multiSelect)
  3. Ask theme preference (AskUserQuestion with theme options)
  4. Generate script following Script Rules + selected theme from themes.md
  5. Write to ~/.claude/statusline-command.sh
  6. Verify: echo '{"model":{"display_name":"Opus 4.6"},"workspace":{"current_dir":"/tmp/test"},"context_window":{"remaining_percentage":55},"co…

What it can do on your machine

Read from SKILL.md and the folder at commit c9a2036. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Statusline Config loads about 2.9k tokens when it runs, and up to ~5.6k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 777 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sd0xdev/sd0x-harness at commit c9a2036, republished under its MIT licence (© sd0xdev). 777 words, ~2,944 tokens.

Download SKILL.mdSave it as .claude/skills/statusline-config/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
statusline-config
description
Customize Claude Code statusline. Use when: user says 'statusline', 'status line', 'customize statusline', 'modify statusline', 'statusline settings', 'statusline theme', 'change theme', 'color scheme', wants to add/remove/change segments (cost, git, model, context), switch color themes (catppuccin, dracula, nord), or asks what can be shown in the statusline.

StatusLine Config

Customize ~/.claude/statusline-command.sh — segments, themes, and colors.

When NOT to Use

ScenarioUse Instead
Setting statusline for the first time (no customization needed)Built-in statusline-setup agent (Claude Code agent type) — applies defaults automatically
Editing settings.json directlyManual edit — this skill manages statusline-command.sh, not settings.json
Debugging Claude Code startup issues/claude-health — config health check

Segments

SegmentJSON FieldDefaultNotes
Directoryworkspace.current_dirONTruncate deep paths: ~/.../last-dir
Git branchshell gitON--no-optional-locks, cache 5s
Agentagent.nameON (conditional)Show when present; color: C_MODEL
Modelmodel.display_name + context_window.context_window_sizeONSmart tier suffix: Opus 4.6 (1M) — auto-skip if display_name already contains context info
Context %context_window.remaining_percentage + context_window_sizeONctx 60% left (600k/1M) — Green >40%, Yellow 20-40%, Red <=20%
Token Usagecontext_window.total_input_tokens + total_output_tokensON (conditional){in}k/{out}k session cumulative; color: C_COST
Costcost.total_cost_usdONShow when >= $0.005, est $X.XX
Rate Limitsrate_limits.five_hour.used_percentage + seven_day.used_percentageON (conditional)5h: 85% left · 7d: 82% left — displays remaining (100 - used); color thresholds match context %: Green >40%, Yellow 20-40%, Red <=20%; OAuth users only
Worktreeworktree.name + worktree.branchON (conditional)[WT:{name}] {branch} or [WT:{name}] if branch absent; replaces Directory + Git branch when present; color: C_BRANCH

For full JSON schema, see json-schema.md.

Themes

ThemeTypeDefaultNotes
ansi-defaultANSI 16✅Safe fallback, works everywhere
catppuccin-mochaTrueColor—Recommended — pastel, WCAG AA >=4.5:1
draculaTrueColor—Vibrant purple/pink accents
nordTrueColor—Arctic blue, muted tones
none——No colors (NO_COLOR auto-triggers)

Switch via: export CLAUDE_STATUSLINE_THEME=catppuccin-mocha

For complete token→hex mappings, see themes.md.

Semantic Tokens

Scripts use semantic tokens instead of hardcoded colors:

TokenRoleExample
C_CWDDirectory pathblue / sapphire
C_BRANCHGit branch namemagenta / mauve
C_MODELModel display namecyan / teal
C_CTX_OKContext >= 41%green
C_CTX_WARNContext 21-40%yellow
C_CTX_BADContext <= 20%red
C_COSTCost displaymuted text
C_ALERT>200k token warning (legacy, segment removed)orange/peach + bold
C_SEPPipe separator |dim/overlay
C_MUTEDSecondary infosubtext
C_TEXTGeneral textforeground
C_RESETReset all formatting\033[0m

Workflow

No args → Apply best-practice defaults (all ON segments + ansi-default theme). Go to step 4.

Theme change (e.g. "use catppuccin-mocha", "switch to dracula") → Read themes.md, apply requested theme. Go to step 4. Aliases: catppuccin → catppuccin-mocha.

Custom requests (e.g. "add cost", "remove git", "no colors") → Interactive flow:

  1. Read current script: cat ~/.claude/statusline-command.sh
  2. Ask segments to enable/disable (AskUserQuestion multiSelect)
  3. Ask theme preference (AskUserQuestion with theme options)
  4. Generate script following Script Rules + selected theme from themes.md
  5. Write to ~/.claude/statusline-command.sh
  6. Verify: echo '{"model":{"display_name":"Opus 4.6"},"workspace":{"current_dir":"/tmp/test"},"context_window":{"remaining_percentage":55},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false}' | ~/.claude/statusline-command.sh
Show full SKILL.md (383 more words)Show less

Script Rules

  • Shebang: #!/bin/sh (POSIX)
  • Read stdin: input=$(cat)
  • Parse JSON: jq -r '.field // fallback'
  • Theme from env: theme="${CLAUDE_STATUSLINE_THEME:-ansi-default}"
  • NO_COLOR: [ -n "${NO_COLOR:-}" ] && theme="none"
  • Theme aliases: catppuccin → catppuccin-mocha
  • Invalid theme: fallback to ansi-default
  • Color output: printf "%b" for ANSI/TrueColor, printf "%s" for none
  • TrueColor format: \033[38;2;R;G;Bm (24-bit foreground)
  • Git: git --no-optional-locks -C "$dir"
  • Git cache: /tmp/claude-statusline-git-cache-$(id -u), 5s TTL, stat -f %m (macOS) / stat -c %Y (Linux)
  • CWD truncation: depth >2 → ~/.../basename
  • Cost: only when >= 0.005, format est $X.XX
  • Alert style: C_ALERT + bold (\033[1m) to distinguish from C_CTX_BAD
  • Token format: %.1fk via awk (e.g. 8500 → 8.5k); values < 1000 show raw number
  • Tier format: >=1M → (1M), >=1000 → ({N}k), else raw; used for model suffix + context absolute
  • Model tier suffix: append (1M) or (200k) from context_window_size; skip if display_name already contains context, 1M, or 200k
  • Context absolute: ctx 60% left (600k/1M) — remaining tokens calculated from remaining_percentage * context_window_size / 100
  • Sanitize free-text: strip control chars (tr -d '[:cntrl:]') + truncate 30 chars for agent.name, worktree.name, worktree.branch
  • Worktree replace: when worktree.name present, replace Directory + Git branch with [WT:{name}] {branch} (or [WT:{name}] if worktree.branch absent — hook-based worktrees)
  • Rate limits: show when rate_limits present; display remaining % (100 - used_percentage) with "left" suffix; format 5h: {rem}% left · 7d: {rem}% left; color by worst remaining — Green >40% (C_CTX_OK), Yellow 20-40% (C_CTX_WARN), Red <=20% (C_CTX_BAD); thresholds match context %; OAuth users only
  • Rate limits resets_at: extracted but not displayed in v1 (too verbose for statusline)
  • Render order (normal): Directory | Git branch | Agent? | Model (tier) | Context % (abs) · Token Usage? · Cost? · Rate Limits?
  • Render order (worktree): [WT:name] branch | Agent? | Model (tier) | Context % (abs) · Token Usage? · Cost? · Rate Limits?

Script Structure

sh
#!/bin/sh
input=$(cat)
# ... extract JSON fields ...

theme="${CLAUDE_STATUSLINE_THEME:-ansi-default}"
[ -n "${NO_COLOR:-}" ] && theme="none"

case "$theme" in
  catppuccin|catppuccin-mocha) # set C_* tokens with TrueColor values ;;
  dracula)          # ... ;;
  nord)             # ... ;;
  none)             # all C_* = "" ;;
  *)                # ansi-default: ANSI 16 colors ;;
esac

# ... build output using C_* tokens ...
if [ "$theme" = "none" ]; then
  printf "%s" "$out"
else
  printf "%b" "$out"
fi

Example Output

Normal mode (1M context):
~/.../my-project | feat/auth | Opus 4.6 (1M) | ctx 60% left (600k/1M) · 85.0k/12.0k · est $18.12

Normal mode (200k context):
~/.../my-project | main | Sonnet 4.6 (200k) | ctx 30% left (60k/200k) · 120.0k/8.0k · est $3.50

With agent:
~/.../my-project | feat/auth | security-reviewer | Opus 4.6 (1M) | ctx 48% left (480k/1M) · est $0.12

Worktree mode:
[WT:fix-123] bugfix/issue-123 | Opus 4.6 (1M) | ctx 22% left (220k/1M) · 42.0k/8.0k · est $1.23

With rate limits (OAuth user, green):
~/.../my-project | feat/auth | Opus 4.6 (1M) | ctx 60% left (600k/1M) · 85.0k/12.0k · est $18.12 · 5h: 58% left · 7d: 82% left

Rate limits warning (yellow):
~/.../my-project | main | Opus 4.6 (1M) | ctx 30% left (300k/1M) · 5h: 25% left · 7d: 35% left

Rate limits critical (red):
~/.../my-project | main | Opus 4.6 (1M) | ctx 30% left (300k/1M) · 5h: 8% left · 7d: 55% left

display_name already has context info (no duplicate suffix):
~/.../my-project | main | Opus 4.6 (1M context) | ctx 60% left (600k/1M) · est $18.12

Output

ArtifactPathDescription
StatusLine script~/.claude/statusline-command.shPOSIX shell script consuming JSON stdin

Verification

After generating the script, verify:

  • ~/.claude/statusline-command.sh exists and is executable (chmod +x)
  • v2 test passes: echo '{"model":{"display_name":"Opus 4.6"},"cwd":"/tmp/test","workspace":{"current_dir":"/tmp/test","project_dir":"/tmp/test"},"context_window":{"remaining_percentage":55,"used_percentage":45,"context_window_size":200000,"total_input_tokens":85000,"total_output_tokens":12000,"current_usage":{"input_tokens":8500,"output_tokens":1200,"cache_creation_input_tokens":5000,"cache_read_input_tokens":2000}},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false,"session_id":"test","version":"2.1.80","output_style":{"name":"default"},"rate_limits":{"five_hour":{"used_percentage":42.5,"resets_at":"2026-03-21T14:30:00Z"},"seven_day":{"used_percentage":18.2,"resets_at":"2026-03-25T00:00:00Z"}}}' | ~/.claude/statusline-command.sh
  • Output contains expected segments (directory, model, context %, token usage 8.5k/1.2k)
  • Agent test: echo '{"model":{"display_name":"Opus 4.6"},"workspace":{"current_dir":"/tmp/test"},"context_window":{"remaining_percentage":55},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false,"agent":{"name":"security-reviewer"}}' | ~/.claude/statusline-command.sh shows security-reviewer segment
  • Worktree test: echo '{"model":{"display_name":"Opus 4.6"},"worktree":{"name":"fix-123","branch":"bugfix/issue-123"},"context_window":{"remaining_percentage":55},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false}' | ~/.claude/statusline-command.sh shows [WT:fix-123] bugfix/issue-123 replacing directory/branch
  • Rate limits test: output contains 5h: 58% left · 7d: 82% left with green color
  • Rate limits absent: echo '{"model":{"display_name":"Opus 4.6"},"workspace":{"current_dir":"/tmp/test"},"context_window":{"remaining_percentage":55},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false}' | ~/.claude/statusline-command.sh produces valid output without rate limits segment (no errors)
  • v1 backward compat: echo '{"model":{"display_name":"Opus 4.6"},"workspace":{"current_dir":"/tmp/test"},"context_window":{"remaining_percentage":55},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false}' | ~/.claude/statusline-command.sh produces valid output without errors
  • Theme matches user selection (check color codes in script)
  • NO_COLOR=1 produces uncolored output

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/statusline-config of sd0xdev/sd0x-harness.

  • SKILL.md
  • references/json-schema.md
  • references/themes.md

Open the folder on GitHubat commit c9a2036

Compare with similar skills

Statusline Config next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Statusline Config compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Statusline Config this skillsd0xdev/sd0x-harness192—~2.9kAutomated safety check: PassMIT
Commit Context Lookuprohitg00/agentmemory29k—~522Automated safety check: PassApache-2.0
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT
GitHubswarmclawai/swarmclaw687—~820Automated safety check: PassMIT
Project Session ManagerYeachan-Heo/oh-my-claudecode40k—~4kAutomated safety check: PassMIT
basemind CLI Codebase NavigatorGoldziher/basemind106—~2kAutomated safety check: PassMIT

Similar skills

  • Commit Context Lookup

    rohitg00/agentmemory

    Traces a file, function or line back to the agent session behind its current commit, using git blame and a memory lookup, and reports only what the records show.

    29k GitHub stars~522 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • GitHub

    swarmclawai/swarmclaw

    GitHub operations via gh CLI: issues, PRs, CI runs, code review, API queries.

    687 GitHub stars~820 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Project Session Manager

    Yeachan-Heo/oh-my-claudecode

    Creates isolated git worktrees, with optional tmux sessions, for PR reviews, issue fixes and feature work across projects and repositories.

    40k GitHub stars~4k tokensUpdated today
    DevelopmentAuto-check passed
  • Drives the basemind code-intelligence tool from the command line for symbol search, callers, git history and blame, document search and web crawling, sharing its cache with the MCP server.

    106 GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Targeted Emergency Bug Fix

    VeryGoodOpenSource/vgv-wingspan

    Applies a minimal fix to an emergency bug through triage, root-cause location, a hotfix branch and a blast-radius check, with tests and review still required.

    108 GitHub stars~1.9k tokensUpdated 7 days ago
    DevelopmentAuto-check passed

More from sd0xdev/sd0x-harness

All 91 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Statusline Config

What does Statusline Config do?

Customize Claude Code statusline. An agent skill from sd0xdev/sd0x-harness. Statusline Config is an agent skill from sd0xdev/sd0x-harness. Customize Claude Code statusline.

When should I use Statusline Config?

Statusline Config fits situations like: : user says statusline; customize statusline; modify statusline; statusline settings.

How do I install Statusline Config in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill statusline-config -a claude-code`. Or copy the skill folder (skills/statusline-config in sd0xdev/sd0x-harness) into .claude/skills/statusline-config in your project. Claude Code loads it when a task matches its description.

How do I install Statusline Config in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill statusline-config -a codex`. Or copy the skill folder (skills/statusline-config in sd0xdev/sd0x-harness) into .agents/skills/statusline-config in your project. Codex loads it when a task matches its description.

Can I use Statusline Config in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill statusline-config -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/statusline-config, .gemini/skills/statusline-config, .github/skills/statusline-config and .opencode/skills/statusline-config in your project.

What does Statusline Config need to run?

Going by SKILL.md and its folder, Statusline Config needs the command-line tools its instructions call (git and jq).

Does Statusline Config access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Statusline Config safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Statusline Config use?

Statusline Config is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Statusline Config use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.

What are the alternatives to Statusline Config?

Skills that share tags, products or a category with Statusline Config: Commit Context Lookup (rohitg00/agentmemory, 29k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars), GitHub (swarmclawai/swarmclaw, 687 stars) and Project Session Manager (Yeachan-Heo/oh-my-claudecode, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Statusline Config?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 6, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.