Stats
Actions
Tags
From memex
Runs a Node script on session start to initialize plugin context and on stop to verify code integrity. Executes Node.js without bash.
2 events · 2 hooks
Where this hook configuration is defined
Defined in hooks/hooks.json
Event handlers and matchers — expand Raw Configuration for the full JSON
echo '## 🧠 Memex Retro Reminder
**MANDATORY**: If this task involved code changes, architectural decisions, debugging, or non-trivial problem solving, you MUST invoke the \`memex-retro\` skill NOW before ending your turn.
Did you learn something reusable? Capture it as a knowledge card. Do not include actual secrets, credentials, tokens, or exact secret file contents.
**Skip retro only if**: This was purely informational (no problem solving) or you already captured insights during the session.'MEMEX_CLI_PATH="${CLAUDE_PLUGIN_ROOT}/dist/cli.js"; if [ ! -f "$MEMEX_CLI_PATH" ]; then echo '## Memex: plugin dist not found
Reinstall the memex Claude Code plugin or run: `npm install -g @touchskyer/memex`'; exit 0; fi && node "$MEMEX_CLI_PATH" sync 2>/dev/null; TOTAL=$(node "$MEMEX_CLI_PATH" read index 2>/dev/null | grep -c '^\- \[\[' || true); SECTIONS=$(node "$MEMEX_CLI_PATH" read index 2>/dev/null | awk '/^## /{ if(s) print s" ("c" cards)"; s=$0; c=0; next } /^\- \[\[/{ c++ } END{ if(s) print s" ("c" cards)" }'); if [ "$TOTAL" -gt 0 ]; then RECALL="When the task touches a topic above, run \`memex search <keyword>\` then \`memex read <slug>\` for the top hits.
Do this BEFORE writing code or starting diagnosis — your past self already solved adjacent problems.
For full recall: invoke the \`memex-recall\` skill."; else RECALL="No cards yet. Still invoke the \`memex-recall\` skill — keyword search may find matches even without an index.
After completing work, invoke \`memex-retro\` to start building your knowledge base."; fi; echo "## Memex Memory System Active ($TOTAL cards)
### Your Knowledge Map
$SECTIONS
### Recall — before starting work
$RECALL
Never include actual secrets, credentials, tokens, or exact secret file contents in memex query/body arguments; use abstract descriptions or redacted examples.
### Retro — after completing work
After code changes, debugging, or architectural decisions: invoke \`memex-retro\` skill.
Ask: 'Did I learn something reusable?' If yes, write a card.
Card format: title, created (YYYY-MM-DD), source: retro, category. Slugs: English kebab-case.
Language: match the user's CLAUDE.md preferences." && last_org=$(cat ~/.memex/.last-organize 2>/dev/null || true) && if [ -n "$last_org" ]; then days_since=$(( ($(date +%s) - $(python3 -c "import datetime; print(int(datetime.datetime.strptime('$last_org','%Y-%m-%d').timestamp()))" 2>/dev/null || echo $(date +%s))) / 86400 )); if [ $days_since -ge 7 ]; then echo "
WARNING: Last organize was ${days_since} days ago. Consider /memex-organize."; fi; else echo '
NOTE: /memex-organize has never been run.'; finpx claudepluginhub iamtouchskyer/memex --plugin memex