treat

Prune bloated Claude Code session files with dry-runs and backups.

368|36|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/Ruya-AI/cozempic --skill treat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: treat
Source: https://github.com/Ruya-AI/cozempic/tree/main/plugin/skills/treat
Command: npx skills add https://github.com/Ruya-AI/cozempic --skill treat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prunes bloated Claude Code session files by removing progress ticks, duplicate content, stale reads, oversized tool outputs, and metadata bloat to reclaim token budget and prevent Agent Teams from losing critical context.

Core Features & Use Cases

  • Prescription-driven pruning: choose gentle, standard, or aggressive prescriptions to balance safety and savings.
  • Safe, audited workflow: diagnose first, perform a dry-run showing both byte and token savings, request explicit user confirmation, and create automatic timestamped backups before applying changes.
  • Agent Teams protection: preserves conversation DAG integrity by never modifying uuid or parentUuid and provides token-aware diagnostics to avoid catastrophic auto-compaction loss.
  • Use Case: when a Claude Code session approaches the model context limit, run a dry-run to see savings then apply a standard or aggressive prescription to restore usable tokens while keeping recoverable backups.

Quick Start

Dry-run a standard prune, review the reported token savings, and confirm to apply the treatment to the current session.

Frequently Asked Questions about treat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce token usage in a bloated Claude Code session?

Reduce token usage in a bloated Claude Code session by pruning progress ticks, duplicate content, stale reads, and oversized tool outputs. Run a dry-run diagnostic first to preview both byte and token savings before applying changes.

What is session pruning and how does it preserve conversation history?

Session pruning removes metadata bloat and redundant content from Claude Code sessions while preserving conversation DAG integrity. It never modifies uuid or parentUuid values, ensuring the original conversation structure remains intact and recoverable.

Can I back up my Claude Code session before applying an aggressive context cleaning?

You can back up your Claude Code session before context cleaning because the workflow creates automatic timestamped backups. This safety check ensures you can restore the original session state if aggressive pruning removes needed information.

Does session pruning work with Agent Teams to prevent auto-compaction context loss?

Session pruning works with Agent Teams to prevent auto-compaction context loss by providing token-aware diagnostics. It helps diagnose savings with dry-runs and applies prescriptions to restore usable tokens while keeping recoverable backups.

What is the difference between gentle, standard, and aggressive session pruning prescriptions?

The difference between gentle, standard, and aggressive session pruning prescriptions is the balance between safety and token savings. Gentle removes minimal bloat, while aggressive targets more redundant content to reclaim a larger token budget.