Loading...
Loading...
Manage daily check-in records stored in local SQLite, supporting functions including adding check-ins, viewing records, statistical analysis, querying consecutive check-in days, deleting and modifying records. This skill should be actively used when users mention check-in, sign-in, recording daily habits such as exercise, reading, learning, fitness, meditation, running, cycling, etc., or want to check how many days they have stuck to a certain habit, how much time they spent exercising this week, what they checked in today. Even if the user does not explicitly say "check-in", it is applicable as long as it involves daily habit tracking and activity recording. It also works for English scenarios, such as check in, log my workout, track my reading, how many days in a row, streak, habits.
npx skill4agent add zsspub/skills habitsimport.meta.dirname.data/zsspub/habits/node:sqlitenodenode <directory where this SKILL.md is located>/scripts/habits.mjs <command> [options]habitsnode <skill directory>/scripts/habits.mjsconfig --timezoneAsia/Shanghaihabits config --timezone=Asia/Shanghai| User's words (example) | Extracted information | Command to execute |
|---|---|---|
| "Check in cycling for 30 minutes" | Topic=cycling, Tag=sports, Duration=30 | |
| "I read a chapter of Principles today" | Topic=reading, Tag=learning, Note=one chapter of Principles | |
| "Just finished running 5 kilometers in 40 minutes" | Topic=running, Tag=sports, Duration=40, Note=5km | |
| "Meditation check-in" | Topic=meditation, Tag=health | |
| "Check in at the Forbidden City" | Topic=travel, Tag=life, Note=Forbidden City | |
| "Show my check-in records this month" | — | |
| "How much time did I spend exercising this week?" | — | |
| "How many consecutive days have I checked in for cycling?" | — | |
| "Change the 3rd check-in to 45 minutes" | — | |
| "Delete that running record" | — | First run |
| "Export check-in records" / "Backup check-in data" | — | |
| "Import check-in records" / "Restore from file" | — | |
add--raw--note--tags| Topic keywords | Inferred tag |
|---|---|
| Cycling, running, swimming, fitness, yoga, stretching, brisk walking, rope skipping, ball games, mountain climbing, skiing, skating | Sports |
| Reading, book reading, listening to audiobooks | Learning |
| Meditation, early bedtime, early rising, drinking water, skincare | Health |
| Memorizing words, doing exercises, practicing piano, painting, writing, calligraphy practice, learning English | Learning |
| Cooking, housework, organizing, food, home practice | Life |
| Travel, visiting, sightseeing, scenic spot check-in | Life |
| Watching movies, chasing dramas, listening to music, playing games | Entertainment |
--duration=X--duration=X*60--duration=X*60+Y--duration=30--duration=X*60+30--duration=90--duration=15--durationhabits add "topic" --raw="user's original words" [--tags=tag1,tag2] [--duration=minutes] [--note="note"] [--at="YYYY-MM-DD HH:mm:ss"]--raw--tags运动,户外--duration--note--athabits list [--topic=topic] [--tag=tag] [--date=YYYY-MM-DD] [--period=today|week|month|year] [--from="YYYY-MM-DD HH:mm:ss"] [--to="YYYY-MM-DD HH:mm:ss"] [--search=keyword] [--limit=count]--period--date--from--to--search--limithabits update <id> [--topic=...] [--tags=...] [--duration=...] [--note=...] [--at="YYYY-MM-DD HH:mm:ss"]--duration=nulledithabits delete <id>delrmhabits stats [--topic=topic] [--tag=tag] [--period=today|week|month|year] [--from="YYYY-MM-DD HH:mm:ss"] [--to="YYYY-MM-DD HH:mm:ss"]--periodhabits streak [--topic=topic] [--tag=tag]habits config [--timezone=<IANA time zone>]habits export [--file=<path>] [--topic=topic] [--tag=tag]--file--topic--taghabits import --file=<path>topic# Check in cycling for 30 minutes
habits add "骑行" --tags=运动 --duration=30 --raw="打卡骑行 30 分钟"
# Check in reading, with note
habits add "阅读" --tags=学习 --note="《原则》第三章"
# Retroactive check-in (yesterday's run)
habits add "跑步" --tags=运动 --duration=40 --note="5公里" --at="2026-04-01 19:30:00"
# View today's check-ins
habits list --date=2026-04-02
# View all cycling records
habits list --topic=骑行
# Weekly exercise statistics
habits stats --period=week --tag=运动
# View consecutive cycling check-in days
habits streak --topic=骑行
# Modify the duration of the 2nd check-in
habits update 2 --duration=45
# Delete the 5th check-in
habits delete 5