strategic-compact

Trigger manual context compaction prompts via PreToolUse hooks and suggest-compact.sh.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/MBarry01/dousell-immo --skill strategic-compact-mbarry01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/MBarry01/dousell-immo/tree/main/.claude/skills/strategic-compact
Command: npx skills add https://github.com/MBarry01/dousell-immo --skill strategic-compact-mbarry01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manual context management is essential to preserve continuity across task phases. This skill prompts strategic, on-demand context compaction to prevent loss of important information due to arbitrary auto-compaction.

Core Features & Use Cases

  • Strategic timing: Suggests compact after exploration, before execution to preserve the planning context.
  • Milestone resets: Suggests compact after milestones to refresh context for the next phase.
  • Hook-driven prompts: Integrates with PreToolUse hooks to trigger compact prompts via a script.

Quick Start

Enable the PreToolUse hooks and run the suggest-compact.sh script to start monitoring tool usage and prompting for a manual compact when thresholds are met.

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 manual context compaction?

Manual context compaction prevents context loss by prompting strategic compaction at specific task transitions, preserving continuity before automatic compaction can discard important planning data.

When should I trigger context compaction in a workflow?

Context compaction should be triggered during exploration-to-implementation transitions, after milestone completions, and before major context shifts to ensure task continuity is preserved.

How do PreToolUse hooks trigger compact prompts?

PreToolUse hooks integrate with a suggest-compact.sh script to monitor tool usage and trigger manual compact prompts when specific usage thresholds are met.

Can I use scripting to automate context compaction prompts?

Yes, you can automate context compaction prompts by enabling PreToolUse hooks and running the suggest-compact.sh script to monitor tool usage and prompt for manual compaction.

Does manual context compaction work better than automatic compaction?

Manual context compaction offers strategic timing advantages over automatic compaction by allowing you to preserve task continuity at exact milestones and transitions, preventing arbitrary data loss.

What are the limitations of hook-driven compaction scripts?

Hook-driven compaction scripts rely on predefined tool usage thresholds, meaning compaction prompts only trigger when those specific criteria are met during your active workflow.