Skip to content
Development
Command

/cleanup-context

Memory optimization - removes duplicates, consolidates knowledge, and cleans memory banks for better performance.

From plugin
fusengine-claude-plugins
3434 skills40 agents34 commands
$ npx -y skills add fusengine/claude-plugins --agent claude-code

Command definition

cleanup-context.md
description: Memory optimization - removes duplicates, consolidates knowledge, and cleans memory banks for better performance.
disable-model-invocation: false

Cleanup Context

Executes the automatic cleanup script for Claude Code context.

Script Automatique

Run complete cleanup:

~/.claude/scripts/cleanup-context.sh

What Gets Cleaned (PERMANENT DELETION):

1. **file-history/** - Files >7 days deleted 2. **history.jsonl** - Deleted and reset 3. **hook-debug.log** - Deleted and reset 4. **security.log** - Deleted and reset 5. **session-env/** - Sessions >30 days deleted 6. **projects/** - Files >60 days deleted 7. **statsig/** - Completely emptied 8. **todos/** - Files >30 days deleted

⚠️ **No backup** - Permanent deletion

Cleanup Report

The script displays:

  • BEFORE state (number of files, lines, size)
  • Actions performed
  • AFTER state
  • Summary of deletions/archives

Example output:

🧹 Claude Code context cleanup

📊 BEFORE cleanup state:
  File history: 1234 files
  History.jsonl: 5678 lines
  Sessions: 89 files
  Total size: 245MB

🗑️ Cleaning file-history (>7 days)...
  ✓ 856 files deleted

🗑️ Deleting history.jsonl...
  ✓ Deleted and reset

✅ Cleanup complete!

📈 Summary:
  File history: 856 files deleted
  Sessions deleted: 34
  Logs deleted: hook-debug.log, security.log, history.jsonl

**Example Usage**:

  • `/cleanup-context` → Run complete cleanup
Read more
@fusengine
Ships withfusengine-claude-plugins

A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment.

34200 skills40 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
34
Star history of fusengine/agents on GitHub, a chart by star-history.com

Other commands on fusengine-claude-plugins.

apex

apex

Command

APEX Methodology - The systematic Analyze-Plan-Execute-eLicit-eXamine approach for intelligent development. Reduces hallucination…

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command