strategic-compact

Prompt manual context consolidation during long multi-phase sessions via PreToolUse hooks.

Updated May 27, 2025
One-click install
npx skills add https://github.com/vinwang/tools --skill strategic-compact-vinwang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/vinwang/tools/tree/main/iflow/skills/strategic-compact
Command: npx skills add https://github.com/vinwang/tools --skill strategic-compact-vinwang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long-running sessions risk context drift as information piles up across phases. This skill encourages manual compaction at logical boundaries to preserve critical reasoning and maintain coherence.

Core Features & Use Cases

  • Tracks tool usage within a session to identify logical points for compaction.
  • Provides configurable thresholds and periodic reminders to prompt action.
  • Includes a PreToolUse hook configuration guide to integrate with your workflow.

Quick Start

Install this skill and configure your PreToolUse hook to trigger the compaction script at defined thresholds to prompt manual context consolidation.

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 in long AI assistant sessions?

To prevent context drift in long AI assistant sessions, use strategic compaction to manually consolidate information at logical workflow boundaries. This preserves critical reasoning and maintains session coherence by prompting you to clear outdated context.

What is strategic compaction for multi-phase workflows?

Strategic compaction for multi-phase workflows is a context management technique that tracks tool usage to identify logical points for manual consolidation. It prompts you to compact context when switching between unrelated tasks like research, planning, and testing.

How do I configure a PreToolUse hook for manual context consolidation?

To configure a PreToolUse hook for manual context consolidation, install the skill and integrate the suggest-compact.js script into your workflow. This hook triggers periodic reminders based on a configurable threshold to prompt context compaction actions.

Can I set a custom threshold for context management reminders?

Yes, you can set a custom threshold for context management reminders. The skill provides a configurable threshold with a default value of 50, allowing you to adjust when periodic reminders trigger to prompt manual context consolidation during your session.

When should I perform manual context compaction during a session?

You should perform manual context compaction during multi-phase workflows at logical boundaries, such as when transitioning between research, planning, implementation, and testing phases, or when switching between unrelated tasks within the same session.