smithery.ai

claude-code-statusline-development

This skill should be used when the user asks to "create a statusline", "customize the status line", "add a custom prompt", or mentions Claude Code statusline.

First seen Mar 22, 2026

Installation

$ npx skills add https://smithery.ai

Summary

  • This skill should be used when the user asks to "create a statusline", "customize the status line", "add a custom prompt", or mentions Claude Code statusline.
  • Also suggest when the user wants to display git branch, context usage, model name, or session costs at the bottom of Claude Code.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Grep
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,921 B
  • docs SUMMARY.md 330 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Claude Code Statusline Development

Create custom status lines that display contextual information at the bottom of Claude Code.

Quick Reference

You MUST read the reference files for detailed schemas and examples:

  • [JSON Schema](./references/json-schema.md) - Complete input structure documentation
  • [Example: Simple](./references/example-simple.md) - Basic bash statusline
  • [Example: Git-Aware](./references/example-git-aware.md) - Git branch and status
  • [Example: Context Usage](./references/example-context-usage.md) - Context window percentage
  • [Example: Cost Tracking](./references/example-cost-tracking.md) - Session costs and tokens

Configuration

Add to .claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "padding": 0
  }
}

How It Works

  • Status line updates when conversation messages change
  • Updates run at most every 300ms
  • First line of stdout becomes the status line text
  • ANSI color codes supported
  • JSON context passed via stdin

JSON Input (Quick Reference)

Field Description
model.display_name Model name (e.g., "Opus")
workspace.current_dir Current working directory
workspace.project_dir Original project directory
cost.totalcostusd Session cost in USD
cost.totallinesadded Lines added this session
cost.totallinesremoved Lines removed this session
contextwindow.contextwindow_size Max context tokens
contextwindow.currentusage Current token usage object

See [JSON Schema](./references/json-schema.md) for complete structure.

Script Template

#!/bin/bash
input=$(cat)

# Extract values using jq
model=$(echo "$input" | jq -r '.model.display_name')
dir=$(echo "$input" | jq -r '.workspace.current_dir')

# Colors via tput
blue=$(tput setaf 4)
reset=$(tput sgr0)

echo "${blue}[$model]${reset} ${dir##*/}"

Make executable:

chmod +x ~/.claude/statusline.sh

Tips

  • Keep output concise - single line only
  • Use tput for portable ANSI colors
  • Test with mock JSON: echo '{"model":{"display_name":"Test"}}' | ./statusline.sh
  • Cache expensive operations (git status) if needed

Important

After creating or modifying statuslines, inform the user:

No restart needed. Statusline changes take effect immediately - Claude Code reads settings fresh on each update.

Attribution

Based on Claude Code Status Line Configuration.