diagnose
Scannednpx machina-cli add skill Ruya-AI/cozempic/diagnose --openclawRun a diagnosis on the current session:
cozempic current --diagnose
The output includes:
- Weight: total session size in bytes and message count
- Tokens: exact token count (from usage data) or heuristic estimate
- Context bar: visual bar showing % of the 200K context window used
- Vital signs: progress ticks, file history snapshots, system reminders, thinking content, signatures, tool results
- Message type breakdown: bytes per message type
- Top 10 largest messages: biggest bloat contributors
- Estimated savings by prescription: what gentle/standard/aggressive would save
Always surface the token count and context % to the user. If context is above 60%, suggest running /cozempic:treat with a prescription recommendation:
- Under 5MB:
gentle - 5-20MB:
standard - Over 20MB:
aggressive
Source
git clone https://github.com/Ruya-AI/cozempic/blob/main/plugin/skills/diagnose/SKILL.mdView on GitHub Overview
Diagnose analyzes the current Claude Code session to reveal token counts, context usage, and bloat contributors. It helps you understand session size, context window pressure, and where to trim for optimal performance.
How This Skill Works
Run the diagnosis with cozempic current --diagnose to generate a report that includes Weight, Tokens, Context bar, Vital signs, and a Message type breakdown. The tool always surfaces the token count and context % to the user; if context exceeds 60%, it suggests running /cozempic:treat with a prescription based on the session size (Under 5MB gentle, 5-20MB standard, Over 20MB aggressive).
When to Use It
- User asks about session size or context usage
- Context window feels full or near capacity (high context %)
- You need to identify top bloat contributors (Top 10 largest messages)
- You want estimated savings by prescription (gentle/standard/aggressive)
- Explaining diagnostic results to a non-technical user
Quick Start
- Step 1: Run cozempic current --diagnose
- Step 2: Review the report, focusing on Weight, Tokens, Context bar, and Top 10 largest messages
- Step 3: If context > 60%, run /cozempic:treat with a prescription (gentle, standard, or aggressive) based on size: Under 5MB gentle; 5-20MB standard; Over 20MB aggressive
Best Practices
- Always surface token count and context % in every diagnosis report
- Highlight the Top 10 largest messages to pinpoint bloat sources
- Provide concrete next steps and a prescription recommendation when needed
- Cross-check Weight with the actual message count and content types
- Reference the 200K context window to interpret the context bar accurately
Example Use Cases
- A user asks why their Claude Code session feels large or slow.
- Context bar shows 68% usage; you recommend running /cozempic:treat with a standard prescription.
- Diagnosis reveals long tool outputs and historical summaries as major contributors.
- You compute and present estimated MB savings for gentle vs standard vs aggressive prescriptions.
- You explain Weight, Tokens, and Vital signs to a teammate to justify actions.