context-threshold-advisor

Generate layered compression threshold tables for context window occupancy tiers.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Lsogod/compaction-debugger --skill context-threshold-advisor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-threshold-advisor
Source: https://github.com/Lsogod/compaction-debugger/tree/main/skills/context-threshold-advisor
Command: npx skills add https://github.com/Lsogod/compaction-debugger --skill context-threshold-advisor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill designs and evaluates layered compression strategies based on context window occupancy to minimize token usage while preserving recent context.

Core Features & Use Cases

  • Threshold table generation for various window sizes (e.g., 32k, 128k, 200k) and target budgets.
  • Mapping each occupancy tier to specific compression actions (none, light, heavy, emergency).
  • Optional token-savings estimation given a session's current token usage and remaining budget.

Quick Start

Provide the current context window size in tokens and the target token budget, and I will generate a 50% / 85% / 95% layered compression plan.

Frequently Asked Questions about context-threshold-advisor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set context compression thresholds to minimize token usage?

Context compression thresholds minimize token usage by mapping occupancy tiers like 50%, 85%, and 95% to specific compression actions. This retains recent context while systematically reducing token load across various window sizes.

What is a layered context compression strategy for large context windows?

A layered context compression strategy applies varying levels of token reduction—none, light, heavy, or emergency—based on real-time context window occupancy. It dynamically preserves recent context while optimizing token budgets across 32k, 128k, or 200k windows.

How do I generate a token compression plan for a 200k context window?

To generate a token compression plan for a 200k context window, provide the window size and target token budget. The system then outputs a threshold table mapping 50%, 85%, and 95% occupancy to specific compression actions.

When should I use emergency context compression during a session?

Emergency context compression should be used when context window occupancy reaches critical tiers like 95%. It activates during real-time sessions to enforce strict token reduction and prevent budget exhaustion while retaining the most recent context.

Can I estimate token savings based on current context window usage?

You can estimate token savings by inputting a session's current token usage and remaining budget. The system calculates expected savings based on the applied layered compression threshold, documenting practical constraints for the session.

Does this threshold strategy work across different context window sizes?

This threshold strategy works across different context window sizes including 32k, 128k, and 200k. It evaluates target token budgets against these varying window sizes to determine the appropriate compression action in real-time.