Script Path Resolution
IMPORTANT: The scripts/ folder is in the plugin directory, NOT the current project.
From "Base directory for this skill:" above, derive the scripts path:
- •Remove
/skills/memory-deltafrom the end - •Add
/scripts/to get the scripts directory
Example:
- •Base:
~/.claude/plugins/cache/memory-keeper-marketplace/memory-keeper/13.8.3/skills/memory-delta - •Scripts:
~/.claude/plugins/cache/memory-keeper-marketplace/memory-keeper/13.8.3/scripts/
Use this full path when running node commands below.
Trigger Condition
Auto-invoked when EITHER:
- •Hook stderr outputs:
[MEMORY_KEEPER_DELTA] file=delta_temp.txt - •Context contains:
[MEMORY_KEEPER_DELTA]trigger pattern
If you see [MEMORY_KEEPER_DELTA] anywhere in your context, execute this skill immediately.
Execution Steps
- •
Verify file exists first (DO NOT SKIP):
bashcat .claude/memory/delta_temp.txt | head -5
If file not found or empty, STOP HERE - do not proceed.
- •
Call Haiku agent for summarization: Use absolute path (get from pwd):
codeTask tool: - subagent_type: "memory-keeper:delta-summarizer" - model: "haiku" - prompt: "Read {PWD}/.claude/memory/delta_temp.txt and summarize (1 sentence per ~200 words)."Replace {PWD} with the actual current working directory (absolute path).
- •
Validate Haiku response:
- •If response starts with "ERROR:" → STOP, do not proceed
- •If response is empty or says "file not found" → STOP, do not proceed
- •Only continue if you have actual summary content
- •
Append summary to memory.md with dual timestamps: Run this single command (replace {SUMMARY} with Haiku's response):
bashTS_UTC=$(date -u +%Y-%m-%d_%H%M) && TS_LOCAL=$(date +%m-%d_%H%M) && printf '\n## %s (local %s)\n%s\n' "$TS_UTC" "$TS_LOCAL" "{SUMMARY}" >> .claude/memory/memory.mdWARNING: Do NOT modify this command. Copy EXACTLY as written.
- •The date format uses single
%(e.g.%Y), NOT%%Y - •
%%in date means "literal %" which outputs format strings instead of dates
Example output:
## 2026-02-01_1727 (local 02-01_0927) - •The date format uses single
- •
Update timestamp marker (use full path from above):
bashnode "{SCRIPTS_PATH}/extract-delta.js" mark-updated - •
Delete temp file (use full path from above):
bashnode "{SCRIPTS_PATH}/extract-delta.js" cleanup
Failure Handling
- •If file doesn't exist in step 1: STOP immediately
- •If Haiku returns ERROR or empty: STOP, don't update/cleanup
- •If Task tool fails: Don't update timestamp, don't delete temp file
- •Next trigger will retry with accumulated content (temp file overwritten)