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.

hosaypeng Updated 0 repo stars

File contents

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.

hosaypeng/claude-skills commit abf460fe65

Frequently asked questions

npx get-skill add hosaypeng/update-habits