strategic-compact

Automate manual context compaction at strategic task milestones via a PreToolUse hook.

4|1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/rongarede/skill-snapshots --skill strategic-compact-rongarede
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/rongarede/skill-snapshots/tree/main/utilities/strategic-compact
Command: npx skills add https://github.com/rongarede/skill-snapshots --skill strategic-compact-rongarede

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides users to perform deliberate, manual context compaction at logical milestones to preserve essential information across task phases, avoiding the disruption of arbitrary auto-compaction.

Core Features & Use Cases

  • Strategic timing: prompts for compaction after exploration, milestone completion, and before major context shifts.
  • Hook integration: provides a PreToolUse hook example to trigger compaction prompts.
  • Lightweight setup: requires no external dependencies beyond a simple shell script and user configuration.

Quick Start

Configure the PreToolUse hook and threshold, then use the included example as a baseline to prompt manual compaction at defined points.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I automate context compaction at logical milestones during long-running tasks?

Manual context compaction at strategic milestones preserves essential information across task phases, avoiding the disruption of arbitrary auto-compaction. It targets exploration, planning, and execution phases to prevent context drift.

How do I configure a PreToolUse hook to prompt for manual context compaction?

Configure the PreToolUse hook by setting a threshold and using the included shell script as a baseline example. This lightweight setup requires no external dependencies beyond the script and your user configuration.

Why does arbitrary auto-compaction disrupt long-running automation workflows?

Arbitrary auto-compaction disrupts workflows because it triggers without considering task boundaries, potentially losing critical planning context. Strategic compaction at logical milestones avoids this by deliberately preserving essential information before major context shifts.

When should I trigger context compaction in a long-running workflow?

You should trigger context compaction after exploration phases, upon milestone completion, and before major context shifts. These strategic timing points prevent context drift and preserve critical information across task phases.

Do I need external dependencies to set up threshold-driven context compaction?

No external dependencies are needed to set up threshold-driven context compaction. The lightweight setup requires only a simple shell script and user configuration to integrate the PreToolUse hook.