Agent skill

Memory Flush

by aeonfun in aeonfun/aeon

Promote important recent log entries into MEMORY.md and prune stale ones

MITAuto-check passed

Install Memory Flush

skills CLI
$ npx skills add aeonfun/aeon --skill memory-flush -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aeonfun/aeon memory-flush --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aeonfun/aeon.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/memory-flush .claude/skills/memory-flush && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-flush
GitHub stars
767
Token cost
~1.8k tokens
SKILL.md length
1,054 words
Files
1
Skills in repo
82
Repo updated
First seen
Licence
MIT

At a glance

Promote important recent log entries into MEMORY.md and prune stale ones

  • Works in 9 steps: Prepare (deterministic bookkeeping - run… → Scan the in-window logs for entries… → Check each candidate against existing… → …
  • SKILL.md covers Steps, Network note and Constraints
  • Calls python3, gh and git

What it does

Memory Flush is an agent skill from aeonfun/aeon. Promote important recent log entries into MEMORY.md and prune stale ones

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: The most autonomous AI agent framework: runs unattended on GitHub Actions, self-healing skills, drives Claude Code, Grok, Codex & more. No approval loops. Configure once, forget… The licence is MIT.

Example prompts

  • “/memory-flush”

Requirements

  • Python 3

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Prepare (deterministic bookkeeping - run this first)
  2. Scan the in-window logs for entries worth promoting to long-term memory
  3. Check each candidate against existing MEMORY.md content - dedup precisely
  4. Remove stale entries - this is as important as adding new ones
  5. Update memory
  6. Make targeted edits only
  7. Register any new topic files in the index
  8. (Automated) Log rotation
  9. Log the run, then stamp the watermark

What it can do on your machine

Read from SKILL.md and the folder at commit f252074. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • gh
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Memory Flush loads about 1.8k tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 1,054 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aeonfun/aeon at commit f252074, republished under its MIT licence (© aeonfun). 1,054 words, ~1,826 tokens.

Download SKILL.mdSave it as .claude/skills/memory-flush/SKILL.md (or your agent's skills folder).
name
memory-flush
description
Promote important recent log entries into MEMORY.md and prune stale ones
scorable
false
metadata.title
Memory Flush
metadata.category
core
metadata.tags
meta

${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.
3. Remove stale entries - this is as important as adding new ones

a. Open Improvement PRs section: Run gh pr list --state open --search "improve:" --json number,title,url and compare against any "Open Improvement PRs" section in MEMORY.md.

  • If all listed PRs are now merged/closed, remove the section entirely.
  • If some PRs are merged, update the list to reflect only current open ones. b. Next Priorities section: Cross-check each listed priority against recent logs and current repo state. Remove priorities that are already done (e.g., "Merge open PRs" if 0 open PRs exist). Add any newly urgent priorities surfaced by recent logs. c. Lessons Learned: Remove lessons that are now outdated or resolved (e.g., a workaround for a bug that was later fixed). d. Overflow any section that outgrows its budget (keeps MEMORY.md an index, not a ledger): if a section has grown past the last ~10-15 rows - the Skills Built table is the usual first offender, but the rule is general - archive the oldest rows to memory/topics/<section>-history.md (e.g. skills-history.md) and leave a one-line pointer to that file. Trim newest-kept, oldest-archived.
4. Update memory
  • Add brief entries to MEMORY.md (keep it under ~50 lines as an index).
  • If a topic needs more detail, write to memory/topics/<topic>.md instead (see step 6 - register it in the index).
  • Update tables (recent articles, recent digests) with new rows.
  • Before adding a section, check whether its ## Heading already exists anywhere in MEMORY.md - if it does, update that section in place. Never prepend a duplicate heading.
  • Do not hand-edit the consolidation date. It is stamped by step 8 (memory_prep.py stamp), which writes the structured watermark memory/memory-flush-state.json (the source of truth) and mirrors it into the MEMORY.md *Last consolidated:* line. Skipping step 8 after a real flush is a bug - other skills (e.g. action-converter) read that line to tell a live, consolidated store from an untouched template.
Show full SKILL.md (377 more words)Show less
5. Make targeted edits only

Do NOT rewrite the whole file - make targeted additions and removals.

6. Register any new topic files in the index

If step 4 created a new memory/topics/<topic>.md (or a *-history.md archive in step 3d), add a one-line pointer to it under the # Reference section of memory/topics/index.md, matching the existing row format. New topic notes that aren't linked from the index become orphans no other run can find.

7. (Automated) Log rotation

Log rotation now runs deterministically in step 0 (memory_prep.py window): whole calendar months entirely older than the 14-day scan floor are appended to memory/logs/archive/YYYY-MM.md and git rm'd once memory/logs/ passes ~45 files. The archive preserves every line, respecting the append-only contract while bounding the file count. Nothing to do here by hand; a log inside the scan window is never touched.

8. Log the run, then stamp the watermark

Log what you promoted, pruned, and archived, plus the scan window you used (start date to today; note if a >14-day gap was clamped), to memory/logs/${today}.md as bullets under a ### memory-flush heading (the health loop keys entries by slug).

Then run python3 scripts/memory_prep.py stamp as your final action - it writes today's date to memory/memory-flush-state.json and mirrors it into the MEMORY.md *Last consolidated:* line.

If nothing was worth promoting or removing, log MEMORY_FLUSH_OK - but still run memory_prep.py stamp: a clean flush is still a consolidation and must advance the watermark.

Network note

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

Constraints

  • Keep MEMORY.md an index (~50 lines). Detail lives in memory/topics/.
  • Never duplicate an existing ## Heading or an existing fact - update in place.
  • Pruning stale entries is as important as adding new ones.
  • The watermark and log rotation are owned by scripts/memory_prep.py (steps 0 and 8), not by hand. The model's job is judgment: what to promote, dedup, and prune.
  • This skill owns MEMORY.md consolidation. Other skills (e.g. self-improve) may flag memory-hygiene problems, but structural pruning and archiving of MEMORY.md should land here to avoid two skills thrashing the same file. If self-improve prunes in an audit, treat it as a stopgap, not a reason to skip the next flush.

© aeonfun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/memory-flush of aeonfun/aeon.

Open the folder on GitHubat commit f252074

Compare with similar skills

Memory Flush next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory Flush compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Flush this skillaeonfun/aeon767—~1.8kAutomated safety check: PassMIT
Importasgeirtj/system_prompts_leaks69k—~3.5kAutomated safety check: PassCC0-1.0
Growth Logaffaan-m/ECC274k1 repos~1.7kAutomated safety check: PassMIT
Implementing Log Integrity With Blockchainmukul975/Anthropic-Cybersecurity-Skills34k—~611Automated safety check: PassApache-2.0
Promotealirezarezvani/claude-skills28k2 repos~1.1kAutomated safety check: PassMIT
Nx Importnrwl/nx29k5 repos~3.5kAutomated safety check: PassMIT

Similar skills

  • Import

    asgeirtj/system_prompts_leaks

    Handle explicit /import requests for read-only transcript recovery and a resume checkpoint, or continue work from other coding agents and unnamed artifacts.

    69k GitHub stars~3.5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Growth Log

    affaan-m/ECC

    Write growth log entries that extract reusable patterns from completed work — root cause, transferable rule, and a recognizable signal — instead of diary-style event narration, with a 4-8 sentence…

    274k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Implementing Log Integrity With Blockchain

    mukul975/Anthropic-Cybersecurity-Skills

    Builds an append-only log integrity chain using SHA-256 hash chaining, where each entry incorporates the previous entry's hash so tampering invalidates all subsequent hashes; covers log ingestion…

    34k GitHub stars~611 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Promote

    alirezarezvani/claude-skills

    Graduate a proven pattern from auto-memory (MEMORY.md) to CLAUDE.md or .claude/rules/ for permanent enforcement.

    28k GitHub starsUsed in 2 repos~1.1k tokens
    Agent WorkflowsAuto-check passed
  • Nx Import

    nrwl/nx

    Import, merge, or combine repositories into an Nx workspace using nx import.

    29k GitHub starsUsed in 5 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Type Only Imports

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing import statements in TypeScript files, setting up a new TypeScript project, or investigating unexpected bundle inclusions from type-only dependencies.

    74k GitHub stars~558 tokensUpdated yesterday
    Auto-check passed

More from aeonfun/aeon

All 82 skills in this repo
  • Browses open tasks on the TaskMarket agent-worker market and, with explicit operator approval, creates tasks, tracks submissions and submits finished work.

    767 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Sets up and manages an Aeon agent instance that runs skills on a schedule through GitHub Actions: starting, rescheduling, debugging, editing skills and mining chat history.

    767 GitHub stars~8.8k tokensUpdated today
    Auto-check: warnings
  • Reads a Base Account's address, portfolio and transaction history through the Base MCP server, and stays strictly read-only in unattended Aeon runs, reporting only changes.

    767 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Audits every page of a site each day from its sitemap, scores on-page and technical SEO, checks duplicates across pages and reports what changed since the last run.

    767 GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Action Converter

    aeonfun/aeon

    5 concrete real-life actions, leverage-scored against open loops with specificity and anti-fluff gates

    767 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Aeon Config Doctor

    aeonfun/aeon

    Static linter for an Aeon instance's configuration that catches silent failures such as unquoted schedules, duplicate keys, unconfigured skills and broken MCP references.

    767 GitHub stars~3.3k tokensUpdated today
    Auto-check passed

Questions about Memory Flush

What does Memory Flush do?

Promote important recent log entries into MEMORY.md and prune stale ones. Memory Flush is an agent skill from aeonfun/aeon.

How do I install Memory Flush in Claude Code?

Run `npx skills add aeonfun/aeon --skill memory-flush -a claude-code`. Or copy the skill folder (skills/memory-flush in aeonfun/aeon) into .claude/skills/memory-flush in your project. Claude Code loads it when a task matches its description.

How do I install Memory Flush in Codex?

Run `npx skills add aeonfun/aeon --skill memory-flush -a codex`. Or copy the skill folder (skills/memory-flush in aeonfun/aeon) into .agents/skills/memory-flush in your project. Codex loads it when a task matches its description.

Can I use Memory Flush in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aeonfun/aeon --skill memory-flush -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-flush, .gemini/skills/memory-flush, .github/skills/memory-flush and .opencode/skills/memory-flush in your project.

What does Memory Flush need to run?

Going by SKILL.md and its folder, Memory Flush needs the command-line tools its instructions call (python3, gh and git). Our summary lists: Python 3.

Does Memory Flush access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Memory Flush safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Memory Flush use?

Memory Flush is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory Flush use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Memory Flush?

Skills that share tags, products or a category with Memory Flush: Import (asgeirtj/system_prompts_leaks, 69k stars), Growth Log (affaan-m/ECC, 274k stars), Implementing Log Integrity With Blockchain (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Promote (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Flush?

aeonfun (a GitHub organization) maintains it in aeonfun/aeon, which has 767 GitHub stars. The repository holds 82 skills in this directory. The repository was last updated on October 6, 2026.

Source: aeonfun/aeon on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.