agentops-compress

agentops-compress is a skill for Claude Code from jtprogru/bear-skills. It costs 154 tokens per session (1,438 once invoked), scanned A, original, MIT.

A guide for shortening agent memory files such as CLAUDE.md or AGENTS.md while preserving commands, paths, names, and other required details.

In plain words
What is it for?
Use it to measure a memory file, create a backup, compress it safely, and verify that important anchors survived.
Why use it?
It reduces repeated reading of long startup instructions without losing information that affects agent behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

Part of the bear-skills plugin — 42 skills, 3 commands, 11 agents, 1 hook shipped together

Good fit Use it to measure a memory file, create a backup, compress it safely, and verify that important anchors survived.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jtprogru/bear-skills/agentops-compress
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 jtprogru/bear-skills --skill agentops-compress
Clone the repo
git clone --depth 1 https://github.com/jtprogru/bear-skills

Made for: Claude Code.

Or install bear-skills, the plugin that ships this one along with the rest of its 42 skills, 3 commands, 11 agents, 1 hook.

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 agentops-compress

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jtprogru/bear-skills/agentops-compress"><img src="https://agentmods.dev/badge/skills/jtprogru/bear-skills/agentops-compress.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,438 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.00154 $0.01438
Opus 5 $0.00077 $0.00719
Sonnet 5 $0.00031 $0.00288
Haiku 4.5 $0.00015 $0.00144

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

Security

Grade A, and why

agentops-compress 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/memtool.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

domains/agentops/skills/agentops-compress/SKILL.md · 91 lines

How it starts

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

agentops-compress — Сжатие memory-файлов

Memory-файлы отличаются от остальных текстов одним: их читают в начале каждой сессии. Лишний абзац в статье стоит токенов один раз. Лишний абзац в CLAUDE.md стоит токенов столько раз, сколько у тебя было сессий за месяц.

Отсюда цель скилла: убрать из файла то, что не влияет на поведение агента, и не тронуть ничего, что влияет.

Границы применимости

Работает с: CLAUDE.md, AGENTS.md, GEMINI.md, файлами в rules/, списками предпочтений, накопившимися TODO, длинными SKILL.md.

Не работает с: кодом, статьями, постами, документацией для людей. Там другая цель — там текст читает человек, и ритм важнее плотности. Для текстов есть content-humanizer.

Шаг 1. Померь до

python3 scripts/memtool.py detect <файл>

Скрипт вернёт тип файла, оценку токенов и число якорей — фрагментов, которые обязаны пережить сжатие дословно.

Если оценка меньше ~400 токенов, скажи об этом и остановись. Сжимать короткий файл — переставлять слова ради процентов, риск выше выигрыша.

Шаг 2. Сними бэкап

python3 scripts/memtool.py backup <файл>

Копия уезжает в $XDG_DATA_HOME/bear-skills/compress-backups/, а не в соседний каталог. Это принципиально: бэкап рядом с оригиналом подхватит автозагрузчик правил, и «сжатый» файл будет стоить вдвое дороже исходного.

Шаг 3. Сожми

Что убирать, по убыванию отдачи:

Преамбулы и мета-текст. «В этом документе описаны правила работы с…» — агент уже читает документ, ему не нужно сообщать, что это документ.

Дубли между разделами. В разросшихся memory-файлах одно и то же правило часто записано трижды в разных формулировках. Оставь одну, самую конкретную.

Обоснования очевидного. «Не коммить секреты, потому что они попадут в историю и их увидят все, у кого есть доступ к репозиторию» → «Не коммить секреты». Причина нужна там, где без неё правило выглядит произвольным, и не нужна там, где оно самоочевидно.

Примеры сверх необходимого. Три примера на правило оставляют один — самый неочевидный. Примеры на правила без исключений убираются целиком.

Read the full file on GitHub · 91 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 91 lines · 154 tokens per session scan A b419f1eac1a4

Subscribe to this mod's changes

agentops-compress is a skill published in the GitHub repository jtprogru/bear-skills (1 stars, last pushed 21d ago), licensed MIT. It adds 154 tokens to every session and 1,438 once invoked, about $0.0008 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-31.

Related

Other skills, from other repositories

memory-log

A read-only timeline of changes to an agent's stored memories, including additions, corrections, downgrades, migrations, and rollbacks. It rebuilds the timeline from event records and current memory metadata.

ryanzhao1011/workframe · 52 tokens

obsidian-doc-structure

A read-only tool for inspecting the structure and properties of Obsidian notes. Obsidian is a note-taking app that stores linked Markdown files, and properties are fields such as status or date.

ryanzhao1011/workframe · 57 tokens

obsidian-safe-write

A process for clarifying and prioritising software requirements before detailed planning. It identifies the request type, asks six core questions, and can rank work by reach, impact, confidence, effort, and other priority methods.

ryanzhao1011/workframe · 57 tokens

session-digest

A session-summary tool that records what changed during a coding session in a Markdown file for the next session to read.

ryanzhao1011/workframe · 31 tokens

librarian

A memory-maintenance role that reviews temporary notes and promotes well-supported facts into longer-term memory files. It also keeps shared knowledge concise and records what changed.

ryanzhao1011/workframe · 55 tokens

agent-memory

Set up repo-level agent memory: create an agent-memory.md learnings log at the repository root and wire up CLAUDE.md so agents read it when stuck and append durable learnings as they work. Use this whenever the user wants to add, set up, bootstrap, install, enable, or repair "agent memory," a "learnings file," a…

brianschroeder/simple-agent-memory · 126 tokens