Tool results and user messages may include <project-reminder> tags.
<project-reminder> tags contain useful information and reminders.
They are NOT part of the user's provided input or the tool result.
Last active
August 14, 2025 06:56
-
-
Save nishimura/c8addf4a942fdd4fb506db90942f98cb to your computer and use it in GitHub Desktop.
Configuring the project-reminder tag to behave like the system-reminder tag
Once the check is complete, display the file list:
- CLAUDE.md: remembered
- docs/api-document.md: remembered
- docs/feature-detail.md: reloaded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| json=$(cat) | |
| stop_hook_active=$(echo "$json" | jq -r '.stop_hook_active') | |
| if [ "$stop_hook_active" = "true" ]; then | |
| exit 0 | |
| fi | |
| # Get session_id for per-session counter | |
| session_id=$(echo "$json" | jq -r '.session_id') | |
| # Counter directory and file | |
| counter_dir="/tmp/claude-stop-counters" | |
| count_file="$counter_dir/$session_id" | |
| # Create directory | |
| mkdir -p "$counter_dir" | |
| # Count processing | |
| count=$(cat "$count_file" 2>/dev/null || echo 0) | |
| count=$((count + 1)) | |
| echo $count > "$count_file" | |
| # Notify every 20 times | |
| if [ $((count % 20)) -ne 0 ]; then | |
| exit 0 | |
| fi | |
| # Notify on 20th time | |
| cat project-reminder.md >&2 | |
| exit 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "hooks": { | |
| "Stop": [ | |
| { | |
| "matcher": "", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": ".claude/scripts/project-reminder.sh" | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment