strategic-compact

Prompt /compact reminders at logical workflow boundaries via PreToolUse hooks.

17|1|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/jakezp/everything-opencode --skill strategic-compact-jakezp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/jakezp/everything-opencode/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/jakezp/everything-opencode --skill strategic-compact-jakezp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manages and prompts deliberate context reduction at logical points to preserve essential information across task phases, avoiding arbitrary auto-compaction that can erase or blur important details.

Core Features & Use Cases

  • PreToolUse hooks monitor tool activity and issue prompts to compact at boundary moments.
  • Configurable thresholds determine when reminders trigger and how often checkpoints appear during long sessions.
  • Useful during exploration-to-implementation transitions, milestone completions, and before major context shifts to maintain a clean working state.

Quick Start

Start monitoring tool usage and prompt me to perform /compact at defined logical boundaries.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I prevent context loss during long automation workflows?

You prevent context loss during long automation workflows by prompting strategic context compaction at logical boundaries. A PreToolUse hook monitors tool invocations and issues periodic reminders to perform manual compaction, preserving essential task details across phase transitions.

What is strategic context compaction and when should I use it?

Strategic context compaction is the deliberate reduction of context at logical workflow boundaries like milestone completions or exploration-to-implementation transitions. Use it to avoid arbitrary auto-compaction that can erase or blur important task details during complex sessions.

How do I configure context management reminders for complex tasks?

Context management reminders are configured using customizable thresholds within a PreToolUse hook. The hook counts tool invocations during complex tasks and triggers periodic checkpoint reminders to perform /compact once the defined threshold is reached.

Does automatic context compaction work with existing automation scripts?

Automatic context compaction prompts integrate with existing automation scripts via a PreToolUse hook that monitors tool activity. The hook enforces a configurable invocation threshold and issues reminders at logical workflow boundaries without disrupting active processes.

Why does arbitrary auto-compaction blur important task details?

Arbitrary auto-compaction blurs important task details because it triggers context reduction at fixed limits rather than logical workflow boundaries. Strategic compaction solves this by prompting reduction only during milestone completions and pre-context shifts.

What are the limitations of using PreToolUse hooks for context management?

Limitations of using PreToolUse hooks for context management include relying on a configurable tool invocation threshold rather than semantic understanding. The hook issues periodic reminders to compact but requires manual execution of the /compact command to preserve task context.