strategic-compact

Prompt manual context compaction via PreToolUse hooks at configurable thresholds.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/giuseppecutuli/speakdoc --skill strategic-compact-giuseppecutuli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/giuseppecutuli/speakdoc/tree/main/.claude/skills/strategic-compact
Command: npx skills add https://github.com/giuseppecutuli/speakdoc --skill strategic-compact-giuseppecutuli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This solution helps teams and AI agents preserve essential information during long-running, multi-phase tasks by prompting manual context compaction at logical boundaries instead of relying on opaque auto-compaction.

Core Features & Use Cases

  • Manual compaction prompts triggered by task phase boundaries via PreToolUse hooks and a configurable threshold.
  • Context preservation across phases by summarizing and resetting workspace state to keep only relevant information for the next phase.
  • Use Case: In a research-to-implementation workflow, compact after exploration before execution to clear the mental model and prevent context bleed into the next phase.

Quick Start

Run /compact at logical boundaries to refresh context for the next phase.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I preserve context across multi-phase AI workflows?

To preserve context across multi-phase AI workflows, apply manual context compaction at logical task boundaries. This summarizes and resets the workspace state, keeping only relevant information for the next phase and preventing context bleed.

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

Manual context compaction is the process of summarizing workspace state to retain essential information during long-running tasks. Use it during milestone transitions or phase boundaries to prevent context loss before moving to execution.

How do I trigger context compaction prompts automatically?

You can trigger context compaction prompts automatically using hook-based triggers via PreToolUse and a configurable threshold. This emits compact prompts and reminders at logical boundaries to refresh context for the next phase.

Does this approach work for research-to-implementation workflows?

Yes, this approach works for research-to-implementation workflows by prompting compaction after exploration and before execution. This clears the mental model and prevents context bleed, ensuring only relevant information carries forward.

Why use manual compaction instead of auto-compaction for long sessions?

Manual compaction is preferred over opaque auto-compaction because it prompts you to summarize and reset state at logical task boundaries. This ensures essential information is preserved across phases without losing critical context.

Can I configure the threshold for context compaction reminders?

Yes, you can configure the threshold for context compaction reminders. The implementation uses hook-based triggers via PreToolUse to emit compact prompts when the threshold is reached during long-running sessions.