strategic-compact

Suggest context compaction at logical boundaries using a PreToolUse hook.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/Eotel/claude-marketplace --skill strategic-compact-eotel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/Eotel/claude-marketplace/tree/main/plugins/base/skills/strategic-compact
Command: npx skills add https://github.com/Eotel/claude-marketplace --skill strategic-compact-eotel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manual context management during long Claude workflows is error-prone and leads to context drift. This Skill suggests performing context compaction at strategic boundaries to preserve important information for subsequent phases.

Core Features & Use Cases

  • Tracks tool usage to identify when context should be compacted.
  • Threshold-based reminders trigger after a configurable number of tool calls.
  • PreToolUse hook integration guides users to perform compaction before major mindset shifts.

Quick Start

Configure the PreToolUse hook to run the suggest-compact.sh script and set COMPACT_THRESHOLD to your preferred value.

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 drift during long Claude workflows?

Prevent context drift during long Claude workflows by using strategic manual compaction at logical boundaries. A PreToolUse hook tracks tool-call counts and triggers threshold-based reminders to preserve important information across task phases.

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

Manual context compaction is the process of preserving context before major mindset shifts in exploration, planning, and execution tasks. Use it when context drift can occur across extended task phases to maintain workflow accuracy.

How do I configure a PreToolUse hook to trigger context compaction reminders?

Configure the PreToolUse hook to run the suggest-compact.sh script and set the COMPACT_THRESHOLD variable to your preferred number of tool calls. This tracks usage and prompts periodic compaction at logical boundaries.

Can I adjust the threshold for context compaction reminders in my workflow?

Yes, you can adjust the context compaction reminder threshold by setting the COMPACT_THRESHOLD variable to your preferred value. This configurable threshold determines the tool-call count required before triggering a compaction reminder.

Does context compaction work with automation workflows that have multiple execution phases?

Context compaction works with automation workflows by suggesting manual preservation at logical boundaries between execution phases. The PreToolUse hook tracks tool calls across exploration, planning, and execution tasks to trigger reminders before mindset shifts.