strategic-compact

Prompt strategic compaction at logical boundaries to reduce context bloat.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/cescrafli/compyrasion --skill strategic-compact-cescrafli
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/cescrafli/compyrasion/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/cescrafli/compyrasion --skill strategic-compact-cescrafli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long-running sessions and multi-phase tasks can suffer from context bloating, making it hard to maintain coherence across phases.

Core Features & Use Cases

  • Strategic manual compaction at logical boundaries (after exploration and before execution, after milestones, and before major context shifts) to preserve essential context.
  • Lightweight, hook-driven integration that nudges you to start the next phase with a clean context.
  • Suitable for long sessions, phase transitions, and multi-task work to reduce cognitive load and improve performance.

Quick Start

Configure the PreToolUse hook to run the suggest-compact.sh script and adjust COMPACT_THRESHOLD to your workflow.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
What is strategic context compaction for long sessions?▼

Strategic context compaction is an approach that prompts context reduction at logical boundaries during multi-phase tasks. It monitors tool-calls with a session counter and threshold to preserve essential context and reduce context bloat.

How do I automate context management during phase transitions?▼

You automate context management by configuring the PreToolUse hook to run the suggest-compact.sh script. This lightweight integration nudges you to start the next phase with a clean context after reaching a milestone.

When should I trigger context compaction in multi-phase work?▼

You should trigger context compaction after exploration and before execution, after milestones, or before major context shifts. This preserves essential task context and reduces cognitive load across long-running sessions.

Can I adjust the threshold for tool-calls to fit my workflow?▼

Yes, you can adjust the COMPACT_THRESHOLD variable to fit your workflow. This allows you to control when the hook script triggers compaction guidance based on the number of tool-calls in your session.

Why does my long-running session suffer from context bloating?▼

Long-running sessions suffer from context bloating because accumulated tool-calls and multi-phase work make it hard to maintain coherence. Strategic compaction at logical boundaries reduces this bloat and improves performance.

Does this approach require any external dependencies?▼

No, this strategic compaction approach requires no external dependencies. It uses a lightweight, hook-driven integration with a shell script to monitor tool-calls and provide compaction guidance.