strategic-compact

Community

Preserve context with strategic compaction.

Authorflag3
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Auto-compaction can cause loss of important context by triggering at arbitrary points during a task. This Skill prompts strategic, manual compaction to preserve exploration context through task phases.

Core Features & Use Cases

  • Strategic prompts at logical boundaries to compact research data before execution.
  • Hook-driven integration via PreToolUse to remind and guide when to compact.
  • Configurable thresholds (COMPACT_THRESHOLD) to tailor prompts to session length and complexity.
  • Use Case: In a multi-phase AI-assisted project, compact after planning to start execution with a clean context and after milestones to reset context for the next phase.

Quick Start

Activate the strategic-compact skill by ensuring the SKILL.md and suggest-compact.sh script are present in the skill's root. Set COMPACT_THRESHOLD in your environment (default 50). The tool will count invocations and emit prompts at the threshold and then every 25 calls thereafter.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: strategic-compact
Download link: https://github.com/flag3/dotfiles/archive/main.zip#strategic-compact

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.