Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/stefan-jansen/claude-code-toolkit/memory-reviewgit clone --depth 1 https://github.com/stefan-jansen/claude-code-toolkitWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00014 | $0.01410 |
| Opus 5 | $0.00007 | $0.00705 |
| Sonnet 5 | $0.00003 | $0.00282 |
| Haiku 4.5 | $0.00001 | $0.00141 |
Grade A, and why
memory-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Review
Display comprehensive view of current memory state to support active memory maintenance.
What This Command Does
Show current memory files with metadata to help identify what needs updating, removing, or relocating.
#!/bin/bash
# Constants
MEMORY_DIR=".claude/memory"
DOCUMENTATION_DIR=".claude/documentation"
STALENESS_THRESHOLD=30
SIZE_LIMIT=5120
CURRENT_DATE=$(date +%Y-%m-%d)
# Check if memory directory exists
if [[ ! -d "$MEMORY_DIR" ]]; then
echo "❌ No memory directory found at $MEMORY_DIR"
echo "💡 Run /memory-update to create initial memory structure"
exit 1
fi
echo "Memory Review - $CURRENT_DATE"
echo ""
# Function to calculate days since date
days_since() {
local date_str=$1
if [[ -z "$date_str" ]] || [[ "$date_str" == "N/A" ]]; then
echo "999"
return
fi
local date_epoch=$(date -d "$date_str" +%s 2>/dev/null || date -j -f "%Y-%m-%d" "$date_str" "+%s" 2>/dev/null || echo 0)
local current_epoch=$(date +%s)
local diff_days=$(( (current_epoch - date_epoch) / 86400 ))
echo $diff_days
}
# Analyze memory files
echo "📁 Memory Files ($MEMORY_DIR/):"
total_size=0
fresh_count=0
stale_count=0
oversized_count=0
file_count=0
for file in "$MEMORY_DIR"/*.md; do
if [[ -f "$file" ]]; then
filename=$(basename "$file")
size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file" 2>/dev/null)
size_human=$(numfmt --to=iec-i --suffix=B $size 2>/dev/null || echo "${size} bytes")
# Extract last validated date
last_validated=$(grep -oP "Last (validated|updated).*?(\d{4}-\d{2}-\d{2})" "$file" | tail -1 | grep -oP "\d{4}-\d{2}-\d{2}" || echo "N/A")
status="✅"
note=""
# Check staleness
if [[ "$last_validated" != "N/A" ]]; then
days=$(days_since "$last_validated")
if [[ $days -gt $STALENESS_THRESHOLD ]]; then
status="🔴"
note="(Stale: $days days)"
stale_count=$((stale_count + 1))
elif [[ $days -gt 7 ]]; then
status="⚠️"
note="(Aging: $days days)"
stale_count=$((stale_count + 1))
else
note="(Fresh)"
fresh_count=$((fresh_count + 1))
fi
else
status="⚠️"
note="(No timestamp)"
stale_count=$((stale_count + 1))
fi
# Check size
if [[ $size -gt $SIZE_LIMIT ]]; then
status="⚠️"
note="$note (Oversized: >5KB)"
oversized_count=$((oversized_count + 1))
fi
printf " %s %-25s %-12s %-20s %s\n" "$status" "$filename" "$size_human" "$last_validated" "$note"
total_size=$((total_size + size))
file_count=$((file_count + 1))
fi
done
echo ""
# Analyze documentation files
if [[ -d "$DOCUMENTATION_DIR" ]]; then
echo "📁 Documentation Files ($DOCUMENTATION_DIR/):"
for file in "$DOCUMENTATION_DIR"/*.md; do
if [[ -f "$file" ]]; then
filename=$(basename "$file")
size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file" 2>/dev/null)
size_human=$(numfmt --to=iec-i --suffix=B $size 2>/dev/null || echo "${size} bytes")
created=$(date -r "$file" +%Y-%m-%d 2>/dev/null || stat -f "%Sm" -t "%Y-%m-%d" "$file" 2>/dev/null || echo "Unknown")
printf " ✅ %-25s %-12s Created: %s\n" "$filename" "$size_human" "$created"
fi
done
echo ""
fi
# Summary
total_size_human=$(numfmt --to=iec-i --suffix=B $total_size 2>/dev/null || echo "${total_size} bytes")
echo "📊 Summary:"
echo " Total memory: $total_size_human ($file_count files)"
echo " Fresh: $fresh_count files (validated <7 days)"
echo " Stale: $stale_count files (validated >7 days or no timestamp)"
echo " Oversized: $oversized_count files (>5KB)"
echo ""
# Recommendations
if [[ $stale_count -gt 0 ]] || [[ $oversized_count -gt 0 ]]; then
echo "⚠️ Actions Recommended:"
if [[ $stale_count -gt 0 ]]; then
echo " - Review stale files with /memory-update"
echo " - Run /memory-gc to clean up stale content"
fi
if [[ $oversized_count -gt 0 ]]; then
echo " - Split oversized files into smaller modules"
fi
else
echo "✅ Memory health: Good"
echo " All files are fresh, properly sized, and timestamped"
fi
echo ""
echo "💡 Next steps:"
echo " - /memory-update : Update or add memory entries"
echo " - /memory-gc : Clean up stale content"
echo " - /status : Check overall project health"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 162 lines · 14 tokens per session scan A 2f4605587886
memory-review is a command published in the GitHub repository stefan-jansen/claude-code-toolkit (85 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 1,410 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
ctx
Search agent history or trace code to its original agent session.
enrich
Enrich project memory by mining 100 recently merged PRs: extracts decisions, conventions, gotchas, and architectural facts from PR discussions, review comments, and PR bodies.
reportloop
Interactively walk through all issues in REVIEWREPORT.md: explains each issue, asks to fix or skip, handles follow-up questions, and applies fixes one by one in severity order.
a11y
Audit and fix WCAG AA compliance — semantic HTML, ARIA, keyboard, contrast, reduced-motion.
components
Build component catalog with props, states, and accessibility.
docs
Audit docs, fix doc rot, enforce README and changelog standards.