Install
openclaw skills install @voronindenis5/habit-trigger-detectiveUse when someone keeps failing the same habit or falling into the same bad one despite motivation. Turns a trigger journal into a statistical trigger analysis - time-of-day, location, company, device, emotional state, preceding actions - and outputs ranked cues, the habit loop, and reengineered if-then plans.
openclaw skills install @voronindenis5/habit-trigger-detective"I know what I should do. I just don't do it." The failure of habits is rarely motivation — it's unidentified triggers. The cigarette happens after coffee, the doomscroll starts when the phone is on the nightstand, the snack raids happen at 22:47, the skipped workouts cluster on days with early meetings. People try to change the behavior while leaving the cue architecture intact.
Behavioral science ( habit-loop research, implementation-intention studies) says: identify the CUE → understand the REWARD → reengineer the loop. This skill does the boring-but-decisive part: statistics over a trigger journal.
For 5-7 days the user logs each occurrence (wanted or unwanted behavior): time, location, who's around, device in hand, emotional state 1-5, what they were doing in the previous 30 minutes, and subjective urge strength. The analyzer then:
Don't use for: addiction-level issues (alcohol, drugs, gambling, eating disorders — refer to professionals; this is a self-tracking tool, not therapy), or one-off behaviors with no repetition.
The user logs each occurrence with a fixed schema (scripts/trigger_log.py interactive mode, or a paper template in references/journal-template.md):
timestamp | behavior (smoke/scroll/snack/skip-workout...) | wanted/unwanted
location (home/work/commute/other) | alone | with-partner | with-friends | with-colleagues
device (none/phone/laptop/tv) | emotional_state 1-5 | urge 1-5
prev_action: what you were doing in the last 30 min (free text)
Critical: also log 5+ baseline entries — random moments when the urge was NOT present. Without a baseline, "80% of events happened at home" is meaningless (maybe you're home 80% of the time). Lift is computed against this baseline.
For every factor value (e.g., location=commute):
P(behavior | factor) count_events_with_factor / count_all_factor_rows
P(behavior | no factor)
lift = P(behavior|factor) / P(behavior|no factor)
Preceding-action chains: normalize prev_action text (lowercase, keyword map), compute P(behavior | prev_action) the same way, and find 2-step chains (A→B→behavior) when the data supports them.
For each top trigger, two moves:
| File | Purpose |
|---|---|
scripts/trigger_log.py | Interactive 30-second journal entries → JSONL |
scripts/trigger_analysis.py | Lift analysis, hotspots, chains, habit loop, if-then plans |
references/journal-template.md | Paper template + emotion/urge anchors |
references/behavior-science.md | Habit loop, implementation intentions, reward inference, references |
# Log an occurrence (interactive prompts, 30 seconds)
python3 scripts/trigger_log.py log
# Log a baseline (non-event) moment
python3 scripts/trigger_log.py baseline
# Analyze after 5+ days (needs >= 8 events + 5 baselines)
python3 scripts/trigger_analysis.py journal.jsonl
# Include a specific if-then replacement behavior
python3 scripts/trigger_analysis.py journal.jsonl --replacement "10 squats"
6 days of vaping urges, 11 events, 7 baselines. Analysis output:
LIFT 3.1 — location=commute (6/11 events, 0/7 baselines)+LIFT 2.4 — prev_action="coffee"+ hotspot 08:00-09:00. Habit loop: morning commute coffee → vape (nicotine + break from podcast) → alertness ritual. Reengineered: IF coffee on commute, THEN nicotine gum
- podcast continues; car vape pack removed (cue disruption). Week 2 re-analysis: commute lift 3.1 → 1.2. Decoupled.