healthcheck-interactive-hintslisted
Install: claude install-skill williamblair333/Uncle-J-s-Refinery
# Healthcheck Interactive Hints
## Overview
Two complementary patterns for making shell healthchecks self-healing:
1. **Single-purpose fix scripts** — replace fire-and-forget maintenance scripts with dedicated scripts that exit non-zero on failure.
2. **Interactive hint prompts** — modify `hint()` to offer "Fix it now? [y/N]" when stderr is a terminal.
## When to Use
- A healthcheck `hint()` points at a general maintenance script (e.g. `auto-maintain.sh`) that calls nested processes non-fatally.
- The fix is achievable with a one-liner or short script but the hint just describes it passively.
- Users are running healthchecks interactively and would benefit from in-place remediation.
- A canary/index file is missing and must be regenerated by calling a tool directly.
**When NOT to use:** Cron or CI contexts where no TTY is attached — the TTY guard handles this automatically.
## Pattern 1 — Dedicated Fix Script
Replace the hint's target with a script that does exactly one thing and validates it worked:
```bash
#!/usr/bin/env bash
# scripts/pin-canary.sh — pins the embedding canary; exits non-zero if it fails
set -euo pipefail
claude -p "Call check_embedding_drift with capture=true" || {
echo "ERROR: claude -p failed" >&2; exit 1
}
CANARY="$HOME/.code-index/embed_canary.json"
[[ -f "$CANARY" ]] || { echo "ERROR: canary file not written: $CANARY" >&2; exit 1; }
echo "Canary pinned: $CANARY"
```
Key properties:
- `set -euo pipefail` — no silent failures
- Validates t