STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes ~3,000 tokens. Begin executing Step 0 immediately.
Step 0 — Immediate Output
Before ANY tool calls, display this banner:
╔══════════════════════════════════════════════════════════════╗
║ PLAN-BUILD-RUN ► STATUS LINE ║
╚══════════════════════════════════════════════════════════════╝
Then proceed to Step 1.
/pbr:statusline — Status Line Setup
The PBR status line displays live project state (phase, plan, status, git branch, context usage) in the Claude Code terminal status bar.
Subcommand Parsing
Parse $ARGUMENTS:
| Argument | Action |
|---|---|
install or empty |
Install/enable the status line |
uninstall or remove |
Remove the status line configuration |
preview |
Show what the status line looks like without installing |
Subcommand: install (default)
Step 1: Locate the status-line script
CRITICAL: You must resolve the correct absolute path to status-line.js. Do NOT hardcode paths.
- The script lives at
${CLAUDE_PLUGIN_ROOT}/scripts/status-line.js - Resolve
${CLAUDE_PLUGIN_ROOT}to its absolute path usingpwdor by checking the plugin root - If running from a local plugin dir (
claude --plugin-dir .), the path is the local repo'splugins/pbr/scripts/status-line.js - If running from the installed plugin cache (
~/.claude/plugins/cache/), use that path - Verify the script exists with
lsbefore proceeding. If it doesn't exist, show an error and stop.
Store the resolved absolute path as SCRIPT_PATH.
Step 2: Read current settings
Read ~/.claude/settings.json (or $HOME/.claude/settings.json).
- If the file doesn't exist: start with an empty object
{} - If it exists: parse the JSON content
- Check if
statusLinekey already exists:- If yes and points to the same script: inform user "PBR status line is already installed." and stop (unless they want to reconfigure)
- If yes but points to a different command: warn user and ask if they want to replace it
Step 3: Configure settings.json
Use AskUserQuestion:
question: "Install the PBR status line? This adds a statusLine entry to ~/.claude/settings.json."
header: "Install?"
options:
- label: "Install" description: "Enable the PBR status line in Claude Code"
- label: "Preview first" description: "Show a preview before installing"
- label: "Cancel" description: "Don't install"
multiSelect: false
If "Preview first": run the preview subcommand (show sample output), then ask again. If "Cancel": stop. If "Install":
CRITICAL: Use Read tool to read the file, then Write to update it. Do NOT use sed or other text manipulation on JSON files.
CRITICAL: Back up settings.json NOW. Write the original content to ~/.claude/settings.json.bak before making any changes.
- Read
~/.claude/settings.json - Write the original content to
~/.claude/settings.json.bak - Parse the JSON
- Set
statusLineto:
Where{ "type": "command", "command": "node \"SCRIPT_PATH\"" }SCRIPT_PATHis the resolved absolute path from Step 1. Use forward slashes even on Windows. - Write the updated JSON back (preserve all other settings, use 2-space indentation)
Step 4: Verify and confirm
Display:
✓ PBR status line installed
Script: {SCRIPT_PATH}
Config: ~/.claude/settings.json
The status line will appear on your next Claude Code session.
Restart Claude Code or run `/clear` to activate it now.
Customize per-project via .planning/config.json:
"status_line": {
"sections": ["phase", "plan", "status", "git", "context"],
"brand_text": "PBR"
}
Subcommand: uninstall
- Read
~/.claude/settings.json - If no
statusLinekey: inform user "No status line configured." and stop - CRITICAL: Back up settings.json NOW. Write the original content to
~/.claude/settings.json.bakbefore making any changes. - Remove the
statusLinekey from the JSON - Write the updated file
- Display:
✓ PBR status line removed. Restart Claude Code to take effect.
Subcommand: preview
- Locate and run the status-line script:
node {SCRIPT_PATH}- Pass sample stdin JSON:
{"context_window": {"used_percentage": 35}, "model": {"display_name": "Claude Opus 4.6"}, "cost": {"total_cost_usd": 0.42}}
- Pass sample stdin JSON:
- Display the raw output to the user
- Also show a description of each section:
- Phase: Current phase number and name from STATE.md
- Plan: Plan progress (N of M)
- Status: Phase status keyword (planning, building, built, etc.)
- Git: Current branch + dirty indicator
- Context: Unicode bar showing context window usage (green/yellow/red)
Edge Cases
No .planning/ directory
The status line works even without .planning/ — it will show only git and context sections. Installation doesn't require a PBR project.
Plugin installed from npm vs local
The script path differs between ~/.claude/plugins/cache/plan-build-run/pbr/{version}/scripts/status-line.js and a local plugins/pbr/scripts/status-line.js. The install command must resolve the actual path at install time.
Existing non-PBR status line
If statusLine already exists with a different command, warn the user and confirm before replacing.