context-compression

context-compression is a skill for Claude Code from DDS-Solutions/AI-TadPole-OS. It costs 38 tokens per session (1,068 once invoked), scanned A, original, MIT.

A session-management skill that keeps long coding-agent conversations organized by summarizing finished work and preserving important decisions.

In plain words
What is it for?
It helps maintain checkpoints during long sessions, summarize large command results, and prepare handoffs between sessions.
Why use it?
Long conversations can become harder for an agent to follow as old details pile up. It reduces information drift by keeping the most relevant context available.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It helps maintain checkpoints during long sessions, summarize large command results, and prepare handoffs between sessions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dds-solutions/ai-tadpole-os/context-compression
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 DDS-Solutions/AI-TadPole-OS --skill context-compression
Clone the repo
git clone --depth 1 https://github.com/DDS-Solutions/AI-TadPole-OS

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/context-compression/github.svg)](https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/context-compression)
Your own site
<a href="https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/context-compression"><img src="https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/context-compression/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 context-compression

Your own site · 80×15
<a href="https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/context-compression"><img src="https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/context-compression.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,068 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.01068
Opus 5.5 $0.00015 $0.00427
Sonnet 5.5 $0.00008 $0.00214
Haiku 4.5 $0.00004 $0.00107

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

Security

Grade A, and why

context-compression 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/context_compactor.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.

.agent/skills/context-compression/SKILL.md · 92 lines

How it starts

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

[!IMPORTANT] AI Context & Knowledge Heritage

  • Subsystem: Agent Skills Registry / context-compression
  • Architecture: @docs ARCHITECTURE:Documentation
  • Failure Path: Context degradation, attention dilution, or loss of critical architectural decisions.
  • Observability: Traceability via execution/parity_guard.py ([SKILL])

Context Compression & Session Management

Purpose: Prevent context degradation, attention dilution, and hallucination drift in long-running multi-turn sessions (20+ turns) by distilling working memory into high-signal checkpoints. Workflow Bindings: Integrated into /orchestrate and /onboard.


📚 Progressive Disclosure & L3 Reference Index

Consult deep L3 Reference Guides and verification tools on demand:


🚦 1. Compression Triggers & The 3-Tier Model

Level Scope Trigger Condition Execution Action & Output Target
Level 1: Micro-Compact Large Tool Dumps Grep, search, or file reads $> 100$ lines Summarize key files, matched line numbers, and counts. Discard raw dump.
Level 2: Phase Transition Lifecycle State Shift Moving from Brainstorming $\rightarrow$ Coding Record confirmed architectural choices; purge transient read logs.
Level 3: Session Checkpoint Full Working Memory 20+ turns or user requests summary Emit full 5-section Session Checkpoint to .tmp/handoffs/session_checkpoint.md.

🧭 2. Preservation vs Discard Directives

Preserve at All Costs:
├── Core Architectural Decisions & Rationale (the "Why")
├── Exact File Paths & Symbols Touched
├── Executable Verification Commands & Test Results
└── Active Blockers and Next Milestones

Discard Aggressively:
├── Full file contents already committed to disk
├── Repetitive tool invocation syntax and error retries
├── Raw directory trees and verbose package manifests
└── Ephemeral conversational filler and intermediate banter

Read the full file on GitHub · 92 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. 9d ago Changed · +46 lines 924816fd2562
  2. 1mo ago First seen · 46 lines · 38 tokens per session scan A 9fc9d71895bd

Subscribe to this mod's changes

context-compression is a skill published in the GitHub repository DDS-Solutions/AI-TadPole-OS (8 stars, last pushed 5d ago), licensed MIT. It adds 38 tokens to every session and 1,068 once invoked, about $0.0002 per session on Opus 5.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

build-with-tinybase

Scaffold, extend, and verify reactive local-first JavaScript or TypeScript applications with TinyBase. Use when choosing TinyBase for in-memory tabular or key-value state, generating an app with create-tinybase, adding schemas or UI bindings, resolving TinyBase import paths, configuring browser or database…

tinyplex/tinybase · 90 tokens

optimizing-clickhouse-and-hogql-queries

Workflow for optimizing ClickHouse and HogQL queries. Use when a HogQL query, query runner, insight, or report is too slow; when a hand-written ClickHouse query (via syncexecute or in a migration) is too slow; when ClickHouse times out or hits memory limits; when investigating a slow system.querylog row; or when…

PostHog/posthog · 177 tokens

generating-clickhouse-query-performance-reports

Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU). Use when asked for a slow query report, query performance analysis over the last N days, per-team query cost, OOM or timeout investigation, cluster cost/memory regressions, or materialization candidates. Covers the…

PostHog/posthog · 142 tokens

query-clickhouse-via-metabase

Run ClickHouse system.querylog analysis via the internal Metabase API. Use when investigating slow queries, materialization candidates, per-team query performance, ClickHouse cost or memory issues, or any system.querylog question. Covers prod-us and prod-eu, SSO-gated cookie auth via hogli, and ready-to-run query…

PostHog/posthog · 79 tokens

context-layer-dreaming

Synthesizes recent organizational activity into a durable context wiki. Use when running a nightly or incremental context-layer dream, or when updating sourced organizational context from completed work.

PostHog/posthog · 39 tokens

context-layer-consolidation

Keep the context wiki coherent using the deterministic lint report queue.

PostHog/posthog · 17 tokens