Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Context cleaning for Claude Code — prune bloated sessions, protect Agent Teams from context loss, auto-guard with tiered pruning
| Date | Stars |
|---|---|
| 2026-07-31 | 362 |
| 2026-08-03 | 364 |
| 2026-08-12 | 369 |
| 2026-08-18 | 371 |
| 2026-08-19 | 372 |
| 2026-08-20 | 373 |
| 2026-08-23 | 375 |
| 2026-08-26 | 377 |
| 2026-08-27 | 377 |
| 2026-08-28 | 377 |
| 2026-09-01 | 378 |
| 2026-09-02 | 379 |
| 2026-09-03 | 378 |
| 2026-09-04 | 379 |
| 2026-09-08 | 404 |
| 2026-09-09 | 409 |
| 2026-09-10 | 412 |
| 2026-09-11 | 413 |
| 2026-09-13 | 412 |
| 2026-09-17 | 413 |
| 2026-09-19 | 417 |
| 2026-09-20 | 417 |
Today
— stars today
This week
+5 stars this week
This month
+44 stars this month
Momentum
5.0
growth rate 1.21%/day
# Cozempic
  
**100,000+ power users** trust Cozempic to keep their Claude Code sessions lean.
Context cleaning for [Claude Code](https://claude.ai/code) — **remove the bloat, keep everything that matters, protect Agent Teams from context loss**.
## What It Does
Claude Code sessions fill up with dead weight: progress ticks, thinking blocks, stale file reads, duplicate CLAUDE.md injections, base64 screenshots, oversized tool outputs, and metadata bloat. A typical session carries 8-46MB — most of it noise that inflates every API call.
Cozempic removes it with **18 composable strategies** across 3 prescription tiers, while your actual conversation, decisions, and working context stay untouched. The guard daemon runs automatically — install once, forget about it.
### Key Features
- **18 pruning strategies** — gentle (5), standard (11), aggressive (18)
- **Guard daemon** — auto-starts via SessionStart hook, monitors and prunes continuously
- **Interactive "prune now?" nudge** — a non-blocking heads-up at 25% / 55% / 80% context (once per tier) recommending `cozempic reload`, so interactive users get cozempic's higher-fidelity prune+resume on their own terms instead of falling back to lossy autocompact. Takes no action on its own; silence with `COZEMPIC_NUDGE_OFF=1`
- **Interactive-safe reload** — in interactive sessions the guard warns first and reloads only at an idle breakpoint (never mid-turn); headless sessions reload as before
- **Safe-point protection** — the guard never terminates-and-resumes through in-flight work: a running Workflow, a background subagent, an agent team, or an open tool call defers the reload so nothing is lost
- **compact-summary-collapse** — 85-95% savings by removing pre-compaction messages already in the summary
- **Agent Teams protection** — checkpoints team state through compaction, reactive overflow recovery
- **Behavioral digest** — extracts your corrections ("don't do X"), persists them to Claude Code's memory system so they survive compaction
- **15 doctor checks** — diagnose and auto-fix session corruption, orphaned tool results, zombie teams, unresumable sessions
- **Token-aware diagnostics** — exact token counts from `usage` fields, cache hit rate, context % bar
- **Auto-detects 1M context** — correct thresholds for both 200K and 1M models
- **Efficient idle polling** — backs off the poll cadence when the session is quiet and skips redundant no-op checkpoints
- **Auto-updates** — checks PyPI daily, upgrades in-place
**Zero external dependencies.** Python 3.10+ stdlib only.
## Install
Pick your package manager. `uvx`/`pipx`/`npm`/`pip` are the lowest-friction (no Homebrew trust prompt — see the note below):
```bash
# uv — persistent install, always on PATH (recommended)
uv tool install cozempic
# uvx — run once without installing (handy to try it, but the guard daemon
# can't auto-start from an ephemeral env — use `uv tool install` for that)
uvx cozempic --help
# pipx — isolated user install, always on PATH
pipx install cozempic
# npm — global install
npm install -g cozempic
# pip (Python ≥ 3.10)
pip install cozempic
# Homebrew (macOS / Linux) — use the fully-qualified name (see note below)
brew install Ruya-AI/cozempic/cozempic
# Nix flake
nix profile install github:Ruya-AI/cozempic?dir=packaging/nix
```
> **Homebrew tap trust:** recent Homebrew versions gate non-official taps behind an explicit trust step. The **fully-qualified** `brew install Ruya-AI/cozempic/cozempic` above trusts just this formula inline — no extra command. A bare `brew install cozempic` / `brew upgrade cozempic` will instead error with *"Refusing to load formula … from untrusted tap"*; if you hit that, run `brew trust Ruya-AI/cozempic` once (or just prefer one of the install methods above, none of which have thisExcerpt of 22,161 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:b3fa1239c9f56d20, topic:pruning, desc:pruning