Skip to main content
command CX Codex

memory-prune — Claude Code command: what it does, how to install

memory-prune cleans low-value, broken, and outdated nodes from your semantic memory tree. Keeps project context lean and responsive.

no license ★ 1,357 updated 2026-03-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/memory-prune.md
Open on GitHub

What memory-prune does

This command inspects semantic memory trees built on the WFGY architecture. It identifies prune candidates based on age, low access counts, redundant entries, and failed reasoning branches. The execution pipeline relies on read, write, edit, and bash capabilities within the host environment.

Safety mechanisms protect critical assets. Checkpoint entries, recent nodes under 7 days old, and high delta-S elements strictly above 0.7 are never dropped. When pruning executes, an automatic snapshot lands in .wfgy/backups/, followed by an index rebuild and reference re-linking.

Running this command without an established WFGY memory structure produces no meaningful output.

What it helps with

  • prune obsolete nodes from semantic memory trees
  • eliminate duplicate entries and broken paths
  • reconnect orphaned children after node removal
  • back up memory trees before executing cleanup

Example prompts for the agent

  • /memory:prune --older-than 60
  • /memory:prune --failed-only
  • /memory:prune --old --low-value --dead-ends

How to install memory-prune

Manually: put the files in place

.claude/commands/memory-prune.md

Call it with /memory-prune. For all projects use ~/.claude/commands/

Questions about memory-prune

How to install memory-prune in Claude Code?

Place the command specification file into .claude/commands/memory-prune.md in your project.

What does memory-prune do?

It scans memory nodes against age, score, and utility criteria, dumps a safety backup, deletes candidate nodes, and reconnects severed relationships.

Can memory-prune delete recent or critical records?

No, rules safeguard checkpoints, nodes newer than 7 days, user-flagged items, and nodes exceeding a 0.7 delta-S threshold.

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set112

The whole set →
memory-merge The memory-merge command consolidates multiple semantic tree nodes into one, removing duplicates and grouping related concepts under a single node. CX Codex +1 ★ 1,357repo stars sync-conflict-resolver The sync-conflict-resolver command for Claude Code identifies and resolves data conflicts between GitHub issues and Linear tasks, merging non-conflicting fields or applying a chosen strategy. CX Codex +1 ★ 1,357repo stars standup-report standup-report builds daily standup updates from Git, GitHub, and Linear, with output suited to a team summary, Slack, or email. CX Codex +1 ★ 1,357repo stars memory-compress memory-compress shrinks the semantic memory tree by merging near-identical nodes and dropping duplicates, while key checkpoints stay put. CX Codex +1 ★ 1,357repo stars elevenlabs-transcribe elevenlabs-transcribe is a Claude Code skill that sends audio and video files to ElevenLabs Scribe v2 and returns a transcript. Set the language, output file, or speaker count. CX Codex +1 ★ 1,357repo stars bigcommerce-api Skill for BigCommerce API: REST, GraphQL Storefront, webhooks, OAuth. Guides through integrations, headless storefronts, and marketplace app development. CX Codex +1 ★ 1,357repo stars devops-incident-responder The devops-incident-responder subagent for Claude Code investigates production outages, analyzes pod errors, and drafts rollback plans during service degradation. CX Codex ★ 1,357repo stars frontend-developer frontend-developer — a React-focused subagent that builds and refactors TypeScript UI with testing and accessibility in mind. Use it for new interface work or difficult frontend changes. CX Codex ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open