strategic-compact

Prompt manual context compaction at logical milestones via PreToolUse hooks.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/riftzen-bit/gemini-setup --skill strategic-compact-riftzen-bit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/riftzen-bit/gemini-setup/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/riftzen-bit/gemini-setup --skill strategic-compact-riftzen-bit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prompts users to perform manual context compaction at logical milestones to prevent loss of critical information during long tasks.

Core Features & Use Cases

  • Encourages compaction after exploration to preserve the core plan or after milestones to reset context.
  • Integrates with PreToolUse hooks to suggest compaction automatically in long sessions.
  • Supports configurable thresholds to tailor when prompts are triggered in planning-to-implementation transitions.

Quick Start

Prompt for a manual compaction at a milestone to reset context before moving to 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 prevent context loss during long-running sessions?

You can prevent context loss in long-running sessions by prompting manual context compaction at logical milestones. This approach resets the context window before critical information degrades during multi-phase tasks.

When should I compact context in planning-to-implementation transitions?

Compact context in planning-to-implementation transitions after exploration phases to preserve the core plan. A configurable COMPACT_THRESHOLD helps determine the exact timing to reset context before moving to the next phase.

Can I automate context compaction prompts with PreToolUse hooks?

Yes, you can automate context compaction prompts using PreToolUse hooks. The hook trigger automatically suggests compaction in long sessions based on your configured threshold, removing the need to remember manual checks.

What is the best way to manage context in multi-phase tasks?

The best way to manage context in multi-phase tasks is triggering compaction at phase transitions. Prompting a manual compaction at a milestone resets context, ensuring the next phase starts with a clean and relevant state.

Are there limitations to threshold-based context compaction reminders?

Threshold-based context compaction reminders depend on a configurable COMPACT_THRESHOLD, meaning they provide suggestions rather than automatic execution. Users must still manually initiate the compaction process when prompted.