Skip to content

Instantly share code, notes, and snippets.

@nishimura
Last active August 14, 2025 06:56
Show Gist options
  • Select an option

  • Save nishimura/c8addf4a942fdd4fb506db90942f98cb to your computer and use it in GitHub Desktop.

Select an option

Save nishimura/c8addf4a942fdd4fb506db90942f98cb to your computer and use it in GitHub Desktop.
Configuring the project-reminder tag to behave like the system-reminder tag

CLAUDE.md

about project-reminder tag

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.

If Claude Code have forgotten the contents of CLAUDE.md, need to reload it. Check if you still remember: - The complete system-reminder starting with `As you answer the user's questions, you can use the following context:` and ending with `` - The contents of files imported with @ syntax

Once the check is complete, display the file list:

  • CLAUDE.md: remembered
  • docs/api-document.md: remembered
  • docs/feature-detail.md: reloaded
#!/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
{
"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