strategic-compact

Prompt manual context compaction at logical task boundaries via PreToolUse hooks.

26|Updated Apr 13, 2017
One-click install
npx skills add https://github.com/thesimonho/dotfiles --skill strategic-compact-thesimonho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/thesimonho/dotfiles/tree/main/AI/skills/strategic-compact
Command: npx skills add https://github.com/thesimonho/dotfiles --skill strategic-compact-thesimonho

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manual context management across long-running tasks often leads to drift and loss of critical information. This skill introduces a strategy to preserve relevant context by prompting strategic, manual compaction at logical boundaries.

Core Features & Use Cases

  • Tracks tool usage in a session and prompts for compaction at logical boundaries.
  • Provides configurable thresholds for initial suggestions and periodic reminders after the threshold.
  • Integrates with PreToolUse hooks to remind you when to compact without interrupting workflow.

Quick Start

Run the suggest-compact.sh script during PreToolUse to start context-compaction prompts.

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 during long-running AI sessions?

You can prevent context drift by prompting strategic manual compaction at logical boundaries during research, planning, and execution phases. This approach preserves task context across long-running sessions.

What is strategic compaction and how does it work with PreToolUse hooks?

Strategic compaction preserves task context by prompting manual context condensation at logical boundaries. It uses a PreToolUse hook integration with a tool-call counter and configurable threshold to trigger reminders.

How do I configure context management reminders for AI workflow optimization?

You configure context management reminders by setting a configurable threshold for initial compaction suggestions. The system then provides periodic reminders after the threshold is reached during your session.

Can I track tool usage to trigger manual context compaction automatically?

Yes, you can track tool usage to trigger manual compaction. The skill implements a tool-call counter that monitors your session and prompts you to compact at logical boundaries without interrupting workflow.

When should I prompt for context preservation in research and planning phases?

You should prompt for context preservation during exploration-to-implementation transitions. Applying strategic compaction at these logical boundaries prevents information loss across research, planning, and execution phases.

Does strategic compaction interrupt my workflow during session tracking?

Strategic compaction does not interrupt your workflow. It integrates with PreToolUse hooks to provide periodic reminders for manual compaction at logical boundaries without breaking your execution flow.