Habit Watch: Observation Control
Watch is always active by default. This skill lets you check status, pause, or resume. Capture control is deliberately static: watch has no learnings overlay, by design.
Preload
!bash ${CLAUDE_PLUGIN_ROOT}/bin/habit-tools.sh skill-preload watch ${CLAUDE_SESSION_ID}
Run this Setup block once and reuse the values below:
HABIT_SID_FILE=$(ls -t "$HOME/.claude/habits/sessions.d/"* 2>/dev/null | head -1)
source "${HABIT_SID_FILE:-$HOME/.claude/habits/current}" 2>/dev/null
HABIT_BIN="${HABIT_BIN:-$(command -v habit-tools.sh || echo "${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/bin/habit-tools.sh}")}"
[ -f "${HABIT_BIN:-}" ] || echo "HABIT_UNAVAILABLE: habit is not wired on this host."
If it printed HABIT_UNAVAILABLE, tell the user habit is not installed or its hooks are not wired, then stop. Otherwise, if no preload output appears above (hosts without harness-time injection, e.g. Cursor), run bash "$HABIT_BIN" skill-preload watch "$HABIT_SID" once.
The output has a ===TRIGGERS=== section: show the message only if non-empty.
Resolve state
Run these and use the outputs (ACTIVE or PAUSED, then the count):
bash "$HABIT_BIN" watch status "$HABIT_SID"
bash "$HABIT_BIN" read-prompt-count "$HABIT_SID"
Routing
- Message empty, "status", or "resume" go to Status/Resume.
- Message intends deactivation (off, stop, disable, pause, turn off) go to Pause.
- Otherwise go to Status/Resume.
Status/Resume
- If
ACTIVE: count 0 says "Watch is active. No prompts captured yet this session.", else "Watch is active. {count} prompts captured this session." Include the triggers message if non-empty. Stop. - Resume:
bash "$HABIT_BIN" watch start "$HABIT_SID" - Confirm: "Watch resumed."
Pause
- If
PAUSED: "Watch is already paused." Stop. - Pause:
bash "$HABIT_BIN" watch stop "$HABIT_SID" - If count > 0, suggest running the distill habit to process this session.
- Confirm: "Watch paused. Run the watch habit to resume."