Skip to main content
skill CX Codex

memory-reflect · basicmachines-co — Claude Code skill: consolidate agent memory

A background skill that reviews recent sessions and daily notes, pulls out what matters and folds it into long-term memory. Runs on a schedule or on demand.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add basicmachines-co/basic-memory-skills --skill memory-reflect -a claude-code
Open on GitHub

What memory-reflect does

Think of memory-reflect as sleep for your agent. It opens notes from the last couple of days, checks active tasks, and decides what deserves to stick around: decisions that shape future work, lessons from mistakes, working-style preferences, details about people. Weather checks and routine steps get dropped.

It then updates MEMORY.md in place, following whatever structure the file already has. New sections get added, outdated entries get rewritten instead of duplicated. Today's daily note gets a short reflection log listing what was reviewed, what moved into long-term memory and what was cleaned up. The daily notes themselves stay put — they are the raw record.

The author suggests scheduling it once or twice a day through cron or heartbeat. Another good moment is right after context compaction, when part of the history is gone. The skill leans on the recent_activity, read_note and search_notes tools, so with no note store configured it has nothing to read. While gathering material it also looks for filesystem trouble: recursive nesting like memory/memory/memory/, orphaned files, bloated notes. Those are the usual reason a reflection run ends up hoarding junk.

What it helps with

  • carry decisions from yesterday's session into long-term memory
  • strip duplicates and stale entries out of MEMORY.md
  • turn a chronological note dump into topical sections
  • spot orphaned files and recursive nesting in the note store
  • run a memory pass after context compaction

Example prompts for the agent

  • Reflect on my recent sessions and update MEMORY.md
  • Go through the last two days of daily notes and pull out what's worth keeping
  • Check my memory for duplicates and junk files

How to install memory-reflect

1Skills CLI (Vercel)

npx skills add basicmachines-co/basic-memory-skills --skill memory-reflect -a claude-code

2Manually: put the files in place

~/.claude/skills/memory-reflect/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/memory-reflect/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about memory-reflect

How do I install memory-reflect in Claude?

Run npx skills add basicmachines-co/basic-memory-skills --skill memory-reflect -a claude-code. The skill file then lands at ~/.claude/skills/memory-reflect/SKILL.md.

What does memory-reflect do?

It reads recent notes and active tasks, picks out decisions, lessons and preferences, and writes them into MEMORY.md. It also appends a short log of the run to today's daily note.

When should I run the reflection?

The author suggests a background task once or twice a day via cron or heartbeat. You can also trigger it by hand after context compaction or when notes have piled up.

Similar skills

All skills for Agent setup: memory, context, orchestration →

memory-reflect by other authors comes first.

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor