diagnose

diagnose is a skill for Claude Code from Ruya-AI/cozempic. It costs 45 tokens per session (270 once invoked), scanned A, original, MIT.

A command that measures how much space a Claude Code session uses and shows what is making the session large.

In plain words
What is it for?
Use it to view token counts, context usage, message breakdowns, large messages, and estimated savings from cleanup options.
Why use it?
It helps identify context-window usage and the messages or session data contributing most to bloat.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the cozempic plugin — 5 skills shipped together

Good fit Use it to view token counts, context usage, message breakdowns, large messages, and estimated savings from cleanup options.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ruya-ai/cozempic/diagnose
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Ruya-AI/cozempic --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/Ruya-AI/cozempic

Made for: Claude Code.

Or install cozempic, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/ruya-ai/cozempic/diagnose/github.svg)](https://agentmods.dev/skills/ruya-ai/cozempic/diagnose)
Your own site
<a href="https://agentmods.dev/skills/ruya-ai/cozempic/diagnose"><img src="https://agentmods.dev/badge/skills/ruya-ai/cozempic/diagnose/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/ruya-ai/cozempic/diagnose"><img src="https://agentmods.dev/badge/skills/ruya-ai/cozempic/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 270 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.00270
Opus 5 $0.00023 $0.00135
Sonnet 5 $0.00009 $0.00054
Haiku 4.5 $0.00005 $0.00027

Measured 10d ago against content hash eb8c1449e448, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

diagnose scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/diagnose/SKILL.md · 26 lines

What it actually says

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
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 26 lines · 45 tokens per session scan A eb8c1449e448

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository Ruya-AI/cozempic (411 stars, last pushed 2mo ago), licensed MIT. It adds 45 tokens to every session and 270 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

test-driven-development

This skill should be used when implementing new features, fixing bugs, or writing new code. Enforces RED-GREEN-REFACTOR.

dean0x/devflow · 32 tokens

testing

This skill should be used when the user asks to "write tests", "fix failing tests", "improve test coverage", "add integration tests", "debug a flaky test", or reviews test quality. Provides behavior-focused testing patterns, coverage analysis, and detection of brittle test anti-patterns like implementation coupling…

dean0x/devflow · 70 tokens

code-review

Perform comprehensive code reviews covering bugs, style, performance, security, and best practices. Use this skill when the user mentions: review my code, check this code, code review, find bugs, improve code, refactor suggestions, security audit, performance optimization, code quality, static analysis.

KarmaloopAI/Jiva · 61 tokens

radin-doctor

Check that radin's own install under /.claude is complete and its optional companion tools are reachable. Use for /radin-doctor, "check my radin install", "is radin installed correctly", "radin doctor", "verify radin install".

shortcuts/radin · 62 tokens

troubleshooting

A troubleshooting guide for Kubernetes, a system for running containerized applications across computers. It lists commands for checking clusters, nodes, components, pods, events, resources, and storage.

chaterm/terminal-skills · 11 tokens

log-analysis

A guide to reading and searching system and application logs. Logs are text records that describe what software and servers are doing.

chaterm/terminal-skills · 7 tokens