feat(hooks): add SessionEnd progress logger and local progress tracker#87
feat(hooks): add SessionEnd progress logger and local progress tracker#87DhanyaJose wants to merge 2 commits intoluongnv89:mainfrom
Conversation
Adds a SessionEnd hook that prompts for modules studied at session end and appends a record to ~/.claude-howto-progress.json — outside the repo so progress survives git pull without being overwritten. Also adds local-progress/index.html: a self-contained visual tracker with checkboxes for all 10 modules, per-module notes, an overall progress bar, and Export/Import to sync with a local JSON backup file. Key patterns demonstrated: - SessionEnd vs Stop (fires once on exit, not after every response) - /dev/tty for interactive input in hooks (stdin carries the JSON payload) - $CLAUDE_PROJECT_DIR for portable paths (never hardcode /Users/...) - Guard clause to prevent global hook running in unrelated projects Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Thanks for this — the SessionEnd hook + HTML tracker is a really nice addition! 🎯 Reviewed the changes and CI is green, but I caught a few things worth fixing before merge: 🔴 Bash 3.2 parse error (macOS default)
The Fix: replace the pipeline+while with a 🟡 Notes with
|
…rea XSS - Replace pipeline+while with IFS for-loop (bash 3.2 compatible) - Pass NOTES as Python arg to avoid broken JSON on quotes/backslashes - Set textarea.value instead of innerHTML to prevent XSS from imported JSON Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
7059d3a to
01dc280
Compare
DhanyaJose
left a comment
There was a problem hiding this comment.
Thank you @luongnv89 for your review #87 (comment). I have incorporated your comments with the help of Claude. Please review these changes.
Thank you for creating this repository, this helps a lot
Summary
06-hooks/session-end.sh— fires onSessionEnd(once per session, not after every response), prompts for modules studied, and appends a record to~/.claude-howto-progress.jsonoutside the repo so progress survivesgit pulllocal-progress/index.html— self-contained visual tracker with checkboxes for all 10 modules, per-module notes, overall progress bar, and Export/Import JSON backup06-hooks/README.md— Example 8 documents the hook with a patterns table and pointer to the HTML tracker.gitignore—local-progress/→local-progress/*.jsonso the HTML ships but exported data files stay localWhy this is useful
The repo's existing progress tracking (checklists in
LEARNING-ROADMAP.md,/self-assessmentskill) lives inside repo files — agit pulloverwrites any marks made there. This contribution stores progress outside the repo permanently.Key patterns demonstrated by the hook
SessionEndeventStopread -r INPUT </dev/ttystdin(JSON payload); use/dev/ttyfor user input$CLAUDE_PROJECT_DIR/Users/yourname/...Test plan
open local-progress/index.html— 10 modules render with checkboxes and progress bar.claude/settings.json, end a session — record appended to~/.claude-howto-progress.jsongit status—local-progress/*.jsonignored,index.htmltracked🤖 Generated with Claude Code