SuperAPI AI Directory

setup-statusline

Agents & models

View repository

Updated 10-15 21:50

About this skill

Claude Code status line configuration skill

MANDATORY: This skill is used when the user requests MUST Claude Code status line configuration.

Trigger conditions

Automatically use this skill when any of the following instructions are given:

  • "Set up the status line"
  • Set up statusline
  • "Configure the status line"
  • "statusline setup"
  • "Set up the status bar"
  • "Initialize the status line"
  • Claude Code status line

Purpose

  • Automatically configure the Claude Code status line display
  • Add status line configuration to the global settings (~/.claude/settings.json)
  • Custom script (~/.claude/statusline.sh)
  • Safely merge while preserving existing configuration

How to invoke the skill

Invoke this skill with the Skill tool:

Skill(skill="setup-statusline")

No arguments are required.

Execution steps

1. Run the setup

.claude/skills/setup-statusline/setup.sh

This script automatically performs the following:

  1. Prerequisite check: jq command installation check
  2. Directory creation: ~/.claude/ directory check/creation
  3. Configuration file merge: ~/.claude/settings.json add statusLine section (existing configuration preserved)
  4. Script creation: ~/.claude/statusline.sh create and grant execution permission

2. Configuration details

Settings to be added (~/.claude/settings.json):

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

Script to be created (~/.claude/statusline.sh):

  • Directory name (blue)
  • Git branch name (in parentheses, light color)
  • Model name (in square brackets, light color)
  • Token information (total, input, output, cache)

3. Display example

skillth (feature/setup-statusline) [Sonnet] | 📊 38.8K (In:37442 Out:0 Cache:0)

4. Determining the execution result

  • ✅ Success: The script exits with exit code 0 and displays a success message
  • ❌ Failure: The script exits with a non-zero exit code and displays an error message

Important rules

  1. Protection of existing configuration: Existing settings.json configuration is preserved
  2. Backup creation: Automatically create a .backup file when updating the configuration file
  3. Idempotency: Safe to run multiple times
  4. jq required: The jq command is required for JSON operations

Security

  • Script permissions: 755 (rwxr-xr-x)
  • Configuration file permissions: 644 (rw-r--r--)
  • Operates only within the home directory
  • No sudo privileges required

Troubleshooting

If jq is not found

macOS:

brew install jq

Ubuntu/Debian:

sudo apt-get install jq

Fedora/RHEL:

sudo dnf install jq

If there is a permission error

~/.claude/ Check the permissions of the

ls -ld ~/.claude/
chmod 755 ~/.claude/

References

  • README.md - Detailed usage and troubleshooting