memory-flush

memory-flush is a skill for Claude Code, Codex from aaronjmars/aeon-agent. It costs 17 tokens per session (1,751 once invoked), scanned A, a copy of memory-flush, MIT.

A memory-maintenance routine that promotes important recent activity into MEMORY.md and removes stale entries. MEMORY.md is a file used to keep durable project context for later work.

In plain words
What is it for?
Use it to consolidate recent activity, focus the update on a topic when needed, rotate old logs, and maintain the memory index.
Why use it?
It prevents useful context from remaining only in logs while reducing outdated information in the main memory file.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to consolidate recent activity, focus the update on a topic when needed, rotate old logs, and maintain the memory index.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aaronjmars/aeon-agent/memory-flush
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.

Any agent
npx skills add aaronjmars/aeon-agent --skill memory-flush
Clone the repo
git clone --depth 1 https://github.com/aaronjmars/aeon-agent

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-flush

README.md
[![agentmods](https://agentmods.dev/badge/skills/aaronjmars/aeon-agent/memory-flush/github.svg)](https://agentmods.dev/skills/aaronjmars/aeon-agent/memory-flush)
Your own site
<a href="https://agentmods.dev/skills/aaronjmars/aeon-agent/memory-flush"><img src="https://agentmods.dev/badge/skills/aaronjmars/aeon-agent/memory-flush/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-flush

Your own site · 80×15
<a href="https://agentmods.dev/skills/aaronjmars/aeon-agent/memory-flush"><img src="https://agentmods.dev/badge/skills/aaronjmars/aeon-agent/memory-flush.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,751 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.00017 $0.01751
Opus 5.5 $0.00007 $0.00700
Sonnet 5.5 $0.00003 $0.00350
Haiku 4.5 $0.00002 $0.00175

Measured 15d ago against content hash ec0d057c56aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-flush scanned grade A with 1 finding 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 15d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`gh pr list` uses the `gh` CLI's built-in auth - no curl env-var expansion. `python3 scripts/memory_prep.py` and all other work is local file I/O against `memory/` (plus `git rm` for log rotation).
Origin

This is a copy

100% identical to memory-flush — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/memory-flush/SKILL.md · 92 lines

How it starts

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

${var} - Topic to focus on. If empty, flushes all recent activity.

If ${var} is set, only promote entries related to that topic. Pruning (step 3), the index upkeep (step 6), and the deterministic watermark + rotation (steps 0 and 8) still run globally - a focused flush must never leave the rest of the store stale.

Read memory/MEMORY.md for current memory state. The scan window and log rotation are computed for you in step 0 - you no longer parse the watermark or rotate logs by hand.

Steps

0. Prepare (deterministic bookkeeping - run this first)

Run python3 scripts/memory_prep.py window and read its stdout. It:

  • computes your scan window from the structured watermark memory/memory-flush-state.json (fallback for a first-run migration: the MEMORY.md *Last consolidated:* line; then the last 3 days; a gap over 14 days is clamped to 14 and flagged), and prints the exact in-window log files to read;
  • has already rotated whole old months out of memory/logs/ into memory/logs/archive/YYYY-MM.md (content-preserving) once the directory passed ~45 files.

Read exactly the files it lists. Do not recompute the window or rotate logs yourself - that work is now deterministic and unit-tested (scripts/memory_prep.py), so it never silently falls back to 3 days or gets skipped. This closed two old holes: entries older than 3 days were lost whenever the agent skipped runs, and a daily schedule re-scanned the same 3 days every time.

1. Scan the in-window logs for entries worth promoting to long-term memory

  • New lessons learned (errors encountered, workarounds found)
  • Topics covered (articles, digests) - add to the recent output/articles/digests tables
  • Features built or tools created
  • Important findings from monitors (on-chain, GitHub, papers)
  • Ideas captured that are still relevant
  • Goals completed or progress milestones

2. Check each candidate against existing MEMORY.md content - dedup precisely

Skip if already recorded. Dedup by the fact's subject, not by string match:

  • Identify what each candidate is about (a skill, a token, a repo, a lesson, a priority).
  • If MEMORY.md already carries that subject, edit the existing line in place (merge the new detail, bump any date). Never append a second bullet that paraphrases an existing one - that near-duplicate drift is what a memory flush exists to prevent.
  • Only add a new bullet when the subject is genuinely absent.

Read the full file on GitHub · 92 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. 15d ago Changed ec0d057c56aa
  2. 1mo ago First seen · 92 lines · 17 tokens per session scan A e996e8110cfc

Subscribe to this mod's changes

memory-flush is a skill published in the GitHub repository aaronjmars/aeon-agent (12 stars, last pushed 6d ago), licensed MIT. It adds 17 tokens to every session and 1,751 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to memory-flush, differing in 9 lines, and is treated as a copy.

Related

Other skills, from other repositories

aura

Give this agent a real email address, a webhook URL, durable memory across runs, and the ability to wait for an event without burning tokens. Use when a task needs a verification code sent by email, needs to wait for a webhook or an approval, needs to remember something after the session ends, or needs to survive a…

phillypmack/aura-agent · 74 tokens

strategy-spec

Generates a backtestable, regime-gated mean-reversion TRADING STRATEGY SPEC for a BSC / PancakeSwap token using CoinMarketCap x402 DEX data — and decides what data is even worth paying for first (honest free-vs-paid routing). Produces rules + parameters + a 180-day backtest with a buy-and-hold benchmark. A strategy…

romudille-bit/agentpay · 177 tokens

agentpay-route

Find, judge, and pay for the best paid x402 tool/API for a need, within a budget. Use when the agent needs a capability behind a paid API and must choose a provider: "which x402 service / paid API for X", "find a tool for X under $Y", comparing providers, avoiding overpriced or fake/stub endpoints, or routing agent…

romudille-bit/agentpay · 100 tokens

agentpay-session

Cap and receipt an AI agent's spending. Open a budget-capped AgentPay session so paid tool/API calls stay under a hard USDC limit and each produces a verifiable receipt + a running ledger. Use when enforcing a spend cap across calls, tracking what an agent spent, or producing an audit trail for autonomous payments.…

romudille-bit/agentpay · 78 tokens

aawp

AAWP (AI Agent Wallet Protocol) — the only crypto wallet protocol built exclusively for AI Agents on EVM-compatible blockchains and Solana. Not for humans. The signer is the AI Agent itself, cryptographically bound at wallet creation. Supports wallet lifecycle management, token transfers, DEX swaps, cross-chain…

aawp-ai/aawp · 90 tokens

wiki-ingest

Use when an operation issue asks to ingest a captured raw/ source into the LLM Wiki, or the user says "ingest ". Create durable source, entity, concept, synthesis, index, and log pages; use paperclip-distill for Paperclip bundles.

paperclipai/paperclip · 61 tokens