strategic-compact

Prompt strategic context compaction at logical session boundaries using suggest-compact.js thresholds.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/DrinkBoooz/PyTrade --skill strategic-compact-drinkboooz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/DrinkBoooz/PyTrade/tree/main/.opencode/skills/trading-creation-tool/ecc/skills/strategic-compact
Command: npx skills add https://github.com/DrinkBoooz/PyTrade --skill strategic-compact-drinkboooz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps maintain coherent AI sessions by enabling deliberate context compaction at logical boundaries rather than relying on automatic, arbitrary truncation.

Core Features & Use Cases

  • Implements gatekeeping to compact context after exploration and before execution.
  • Supports milestones and phase transitions to keep relevant knowledge while discarding outdated tangents.
  • Suitable for long-running sessions, multi-phase tasks, and frequent task switching to preserve focus.

Quick Start

Run the suggest-compact.js script on PreToolUse to evaluate usage and prompt compacting when thresholds are reached.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I prevent automatic context truncation in long AI sessions?

Use strategic context compaction to manage AI sessions by prompting deliberate compaction at logical boundaries like milestone transitions, preventing automatic truncation from discarding relevant knowledge during long-running tasks.

When should I compact context during multi-phase task switching?

Compact context during multi-phase task switching at logical boundaries such as milestone transitions, after exploration phases, and before execution to retain relevant knowledge while discarding outdated tangents.

How do I set up context compaction prompts for AI session management?

Run the suggest-compact script on PreToolUse to evaluate context usage and prompt compaction when configurable thresholds are reached, detecting phase transitions and reminding users to compact strategically.

Why does my AI session lose coherence and slow down over time?

AI sessions lose coherence as context windows fill with outdated tangents; strategic compaction at logical boundaries discards irrelevant history and preserves focus, restoring response speed and coherence.

Can I use strategic compaction for frequent task switching in long sessions?

Yes, strategic compaction is suitable for long-running sessions and frequent task switching, applying gatekeeping to compact context after exploration and before execution to maintain coherent focus across transitions.

What is the best way to manage context across milestone transitions in AI workflows?

The best way to manage context across milestone transitions is strategic compaction, which deliberately compacts at logical boundaries instead of arbitrary truncation, keeping relevant knowledge while discarding outdated tangents.