treat
Scannednpx machina-cli add skill Ruya-AI/cozempic/treat --openclawApply a pruning prescription to the current session. Default is standard if no argument given.
Steps
-
Diagnose first — show the user what they're working with:
cozempic current --diagnose -
Dry-run the treatment — show savings without applying:
cozempic treat current -rx $ARGUMENTSIf no argument was provided, use
standard:cozempic treat current -rx standard -
Show results — present the dry-run output including token savings (the
Tokens:line). Always surface both byte and token savings. -
Ask confirmation — use AskUserQuestion to confirm before applying.
-
Apply on confirmation:
cozempic treat current -rx $ARGUMENTS --execute -
Tell the user: "Treatment applied. A backup was created automatically. To resume with the pruned session, exit and run
claude --resume."
Prescriptions
| Rx | Strategies | Typical Savings |
|---|---|---|
gentle | progress-collapse, file-history-dedup, metadata-strip | 40-55% |
standard | gentle + thinking-blocks, tool-output-trim, stale-reads, system-reminder-dedup | 50-70% |
aggressive | standard + error-retry-collapse, document-dedup, mega-block-trim, envelope-strip | 70-95% |
Safety
- Always dry-run first — never execute without showing the user what will change
- Backups are automatic (timestamped .bak files)
- Never touches uuid/parentUuid — conversation DAG stays intact
Source
git clone https://github.com/Ruya-AI/cozempic/blob/main/plugin/skills/treat/SKILL.mdView on GitHub Overview
treat applies a pruning prescription to a bloated session, removing progress ticks, stale reads, duplicate content, and other clutter. It guides you through a dry-run to reveal token and byte savings before applying the changes and creates automatic backups.
How This Skill Works
Diagnose the session with cozempic current --diagnose, then simulate pruning using cozempic treat current -rx [gentle|standard|aggressive]. Review the dry-run output (Tokens and Bytes saved), confirm to apply with --execute, and rely on automatic backups. The process preserves the conversation DAG (uuid/parentUuid) while pruning.
When to Use It
- A long, bloated session with many messages and duplicate content that slows performance.
- Sessions containing stale reads or outdated references that distort context.
- Before handing off or exporting chat history to reduce storage and costs.
- When you need a higher reduction in token usage for critical prompts or follow-ups.
- After diagnosing a session and deciding to prune while preserving the conversation structure.
Quick Start
- Step 1: Diagnose the current session with cozempic current --diagnose.
- Step 2: Dry-run the treatment: cozempic treat current -rx standard (or choose gentle/aggressive).
- Step 3: If you’re satisfied with the dry-run results, apply the changes: cozempic treat current -rx standard --execute.
Best Practices
- Always run a dry-run first with cozempic treat current -rx <choice> to show exact changes and savings.
- Review the dry-run output focusing on Tokens and Bytes saved before applying.
- Start with gentle, then escalate to standard or aggressive if more pruning is needed.
- Verify backups are created automatically (timestamped .bak files) prior to applying.
- Never touches uuid/parentUuid — the conversation DAG remains intact.
Example Use Cases
- Example 1: A long customer-support thread is pruned with gentle, yielding 40-55% token savings while preserving essential context.
- Example 2: A cluttered session with metadata and stale reads is trimmed using standard, delivering 50-70% savings and removing many duplicates.
- Example 3: A data-heavy chat is aggressively pruned (standard base with extra cuts) to achieve 70-95% savings, including document dedup and mega-block trim.
- Example 4: You run a dry-run first to preview token savings, then decide the appropriate prescription before applying.
- Example 5: After pruning, you resume work with claude --resume and continue the conversation cleanly thanks to automatic backups.