strategic-compact

strategic compact

affaan-m 232k ↓ 6.2k MIT updated 25d ago
Claude Code
View source ↗

What it does

  • Running long sessions that approach context limits (200K+ tokens)
  • Working on multi-phase tasks (research → plan → implement → test)
  • Switching between unrelated tasks within the same session
  • After completing a major milestone and starting new work
  • When responses slow down or become less coherent (context pressure)
  • Often mid-task, losing important context
  • No awareness of logical task boundaries

Requirements & configuration

  • Token Optimization Patterns
  • token-optimizer MCP — Automated 95%+ token reduction via content deduplication
  • The Longform Guide — Token optimization section

Configuration: COMPACT_THRESHOLDCOMPACT_CONTEXT_THRESHOLDCOMPACT_CONTEXT_INTERVALCOMPACT_STATE_TTL_DAYSECC_CONTEXT_WINDOW_TOKENSCLAUDE_CODE_AUTO_COMPACT_WINDOW

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

strategic compact

Source

Repository: https://github.com/affaan-m/everything-claude-code

strategic-compact FAQ

What does the strategic-compact skill do?

Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction. Running long sessions that approach context limits (200K+ tokens) Working on multi-phase tasks (research → plan → implement → test)

What does strategic-compact require?

Token Optimization Patterns token-optimizer MCP — Automated 95%+ token reduction via content deduplication The Longform Guide — Token optimization section Configuration keys: COMPACT_THRESHOLD, COMPACT_CONTEXT_THRESHOLD, COMPACT_CONTEXT_INTERVAL, COMPACT_STATE_TTL_DAYS, ECC_CONTEXT_WINDOW_TOKENS, CLAUDE_CODE_AUTO_COMPACT_WINDOW.

How do I install strategic-compact?

Run: npx -y skills add https://github.com/affaan-m/everything-claude-code --skill strategic-compact --agent claude-code — the source lives at github.com/affaan-m/everything-claude-code.

Maintain strategic-compact?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

strategic-compact on getagentictools
[![strategic-compact on getagentictools](https://getagentictools.com/badge/skills/affaan-m-everything-claude-code-strategic-compact.svg)](https://getagentictools.com/skills/affaan-m-everything-claude-code-strategic-compact?ref=badge)
npx agentictools info skills/affaan-m-everything-claude-code-strategic-compact

The second line is the CLI lookup for this page — handy in READMEs and docs.