Get the FREE Ultimate OpenClaw Setup Guide →

statusline-check

npx machina-cli add skill yusufalikync/ccs/statusline-check --openclaw
Files (1)
SKILL.md
1.6 KB

Statusline Health Check

Run a comprehensive health check on the installed statusline setup and provide troubleshooting guidance.

Checklist

Run these checks in order and report results:

1. Script installed

ls -la ~/.claude/statusline.js

Expected: file exists and is readable.

2. Settings configured

Read ~/.claude/settings.json and verify:

  • statusLine key exists
  • command value references statusline.js
  • padding is set

3. Node.js version

node --version

Must be >= 18 (for fetch API support).

4. Credential access

macOS:

security find-generic-password -s "Claude Code-credentials" 2>&1 | head -3

Linux:

secret-tool lookup service "Claude Code-credentials" 2>&1 | head -3

Should not return an error about item not found.

5. Cache status

ls -la ${TMPDIR:-/tmp}/claude_usage_cache_*.json 2>/dev/null || echo "No cache files found"

Report count and age of cache files.

6. Quick smoke test

echo '{"model":{"display_name":"Test"},"cost":{"total_cost_usd":0},"context_window":{"used_percentage":50},"workspace":{"current_dir":"/tmp"},"session_id":"healthcheck"}' | node ~/.claude/statusline.js

Should produce two lines of output without errors.

Output Format

Present results as a checklist:

  • Check passed
  • Check failed — explain what's wrong and how to fix it

If any check fails, provide specific fix instructions (e.g., ccs install, update Node.js).

Source

git clone https://github.com/yusufalikync/ccs/blob/main/.claude/skills/statusline-check/SKILL.mdView on GitHub

Overview

Statusline-check runs a structured health check on the installed statusline setup and guides you through troubleshooting. It validates the presence of the statusline.js script, the ~/.claude/settings.json configuration, Node.js version, credentials access, and the cache state, then performs a smoke test to produce actionable fixes.

How This Skill Works

The tool inspects the statusline.js script, confirms ~/.claude/settings.json contains a statusLine entry and that command references statusline.js, checks that Node.js is >= 18, verifies credentials via macOS or Linux secret stores, and examines cache files before running a quick smoke test to validate output.

When to Use It

  • After installing statusline to verify wiring and configuration.
  • When statusline displays errors or missing data during use.
  • After a system upgrade that might affect Node.js, credentials, or filesystem paths.
  • When making changes to ~/.claude/settings.json or the statusLine command.
  • Before a critical demo or deployment to ensure the health check passes.

Quick Start

  1. Step 1: Confirm the statusline script exists: ls -la ~/.claude/statusline.js
  2. Step 2: Validate settings: cat ~/.claude/settings.json and ensure statusLine, command, and padding are set
  3. Step 3: Run the smoke test by piping a test payload to Node: echo '<payload>' | node ~/.claude/statusline.js

Best Practices

  • Run the health check in a clean shell to avoid environment interference.
  • Confirm Node.js is version 18 or newer before running checks.
  • Verify that ~/.claude/statusline.js and ~/.claude/settings.json exist and are readable.
  • Review credentials access on macOS and Linux; fix permission or item-not-found errors.
  • Use the quick smoke test to validate the end-to-end output and fix any issues found.

Example Use Cases

  • Fresh macOS install: verify statusline.js exists, settings.json is correct, and a smoke test passes.
  • Linux CI job: ensure secret-tool can read credentials and smoke test produces output lines.
  • After Node upgrade: re-run checks to confirm fetch API work and statusline.js remains reachable.
  • Missing statusLine key: diagnose settings.json and correct the key wiring.
  • Credential access errors: troubleshoot keychain/secret store permissions and re-run checks.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers