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:
- Prerequisite check:
jqcommand installation check - Directory creation:
~/.claude/directory check/creation - Configuration file merge:
~/.claude/settings.jsonadd statusLine section (existing configuration preserved) - Script creation:
~/.claude/statusline.shcreate 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
- Protection of existing configuration: Existing
settings.jsonconfiguration is preserved - Backup creation: Automatically create a
.backupfile when updating the configuration file - Idempotency: Safe to run multiple times
- jq required: The
jqcommand 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