cocohealth

cocohealth is a skill for Claude Code from Snowflake-Labs/cocoplus. It costs 38 tokens per session (1,034 once invoked), scanned A, original, MIT.

A background monitor that tracks how much of the agent's context window is being used and warns when usage reaches defined thresholds.

In plain words
What is it for?
Use it to log context usage and prompt a checkpoint when the session becomes substantially full.
Why use it?
It helps prevent declining reasoning quality caused by running out of available conversation space.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to log context usage and prompt a checkpoint when the session becomes substantially full.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/snowflake-labs/cocoplus/cocohealth
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 Snowflake-Labs/cocoplus --skill cocohealth
Clone the repo
git clone --depth 1 https://github.com/Snowflake-Labs/cocoplus

Made for: Claude Code.

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 cocohealth

README.md
[![agentmods](https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/cocohealth/github.svg)](https://agentmods.dev/skills/snowflake-labs/cocoplus/cocohealth)
Your own site
<a href="https://agentmods.dev/skills/snowflake-labs/cocoplus/cocohealth"><img src="https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/cocohealth/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 cocohealth

Your own site · 80×15
<a href="https://agentmods.dev/skills/snowflake-labs/cocoplus/cocohealth"><img src="https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/cocohealth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,034 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.
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.00038 $0.01034
Opus 5 $0.00019 $0.00517
Sonnet 5 $0.00008 $0.00207
Haiku 4.5 $0.00004 $0.00103

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

Security

Grade A, and why

cocohealth 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 6d 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.

.cortex/skills/cocohealth/cocohealth.skill.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are CocoHealth. You run as a background monitor triggered by the PostToolUse hook after each tool call. You never interact with the developer unless a utilization threshold is crossed. Your job is to prevent silent reasoning quality degradation from context window saturation.

Performance constraint: Context utilization sampling MUST NOT add more than 5ms to PostToolUse execution time. If sampling is unavailable, approximate utilization from accumulated token counts in meter/current-session.json.

Threshold behavior — show each warning once per threshold crossing per session, not on every subsequent tool call.

Context Utilization Sampling

After each tool call:

  1. Sample context utilization from Coco's session API if available
  2. If unavailable: approximate as (input_tokens_used / context_window_size) from meter/current-session.json
  3. Append reading to .cocoplus/hook-log.jsonl: { "event": "cocohealth_sample", "utilization": 0.NN, "timestamp": "..." }

60% Advisory Threshold

When utilization first crosses 60% in a session, prepend to the next response:

⚠️ Context is 60% full. Consider $pod checkpoint to preserve state before continuing.

This is soft guidance — no commands are blocked.

70% Critical Threshold — Recovery Decision Matrix

When utilization first crosses 70% in a session, evaluate the current project state and surface a specific recommended recovery action.

State assessment:

  1. Run git status --porcelain — count modified files and total changed lines
  2. Run git log --oneline -5 — check for any CocoBrew phase commit or stage commit in recent history
  3. Check if .cocoplus/lifecycle/checkpoint.md exists and was written in the current session

Five-row decision matrix:

Uncommitted Changes Recent Commits Checkpoint Exists Recommended Action
None Yes Any Resume from last commit — no work at risk; start new session
Yes (small, <20 lines) Any Yes Commit partial + resume — commit current state, resume from checkpoint in new session
Yes (large, ≥20 lines) Any Yes Checkpoint + new session — run $pod checkpoint immediately, then $clear + $pod resume
Yes No No Emergency commit — commit all modified files with chore(recovery): emergency state preservation, then restart
None No No Clean restart — no work at risk; .cocoplus/ state files are the recovery source

Read the full file on GitHub · 100 lines

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. 6d ago First seen · 100 lines · 38 tokens per session scan A 5a67cedc5832

Subscribe to this mod's changes

cocohealth is a skill published in the GitHub repository Snowflake-Labs/cocoplus (720 stars, last pushed 6d ago), licensed MIT. It adds 38 tokens to every session and 1,034 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-09-03.

Related

Other skills, from other repositories

knowledge_store_skill

Skill for working with local .knowledge.yaml files via KnowledgeStore. Use this when you need to recall, search, or manage directory-local memories and knowledge links stored in plain YAML alongside the user's project files. KnowledgeStore is directory-scoped. Each directory that contains a .knowledge.yaml file…

NPC-Worldwide/npcpy · 346 tokens

remember

Stores decisions, patterns, and outcomes in the MCP memory knowledge graph as entities with typed observations and relations. Supports recording architectural decisions, anti-patterns, tool preferences, workflow outcomes, and project conventions that persist across sessions. Use when saving patterns, remembering…

yonatangross/orchestkit · 62 tokens

llm-wiki

Use when building or maintaining a self-contained personal knowledge base (an LLM wiki) in plain markdown. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki health, auditing article claims against their sources, critiquing a wiki source's reasoning, superseding stale knowledge, 'add to…

sammcj/agentic-coding · 82 tokens

authoring-claude-md

Creating and maintaining CLAUDE.md project memory files and .claude/rules/ rule files that provide non-obvious codebase context. Use when (1) creating a new CLAUDE.md for a project, (2) adding architectural patterns or design decisions to existing CLAUDE.md, (3) capturing project-specific conventions that aren't…

sammcj/agentic-coding · 93 tokens

screenpipe-chats

Search what was said in existing screenpipe, Codex, Claude, Cursor, and Gemini CLI chats, then continue or steer one exact chat when the user explicitly asks. Use for requests about finding another agent conversation, recalling what an agent said, or sending work to one.

screenpipe/screenpipe · 60 tokens

bootstrap-agent-identity

Consistent agent behavior after restart — progressive identity loading, working context reconstruction from persistent artifacts, fresh-vs-continuation detection, calibration through centering and attunement, and identity verification for coherence. Addresses the cold-start problem where an agent must reconstruct who…

pjt222/agent-almanac · 105 tokens