| name | team-shinchan:setup-hud |
| description | Use when you need to install or remove the Team-Shinchan HUD statusline. |
| user-invocable | true |
MANDATORY EXECUTION — DO NOT EXPLAIN
When this skill is invoked, execute immediately.
Step 1: Parse Arguments
If $ARGUMENTS contains "remove" -> go to Step 4 (Remove flow).
Otherwise -> continue to Step 2 (Install flow).
Step 2: Detect Plugin Path
node -e "console.log(process.env.CLAUDE_PLUGIN_ROOT || '')"
Capture output as PLUGIN_ROOT.
If PLUGIN_ROOT is empty:
Output error: "Cannot detect CLAUDE_PLUGIN_ROOT. Are you running in plugin mode?"
STOP.
Set SCRIPT_PATH = PLUGIN_ROOT + '/src/statusline/index.js'
Verify script exists:
node -e "require('fs').accessSync('${CLAUDE_PLUGIN_ROOT}/src/statusline/index.js'); console.log('ok')"
If output is not 'ok':
Output error: "statusline script not found at: ${SCRIPT_PATH}"
STOP.
Step 3: Install Flow
3a. Read current settings.json
node -e "
const fs = require('fs'), path = require('path');
const p = path.join(process.env.HOME || '~', '.claude/settings.json');
let s = {};
try { s = JSON.parse(fs.readFileSync(p, 'utf-8')); } catch(e) {}
console.log(JSON.stringify({ exists: !!s.statusLine, current: s.statusLine || null }));
"
3b. Handle existing statusLine
If the output shows "exists": true:
Display the current statusLine config to the user.
Ask:
If user says no: output "Cancelled. Existing statusLine unchanged." STOP.