Get the FREE Ultimate OpenClaw Setup Guide →

treat

Scanned
npx machina-cli add skill Ruya-AI/cozempic/treat --openclaw
Files (1)
SKILL.md
1.7 KB

Apply a pruning prescription to the current session. Default is standard if no argument given.

Steps

  1. Diagnose first — show the user what they're working with:

    cozempic current --diagnose
    
  2. Dry-run the treatment — show savings without applying:

    cozempic treat current -rx $ARGUMENTS
    

    If no argument was provided, use standard:

    cozempic treat current -rx standard
    
  3. Show results — present the dry-run output including token savings (the Tokens: line). Always surface both byte and token savings.

  4. Ask confirmation — use AskUserQuestion to confirm before applying.

  5. Apply on confirmation:

    cozempic treat current -rx $ARGUMENTS --execute
    
  6. Tell the user: "Treatment applied. A backup was created automatically. To resume with the pruned session, exit and run claude --resume."

Prescriptions

RxStrategiesTypical Savings
gentleprogress-collapse, file-history-dedup, metadata-strip40-55%
standardgentle + thinking-blocks, tool-output-trim, stale-reads, system-reminder-dedup50-70%
aggressivestandard + error-retry-collapse, document-dedup, mega-block-trim, envelope-strip70-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

  1. Step 1: Diagnose the current session with cozempic current --diagnose.
  2. Step 2: Dry-run the treatment: cozempic treat current -rx standard (or choose gentle/aggressive).
  3. 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.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers