← 返回 Skills 市场
ajitsingh25

Claude Code Statusline

作者 Ajit Singh · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
175
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install claude-code-statusline
功能描述
Install and configure a custom Claude Code status line showing real-time token usage, context window percentage, git branch, and color-coded warnings. Use wh...
使用说明 (SKILL.md)

Claude Code Status Line

Install a security-hardened status line for Claude Code CLI that displays:

user@host:dir (branch) | Model | In:8.5K Out:1.2K Cache:7K [23%]

Prerequisites

  • Python 3 (standard library only, no pip dependencies)
  • git (optional, for branch display)

Script

scripts/statusline_installer.py -- Python 3, standard library only.

# Install with defaults
python3 scripts/statusline_installer.py install

# Install with custom thresholds
python3 scripts/statusline_installer.py install --threshold-yellow 30 --threshold-orange 50 --threshold-red 70

# Install with combined token display
python3 scripts/statusline_installer.py install --token-display combined

# Check installation
python3 scripts/statusline_installer.py status

# Update config
python3 scripts/statusline_installer.py configure --threshold-red 80 --color-green cyan

# Remove
python3 scripts/statusline_installer.py uninstall [--remove-config]

How It Works

  1. install -- Copies statusline.py to ~/.claude/scripts/, creates config at ~/.claude/statusline.config (perms 600), updates ~/.claude/settings.local.json with python3 ~/.claude/scripts/statusline.py command.

  2. status -- JSON output: script installed, config state, settings configured, git availability.

  3. configure -- Update thresholds (--threshold-yellow/orange/red), colors (--color-green/yellow/orange/red), display mode (--token-display separate|combined). Validates threshold ordering.

  4. uninstall -- Removes script, reverts settings. --remove-config also deletes config file.

Configuration

Config file: ~/.claude/statusline.config

Option Default Values
TOKEN_DISPLAY separate separate (In/Out/Cache), combined (total)
THRESHOLD_YELLOW 40 0-100
THRESHOLD_ORANGE 50 0-100
THRESHOLD_RED 70 0-100
COLOR_* standard ANSI Color name or ANSI code

Available colors: green, yellow, orange, red, blue, cyan, magenta, purple, white, pink, bright-green, bright-yellow, bright-red, bright-blue, bright-cyan, bright-magenta.

After Install

Restart Claude Code (exit then claude) to activate.

安全使用建议
This skill appears to do what it claims: a local status line and installer that writes files under ~/.claude and updates your Claude Code settings.json. Before installing: (1) Inspect the bundled scripts (they're included) if you have any doubt. (2) Back up ~/.claude/settings.json (the installer modifies this file). (3) Note the documentation mismatch: SKILL.md mentions settings.local.json but the installer updates settings.json — expect the latter. (4) The installer and script run entirely locally (no network calls), but they will add persistent entries to your Claude Code config; uninstall removes those entries. If you want extra caution, run the installer in a controlled environment or review/execute the copy steps manually instead of running the install command.
功能分析
Type: OpenClaw Skill Name: claude-code-statusline Version: 1.0.0 The skill bundle provides a utility to install and configure a custom status line for the Claude Code CLI. The implementation is high-quality and includes explicit security hardening measures such as strict file permission checks (600/400), symlink protection, input sanitization (stripping ANSI and control characters), and whitelisted configuration keys. No malicious behaviors like data exfiltration, unauthorized network access, or suspicious execution patterns were found; subprocess calls are restricted to local git commands with hardcoded arguments and no shell execution.
能力评估
Purpose & Capability
Name/description match the delivered artifacts: a statusline renderer (statusline.py) and an installer (statusline_installer.py). The code only touches ~/.claude, reads JSON from stdin (the expected Claude Code runtime input), optionally calls git for branch info, and writes a local config file. No unrelated credentials, binaries, or remote installs are requested.
Instruction Scope
SKILL.md's runtime instructions align with the installer usage (install/configure/status/uninstall). One small mismatch: SKILL.md says it 'updates ~/.claude/settings.local.json', but the installer updates ~/.claude/settings.json (and cleans settings.local.json). Apart from that documentation mismatch, the instructions do not ask the agent to read or transmit unrelated system data or external endpoints.
Install Mechanism
There is no network download/install in the spec — installation is performed by running the bundled installer script which copies local files into ~/.claude. No package managers or external URLs are used, lowering install risk.
Credentials
The skill requires no environment variables or external credentials. The scripts read USER and use standard os.environ when invoking git (to disable prompts) and operate only under the user's home directory. The workspace path is taken from the JSON input (expected for showing git branch).
Persistence & Privilege
The installer persistently writes files under ~/.claude, creates a config (~/.claude/statusline.config), and injects a statusLine command into ~/.claude/settings.json so the status line runs when Claude Code starts. This is expected for a UI plugin but is a persistent change to application settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-code-statusline
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-code-statusline 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
claude-code-statusline v1.0.0 - Initial release of a custom status line installer for Claude Code CLI. - Displays real-time token usage, context window percentage, git branch, and color-coded warnings. - Simple Python 3 script with no external dependencies. - Interactive options to install, check status, configure thresholds/colors, and uninstall. - Fully customizable through a security-hardened config file. - Includes support for combined or separate token display and multiple color options.
元数据
Slug claude-code-statusline
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Claude Code Statusline 是什么?

Install and configure a custom Claude Code status line showing real-time token usage, context window percentage, git branch, and color-coded warnings. Use wh... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 175 次。

如何安装 Claude Code Statusline?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-code-statusline」即可一键安装,无需额外配置。

Claude Code Statusline 是免费的吗?

是的,Claude Code Statusline 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Claude Code Statusline 支持哪些平台?

Claude Code Statusline 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Claude Code Statusline?

由 Ajit Singh(@ajitsingh25)开发并维护,当前版本 v1.0.0。

💬 留言讨论