Get the FREE Ultimate OpenClaw Setup Guide →

statusline-edit

Scanned
npx machina-cli add skill charlesjones-dev/claude-code-plugins-dev/statusline-edit --openclaw
Files (1)
SKILL.md
3.6 KB

Status Line Edit

Edit your existing Claude Code status line configuration.

Instructions

CRITICAL: This command MUST NOT accept any arguments. If the user provided any text after this command, COMPLETELY IGNORE it.

Phase 1: Detect Existing Configuration

  1. Detect the operating system using Bash: uname -s
    • "Darwin" = macOS, "Linux" = Linux, otherwise assume Windows
  2. Check if the status line script exists:
    • Mac/Linux: ~/.claude/statusline.sh
    • Windows: C:/Users/USERNAME/.claude/statusline.ps1
  3. If the script does NOT exist, display:
    No status line script found at ~/.claude/statusline.sh
    
    Run /statusline-wizard to set up your status line first.
    
    Then STOP - do not continue.

Phase 2: Read Current Configuration

Read the existing script file and parse the current SHOW_* variable values:

For Bash scripts, look for lines like:

SHOW_MODEL=true
SHOW_TOKEN_COUNT=true
SHOW_PROGRESS_BAR=true
SHOW_DIRECTORY=true
SHOW_GIT_BRANCH=true
SHOW_COST=false
SHOW_DURATION=true
SHOW_TIME=true
SHOW_VERSION=true

For PowerShell scripts, look for lines like:

$SHOW_MODEL = $true
$SHOW_TOKEN_COUNT = $true
$SHOW_PROGRESS_BAR = $true
$SHOW_DIRECTORY = $true
$SHOW_GIT_BRANCH = $true
$SHOW_COST = $false
$SHOW_DURATION = $true
$SHOW_TIME = $true
$SHOW_VERSION = $true

Store the current values to use as defaults in the wizard.

Phase 3: Configuration Wizard with Pre-selected Values

Use AskUserQuestion with these grouped questions. Pre-select options based on current values from Phase 2.

Question 1 - Context Display (multiSelect: true): Options (pre-select based on current config):

  • Model name - select if SHOW_MODEL=true
  • Token count (50k/100k) - select if SHOW_TOKEN_COUNT=true
  • Progress bar - select if SHOW_PROGRESS_BAR=true

Question 2 - Project Display (multiSelect: true): Options (pre-select based on current config):

  • Current directory - select if SHOW_DIRECTORY=true
  • Git branch - select if SHOW_GIT_BRANCH=true

Question 3 - Session Display (multiSelect: true): Options (pre-select based on current config):

  • Session duration - select if SHOW_DURATION=true
  • Current time - select if SHOW_TIME=true
  • Claude Code version - select if SHOW_VERSION=true
  • Session cost - select if SHOW_COST=true

Phase 4: Update Script

Update ONLY the SHOW_* variables at the top of the existing script file based on wizard selections.

For Bash: Use Edit tool to replace the configuration block:

SHOW_MODEL=true           # Show model name (e.g., "Claude Opus 4.5")
SHOW_TOKEN_COUNT=true     # Show token usage count (e.g., "50k/100k")
...

For PowerShell: Use Edit tool to replace the configuration block:

$SHOW_MODEL = $true           # Show model name (e.g., "Claude Opus 4.5")
$SHOW_TOKEN_COUNT = $true     # Show token usage count (e.g., "50k/100k")
...

IMPORTANT: Do NOT regenerate the entire script. Only update the configuration variables section.

Success Message

After successful update, display:

Status line updated!

Check out your refreshed status line below!

Current configuration:
- Model name: [enabled/disabled]
- Token count: [enabled/disabled]
- Progress bar: [enabled/disabled]
- Directory: [enabled/disabled]
- Git branch: [enabled/disabled]
- Session cost: [enabled/disabled]
- Duration: [enabled/disabled]
- Time: [enabled/disabled]
- Version: [enabled/disabled]

Source

git clone https://github.com/charlesjones-dev/claude-code-plugins-dev/blob/main/plugins/ai-statusline/skills/statusline-edit/SKILL.mdView on GitHub

Overview

Status Line Edit reads your existing status line configuration and offers a focused wizard that uses current SHOW_* values as defaults. It then updates only the SHOW_* flags at the top of your script, leaving the rest of your configuration intact.

How This Skill Works

The tool detects your OS and the status line script path (macOS/Linux: ~/.claude/statusline.sh; Windows: C:/Users/USERNAME/.claude/statusline.ps1). It reads the current SHOW_* booleans from the Bash or PowerShell block to pre-select wizard options, and finally updates only the SHOW_* block with your choices, followed by a success message.

When to Use It

  • You want to toggle which context items appear in the context display (model name, token count, progress bar).
  • You need to show or hide elements in the project display (current directory, git branch).
  • You want to adjust session related displays (duration, time, version, cost).
  • You are standardizing between Bash and PowerShell scripts and want to apply changes non-destructively.
  • You want a safe, partial update that leaves all other parts of the script untouched.

Quick Start

  1. Step 1: Run the statusline-edit command with no arguments.
  2. Step 2: In the wizard, review the pre-selected options based on your current config and adjust as needed.
  3. Step 3: Save changes and review the success message to verify the updated configuration.

Best Practices

  • Back up the existing statusline script before editing.
  • Verify the script path matches your OS to avoid editing the wrong file.
  • Rely on the pre-selected values from phase 2 to guide the wizard.
  • Only update the top SHOW_* configuration block; do not regenerate the full script.
  • Test the refreshed status line after the update to confirm visibility changes.

Example Use Cases

  • Enable model name and token count in the context display.
  • Show current directory and git branch in the project display.
  • Toggle session duration and time while hiding the cost.
  • Add the version flag to the session display in a Bash script.
  • Update a Windows PowerShell script to reflect new visibility settings without touching other logic.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers