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
- 01Prunes data by retention policy
- 02Deletes sessions older than a chosen age
- 03Supports full data reset
- 04Reports current session count
- 05Requires approval for destructive deletion
Use cases
- 01Removing expired tracking data
- 02Cleaning up sessions older than a specified period
- 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-cleanAfter installing, type/cco-cleanin Claude Code to confirm it loaded.
Details
From the project READMEClean 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
--prunefirst — 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