mcpField
C
cco-clean

cco-clean

github.com/egorfedorovAgent workflows125198 installsUpdated 1d ago
Repository

About cco-clean

cco-clean is a Claude skill for managing and removing context optimizer tracking data. It supports retention-based cleanup as well as age-based session deletion and a full reset, with approval required for destructive options.

Key features

  1. 01Prunes data by retention policy
  2. 02Deletes sessions older than a chosen age
  3. 03Supports full data reset
  4. 04Reports current session count
  5. 05Requires approval for destructive deletion

Use cases

  1. 01Removing expired tracking data
  2. 02Cleaning up sessions older than a specified period
  3. 03Resetting all optimizer data

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/egorfedorov/claude-context-optimizer --skill cco-clean

After installing, type/cco-cleanin Claude Code to confirm it loaded.

Details

From the project README

Clean Context Optimizer Data

The user wants to clean up tracking data. Parse $ARGUMENTS:

  • If --reset-all: Delete all data in ~/.claude-context-optimizer/ and confirm
  • If --sessions-older-than N: Delete session files older than N days
  • If --prune (or the user just wants the safe cleanup): apply the retention policy now — per-session files older than 90 days (sessions, summaries, prompts) and live-session state older than 14 days (budget, read-cache, notices). Aggregated stats and learned patterns are kept. This also runs automatically once a day at session start.
    node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js prune
    
  • If no arguments: Show current data size and ask what to clean (suggest --prune first — it is non-destructive to stats)

To check data size, Glob ~/.claude-context-optimizer/sessions/*.json and report the session count.

--reset-all and --sessions-older-than delete files: state exactly what will be removed and let the user approve the command — these are not pre-approved.

Comments

Markdown supported