memory-prune

memory-prune is a skill for Claude Code from frankxai/claude-skills-library. It costs 67 tokens per session (808 once invoked), scanned A, original, MIT.

A review process for finding old project memory entries, showing their contents, and deciding whether to keep, archive, or pin them.

In plain words
What is it for?
It helps maintain a project's MEMORY.md file by reviewing entries older than 30 days.
Why use it?
It keeps the automatically loaded memory from growing beyond its useful size and reduces stale context.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the claude-skills-library plugin — 114 skills shipped together

Good fit It helps maintain a project's MEMORY.md file by reviewing entries older than 30 days.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/frankxai/claude-skills-library/memory-prune
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 frankxai/claude-skills-library --skill memory-prune
Clone the repo
git clone --depth 1 https://github.com/frankxai/claude-skills-library

Made for: Claude Code.

Or install claude-skills-library, the plugin that ships this one along with the rest of its 114 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/frankxai/claude-skills-library/memory-prune/github.svg)](https://agentmods.dev/skills/frankxai/claude-skills-library/memory-prune)
Your own site
<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/memory-prune"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/memory-prune/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-prune

Your own site · 80×15
<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/memory-prune"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/memory-prune.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 808 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00067 $0.00808
Opus 5.5 $0.00027 $0.00323
Sonnet 5.5 $0.00013 $0.00162
Haiku 4.5 $0.00007 $0.00081

Measured 1mo ago against content hash 4a961cee2adc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-prune 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (prune.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

free-skills/memory-prune/SKILL.md · 72 lines

How it starts

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

Memory Prune — assisted, never autonomous

The memory system at ~/.claude/projects/C--Users-frank-Arcanea/memory/ accumulates ~2-3 entries/day. Once MEMORY.md exceeds ~200 lines the auto-loader truncates it and entries silently disappear from future-session context. This skill prevents that without auto-deleting things that might still matter.

Philosophy

  • Never auto-delete. Auto-decay is silent and corrupts the wisdom layer of memory.
  • Bias toward keeping feedback, decision, reference, user — these are durable.
  • Bias toward pruning project_* — these are session snapshots; old ones rarely re-load.
  • Always show content before deciding. A 30-day-old project entry might be the one foundational decision you keep needing.

How it works

  1. Walks ~/.claude/projects/C--Users-frank-Arcanea/memory/ for .md files
  2. Filters to project_*.md last-modified > N days ago (default 30)
  3. For each candidate prints:
    • Filename + age in days
    • First 200 chars of body
    • Recommended action based on heuristics (see below)
  4. Prompts Frank: [k]eep | [a]rchive | [p]in | [s]kip
  5. Executes:
    • archive → move to memory/archive/YYYY-MM/, remove from MEMORY.md
    • pin → rename to <original>_pinned.md, ensure indexed in MEMORY.md
    • keep → no change (will resurface next prune)
    • skip → no change, no resurface this session

Heuristic recommendations

Pattern Recommendation
project_*_session_*.md (session log) archive — these are ephemeral by nature
project_pp_audit_*.md (PP audits) archive after 60 days
project_*_strategy.md (strategy docs) keep or pin — usually evergreen
project_overnight_*.md archive — overnight session snapshots
project_mega_session_*.md archive — date-bound sessions
project_*_2026_03_* archive after 90 days
Any with content > 4 KB explaining a decision rationale suggest pin

Invocation

Run via PowerShell in Windows:

Read the full file on GitHub · 72 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 72 lines · 67 tokens per session scan A 4a961cee2adc

Subscribe to this mod's changes

memory-prune is a skill published in the GitHub repository frankxai/claude-skills-library (47 stars, last pushed today), licensed MIT. It adds 67 tokens to every session and 808 once invoked, about $0.0003 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

session-memory-manager

Manages the entire session lifecycle: from context loading (PRD, Tech Stack) at startup, to maintaining project memory during active sessions, and creating ultra-compact checkpoints for handoff. / Mengelola siklus hidup sesi: dari pemuatan konteks awal, pemeliharaan memori proyek, hingga pembuatan checkpoint ringkas…

roedyrustam/vibes-plug · 77 tokens

nav-compact

Clear conversation context while preserving knowledge via context marker. Use when user says "clear context", "start fresh", "done with this task", or when approaching token limits.

qf-studio/navigator · 38 tokens

fresh-start

Continue in a new chat without losing anything — writes a compact handoff to paste into a fresh conversation. Use whenever the user wants to move to a new chat or conversation, hits usage limits, says replies got slow or Claude forgets earlier details, or the conversation has grown long.

egorfedorov/claude-context-optimizer · 60 tokens

token-check

Estimate how many tokens a pasted text, an attached file or the conversation so far takes, what it means for the context window and usage limits, and how to cut it. Use when the user asks how big something is in tokens, why they keep hitting limits, or whether a file is too large to send.

egorfedorov/claude-context-optimizer · 66 tokens

add-new-entry-from-temp-md

Format new entries from temp.md into tempentries.md, ready to insert into the section files. USE FOR: adding new resources to the knowledge base. DO NOT USE FOR: editing existing entries or restructuring sections.

kimtth/azure-openai-llm-notes · 49 tokens

shipkit-work-memory

Log session progress and save resume state. Infers from conversation and git. Triggers: 'log progress', 'session summary', 'checkpoint', 'save progress', 'end session'.

stefan-stepzero/shipkit · 42 tokens