reflect

A command for reviewing recent journal entries and updating long-term memory with useful facts, lessons, preferences, and project context.

In plain words
What is it for?
Use it to maintain an AI assistant's memory after a week of work.
Why use it?
It prevents important information from being buried in short-term notes or forgotten between sessions.

Command

Install

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.

agentmods
npx agentmods add commands/tstockham96/claw-kit/reflect
Clone the repo
git clone --depth 1 https://github.com/tstockham96/claw-kit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 861 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00861
Opus 5 $0.00000 $0.00430
Sonnet 5 $0.00000 $0.00172
Haiku 4.5 $0.00000 $0.00086

Measured 2d ago against content hash f362a7a48db0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reflect 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 2d 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.

kit/commands/reflect.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/reflect

Curate and compress recent memory. This command reviews the last 7 days of journal entries, extracts durable insights, and updates long-term memory files. Think of it as memory maintenance -- moving important things from short-term to long-term storage.

Instructions

Step 1: Gather Recent History

Search for recent journal entries and activity using the search engine:

cd kit/search && npx tsx src/cli.ts search "journal session summary" --limit 20 --memory-path ../memory

Also read journal entries for the last 7 days directly. For each day from today back to 7 days ago, check if memory/journal/YYYY-MM-DD.md exists and read it if so. The search results may surface entries the direct reads miss, and vice versa.

Also read the current state of:

  • memory/long-term.md
  • memory/preferences.md
  • memory/learnings.md
  • memory/projects/_index.md

Step 2: Extract Insights

From the journal entries and search results, identify:

  1. Key facts that should be remembered long-term (decisions made, things learned, important context established). These go into memory/long-term.md.

  2. Preference patterns -- things the user consistently does, prefers, or reacts to. If you notice something appearing more than once, or a clear preference emerging from behavior, it belongs in memory/preferences.md. Only add genuine patterns, not one-off observations.

  3. Lessons learned -- mistakes that were made, corrections that were applied, or insights about what works and what doesn't. These go into memory/learnings.md.

  4. Project status updates -- if projects had meaningful progress, update memory/projects/_index.md with current status.

Step 3: Check for Duplicates via Search

Before adding each insight, search to see if it's already captured:

cd kit/search && npx tsx src/cli.ts search "key terms from the insight" --limit 3 --memory-path ../memory

Only add genuinely new information. If an existing entry needs updating, modify it rather than creating a duplicate.

Read the full file on GitHub · 97 lines

Changes

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.

  1. 2d ago First seen · 97 lines · 0 tokens per session scan A f362a7a48db0

Subscribe to this mod's changes

reflect is a command published in the GitHub repository tstockham96/claw-kit (5 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 861 tokens. 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-31.