memory-consolidate

memory-consolidate is a skill for Claude Code, Codex from stoa-platform/stoa. It costs 30 tokens per session (741 once invoked), scanned A, original, Apache-2.0.

A maintenance procedure for consolidating project memory files. It removes outdated facts, checks referenced paths, and looks for contradictions between stored notes.

In plain words
What is it for?
Use it during idle maintenance to review memory indexes and topic files, verify referenced files still exist, and flag stale information.
Why use it?
It helps prevent old or conflicting notes from misleading later work.

Skill for Claude CodeCodex

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 skills/stoa-platform/stoa/memory-consolidate
Any agent
npx skills add stoa-platform/stoa --skill memory-consolidate
Clone the repo
git clone --depth 1 https://github.com/stoa-platform/stoa

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-consolidate

README.md
[![agentmods](https://agentmods.dev/badge/skills/stoa-platform/stoa/memory-consolidate.svg)](https://agentmods.dev/skills/stoa-platform/stoa/memory-consolidate)
Your own site
<a href="https://agentmods.dev/skills/stoa-platform/stoa/memory-consolidate"><img src="https://agentmods.dev/badge/skills/stoa-platform/stoa/memory-consolidate.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 741 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.00030 $0.00741
Opus 5 $0.00015 $0.00370
Sonnet 5 $0.00006 $0.00148
Haiku 4.5 $0.00003 $0.00074

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

Security

Grade A, and why

memory-consolidate 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 5d 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.

.claude/skills/memory-consolidate/SKILL.md · 82 lines

How it starts

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

Memory Consolidation — autoDream Pattern

CAB-2005: Inspired by Claude Code's autoDream process revealed in the March 2026 source leak. During idle periods, autoDream merges disparate observations, removes logical contradictions, and converts vague insights into verified facts.

This skill performs the same operation on STOA's memory system.

Step 1: Read All Memory Files

Read the memory index and all referenced topic files:

  1. ~/.claude/projects/-Users-torpedo-hlfh-repos-stoa/memory/MEMORY.md (index)
  2. All .md files referenced in MEMORY.md (topic files)
  3. memory.md (project root — session state)

Step 2: Verify File References

For each file path mentioned in any memory file (backtick-quoted paths like path/to/file.ext):

  1. Check if the file still exists in the codebase
  2. If NOT: flag as stale, note the memory file and line
  3. If YES but content has changed significantly: flag as potentially outdated

Use Glob and Grep to verify existence. Do NOT read every referenced file — just check existence.

Step 3: Detect Contradictions

Scan for contradictions across memory files:

  • Version conflicts: e.g., "ADR numbering: next ADR-048" in one file vs "ADR-060" in another
  • Status conflicts: item marked DONE in one file but IN PROGRESS in another
  • Port/URL conflicts: different ports or URLs for the same service
  • Date conflicts: timeline inconsistencies

Step 4: Detect Stale Facts

Flag facts that are likely outdated:

  • References to cycles older than 2 cycles ago still marked "CURRENT"
  • TODO items with dates more than 2 weeks in the past
  • "Active" items that haven't been updated in 30+ days
  • Infrastructure references (IPs, service names) that may have changed

Step 5: Apply Fixes

For each issue found:

  • Stale path: Remove or update the reference
  • Contradiction: Keep the more recent/accurate version, remove the other
  • Outdated fact: Update if current state is clear, otherwise flag for human review
  • Stale TODO: Move to completed or remove if no longer relevant

Read the full file on GitHub · 82 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. 5d ago First seen · 82 lines · 30 tokens per session scan A 22bf2ea1723d

Subscribe to this mod's changes

memory-consolidate is a skill published in the GitHub repository stoa-platform/stoa (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 741 once invoked, about $0.0002 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-31.