Skip to content
Development
Skill

/diagnose

Analyze Claude Code session bloat — shows token count, context usage %, and bloat breakdown. Use when the user asks about session size, context usage, or when you notice the context window is getting full.

From plugin
cozempic
4135 skills1 command1 MCP
Install
$ npx -y skills add Ruya-AI/cozempic --skill diagnose --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/diagnose

Context preview

The summary Claude sees to decide when to auto-load this skill.

Analyze Claude Code session bloat — shows token count, context usage %, and bloat breakdown. Use when the user asks about session size, context usage, or when you notice the context window is getting full.

SKILL.md

diagnose.SKILL.md
name: diagnose
description: Analyze Claude Code session bloat — shows token count, context usage %, and bloat breakdown. Use when the user asks about session size, context usage, or when you notice the context window is getting full.
allowed-tools: Bash(cozempic *)

Run 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 detected context window (200K or 1M)
  • **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`
Ships withcozempic

100,000+ power users trust Cozempic to keep their Claude Code sessions lean. Context cleaning for Claude Code — remove the bloat, keep everything that matters, protect Agent Teams from context loss.

Get the whole plugin
Stats
413
Stars
38
Forks
Maintained
Maintenance
Python
Language
MIT
License
2mo ago
Last commit
7mo ago
Created

Repo: Ruya-AI/cozempic

Other skills on cozempic.