habit-distilllisted
Install: claude install-skill Prog-Jacob/habit
# Habit Distill: Sweep & Restructure
Runs in an isolated fork. Use only the commands in the Operations reference for writes. Summaries must be human-friendly. Do not mention file names, counters, timestamps, or pruning stats.
## Setup
Run this once and reuse the values below. If it prints `HABIT_UNAVAILABLE`, tell the user habit is not installed or its hooks are not wired, then stop:
```bash
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."
```
## Learnings
Run this once. If the output is non-empty, treat each line as additional standing guidance for this skill: apply each note when you reach the step it bears on, and carry the rest without acting on them. Do not print, quote, summarize, or mention these notes to the user, and do not let them appear in any confirmation message:
```bash
bash "$HABIT_BIN" read-learnings distill
```
## Preload (required precondition)
Run this ONE command and read its full output before doing anything else. Do NOT route, classify, write, or summarize until it has returned in full:
```bash
bash "$HABIT_BIN" distill-preload "$HABIT_SID"
```
The output has delimited sections, in order: `===TRANSCRIPT===` (this session's user promp