Habit tracker + dashboards
TL;DR — Annotate habits in your daily note with inline Dataview metadata. Build a single dashboard note that shows streaks, heatmaps, and per-habit trends. Your habit data becomes a second-brain metric, viewable alongside notes and goals.
The capture layer
Section titled “The capture layer”In your daily note, add a habits section the template generates:
## Habits
- exercise:: true- meditation:: 10- writing:: 500- alcohol:: false- sleep_hours:: 7.5The :: is Dataview’s inline metadata syntax. Each line becomes a queryable field on this day’s note.
Be honest. Tracking dishonest data is worse than tracking nothing.
The dashboard
Section titled “The dashboard”Create 30-Areas/health/habits-dashboard.md:
# Habits dashboard
## Exercise — last 30 days
```dataviewCALENDAR file.dayFROM "10-Daily"WHERE exercise = true AND date(file.day) >= date(today) - dur(30 days)```
## Writing words this week
```dataviewTABLE writing AS "Words", file.day AS "Day"FROM "10-Daily"WHERE writing AND date(file.day) >= date(today) - dur(7 days)SORT file.day DESC```
## Streak: meditation
```dataviewLIST file.day AS "Day"FROM "10-Daily"WHERE meditation > 0SORT file.day DESCLIMIT 7```Pin this note to your sidebar. Open weekly during your review.
Tracker plugin (advanced)
Section titled “Tracker plugin (advanced)”The community plugin Tracker gives you proper line/bar charts. Install if you want visual graphs beyond Dataview’s tables.
Example chart:
```trackersearchType: dvFieldsearchTarget: sleep_hoursfolder: 10-DailystartDate: -30dendDate: todayline: title: Sleep hours, last 30 days yAxisLabel: Hours lineColor: "#7c5cff"```How Claude Code fits in
Section titled “How Claude Code fits in”- Daily Driver can prompt you to log habits if today’s note doesn’t have them yet (“you skipped habits yesterday — track them now?”)
- Weekly Review can pull habit stats automatically: “Exercise: 5/7 days. Writing: 3200 words. Sleep avg: 7.1h.”
- A new skill
habit-correlatecould find correlations: “On weeks you exercised 5+ times, your mood scores averaged 8.2. On weeks you exercised fewer than 3 times, 6.4.”
Make it lightweight
Section titled “Make it lightweight”Don’t track 15 habits. Track 3–5 you actually care about, for 90 days, before deciding what to do next. Over-instrumented systems get abandoned. Under-instrumented systems teach you the truth.