compression-strategy

compression-strategy is a skill for Claude Code from athola/claude-night-market. It costs 30 tokens per session (1,307 once invoked), scanned A, original, MIT.

A guide for shrinking an AI coding session's stored conversation when it becomes too large or uses too much quota.

In plain words
What is it for?
It checks context usage, identifies stale material, recommends when to clear or compress the session, and estimates the possible savings.
Why use it?
It helps remove old or accumulated information that can make work slower and leave less room for new instructions and tool results.

Skill for Claude Code

Written for Claude Code: PreCompact hook event. Also seen: mentions subagents; names the TodoWrite tool.

Part of the conserve plugin — 15 skills, 6 commands, 5 agents shipped together

Good fit It checks context usage, identifies stale material, recommends when to clear or compress the session, and estimates the possible savings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/athola/claude-night-market/compression-strategy
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 athola/claude-night-market --skill compression-strategy
Clone the repo
git clone --depth 1 https://github.com/athola/claude-night-market

Made for: Claude Code.

Or install conserve, the plugin that ships this one along with the rest of its 15 skills, 6 commands, 5 agents.

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 compression-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/athola/claude-night-market/compression-strategy/github.svg)](https://agentmods.dev/skills/athola/claude-night-market/compression-strategy)
Your own site
<a href="https://agentmods.dev/skills/athola/claude-night-market/compression-strategy"><img src="https://agentmods.dev/badge/skills/athola/claude-night-market/compression-strategy/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 compression-strategy

Your own site · 80×15
<a href="https://agentmods.dev/skills/athola/claude-night-market/compression-strategy"><img src="https://agentmods.dev/badge/skills/athola/claude-night-market/compression-strategy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,307 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.00030 $0.01307
Opus 5 $0.00015 $0.00654
Sonnet 5 $0.00006 $0.00261
Haiku 4.5 $0.00003 $0.00131

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

Security

Grade A, and why

compression-strategy 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 7d 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.

plugins/conserve/skills/compression-strategy/SKILL.md · 181 lines

How it starts

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

Compression Strategy

Analyze current context usage and recommend optimal compression strategies.

When To Use

  • Context feels bloated or sluggish
  • Before major task phase transitions (plan complete, starting implementation)
  • Token quota burning faster than expected
  • After large tool output accumulations

When NOT To Use

  • Context-optimization skill already handling the scenario
  • Simple queries with minimal context
  • Freshly cleared context

Required TodoWrite Items

  1. compression-strategy:analyze-context
  2. compression-strategy:recommend-strategy
  3. compression-strategy:estimate-savings

Step 1 – Analyze Context (analyze-context)

Run /context to check current usage. Then estimate:

  1. Tool output accumulation: How much context is from tool results vs. conversation?
  2. Stale content age: How many turns since critical decisions were made?
  3. Active files: Which files are still relevant vs. historical?

Step 2 – Recommend Strategy (recommend-strategy)

Based on analysis, recommend one of:

Option A: /clear and /catchup

Best when:

  • Task phase complete (planning done, implementation starting)
  • Context > 60% full
  • Most content is stale

Process:

  1. Save critical state to .claude/session-state.md
  2. Run /clear
  3. Run /catchup to reload active files

Option B: Spawn Continuation Agent

Best when:

  • Context > 80% full
  • Work in progress, can't stop
  • Delegatable tasks remain

Process:

  1. Run Skill(conserve:clear-context) to spawn continuation agent
  2. Agent receives fresh context with saved state

Option C: Archive and Summarize

Best when:

  • Context 40-60% full
  • Some stale content mixed with active
  • Not ready for full clear

Process:

  1. Archive old decisions/errors to .claude/context-archive/
  2. Summarize completed work in memory
  3. Continue with leaner context

Option D: Delegate to Subagent

Best when:

  • Parallel work possible
  • Independent subtasks exist
  • Context pressure moderate

Process:

  1. Identify delegatable tasks
  2. Spawn specialized agents via Task tool
  3. Main context stays lean

Read the full file on GitHub · 181 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. 7d ago First seen · 181 lines · 30 tokens per session scan A accc28b78240

Subscribe to this mod's changes

compression-strategy is a skill published in the GitHub repository athola/claude-night-market (337 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 1,307 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

setup

Initialize any folder as a Bedrock-powered Obsidian vault. Creates entity directories, copies templates, configures language and domain taxonomy, scaffolds connected example entities, and checks dependencies. Use when: "bedrock setup", "bedrock-setup", "/bedrock:setup", "initialize vault", "setup vault", "create…

ccplugins/awesome-claude-code-plugins · 90 tokens

sync

Re-synchronizes the vault with external sources. In default mode, scans the sources field of all entities, deduplicates URLs, fetches updated content from each source (Confluence, GDocs, GitHub, Markdown), performs incremental diff and delegates writing to /bedrock:preserve. With --people, scans actor repositories via…

ccplugins/awesome-claude-code-plugins · 138 tokens

preserve

Single write point for the vault. Centralizes entity detection, textual matching, entity creation/update, and bidirectional linking. Accepts structured input (list of entities), free-form input (text, meeting notes, session context), or graphify output (graph.json + obsidian markdown from /graphify pipeline). Use…

ccplugins/awesome-claude-code-plugins · 118 tokens

ask

Adaptive vault reader skill. Receives a natural language question, searches the vault first (Glob/Grep, entity reads, wikilink traversal), then self-assesses whether more context is needed. Escalates to /graphify for graph-level understanding or to /bedrock:teach for remote content ingestion only when the vault alone…

ccplugins/awesome-claude-code-plugins · 141 tokens

compress

Vault alignment engine. Detects and fixes 5 types of structural misalignments: broken backlinks, concept fragmentation, entity miscategorization, duplicated entities, and misnamed entities. Delegates all writes to /bedrock:preserve. Supports interactive mode (user confirmation) and cron mode (autonomous mechanical…

ccplugins/awesome-claude-code-plugins · 104 tokens

gdoc-to-markdown

Internal fetcher module for Google Docs and Sheets. Fetches content via MCP (preferred, when available), Google API with bearer token or public URL export (fallback), or browser DOM extraction via Claude in Chrome (last resort) and returns Markdown. Used by /bedrock:teach and /bedrock:sync — not intended for direct…

ccplugins/awesome-claude-code-plugins · 76 tokens