# Update Habits

> Parse habits from Obsidian all_habits*.md and push updated heatmap to GitHub Pages. Use when user says 'update heatmap', 'push habits', 'sync habits to site', or after checking habit boxes in Obsidian.

- Skill: `hosaypeng/update-habits` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add hosaypeng/update-habits`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hosaypeng/update-habits/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: hosaypeng (https://skillmd.com/u/hosaypeng)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hosaypeng/update-habits

---


Update the habits heatmap on GitHub Pages after checking boxes in Obsidian.

## Execution

Run the update script:

```
bash ~/.claude/skills/update-habits/scripts/update_habits.sh
```

The script handles the full pipeline: parse habits, check for changes, commit, and push. Exit code 0 means success (including "no changes detected").

## After the script runs

- If the output says "No habit changes detected", tell the user no changes were found.
- If the push succeeded, confirm the heatmap has been updated on GitHub Pages.
- If the script fails (non-zero exit), report the error output to the user.

Base directory: ~/Code/hosaypeng.github.io

## Troubleshooting

- **Script fails with "not a git repository"**: Ensure the script runs from within the hosaypeng.github.io repo directory.
- **Push rejected (remote has new commits)**: Run `git pull --rebase` in the repo and retry.
- **"all_habits*.md not found"**: Verify the Obsidian vault path and that the file hasn't been moved.
- **habits.json output is empty or malformed**: Check all_habits*.md for broken markdown table syntax.

