strategic-compact

Prompt manual context compaction at logical points in long sessions.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/forrany/Agent-configs --skill strategic-compact-forrany
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/forrany/Agent-configs/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/forrany/Agent-configs --skill strategic-compact-forrany

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill helps maintain context across long, multi-step AI sessions by prompting manual context compaction at logical boundaries, reducing drift and confusion.

Core Features & Use Cases

  • Manual context compaction prompts at strategic points to preserve essential research and planning data.
  • Session-aware reminders that trigger after crossing thresholds of tool usage to guide transitions from exploration to implementation.
  • Configurable thresholds to tailor prompts to project length and team workflow.

Quick Start

Enable the strategic-compact skill in your Claude/Cursor settings and set COMPACT_THRESHOLD to your preferred value. Start a long task and observe prompts after the threshold is reached; adjust thresholds as needed.

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

To prevent context drift in long-running AI sessions, use manual context compaction prompts triggered at strategic boundaries. A PreToolUse hook tracks tool usage and suggests compaction after crossing a configurable threshold, preserving essential planning data.

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

Manual context compaction is the process of summarizing and preserving essential research data before context limits are exceeded. It should be triggered at logical boundaries, such as transitioning from interactive exploration to implementation in multi-step workflows.

How do I configure compaction thresholds for multi-step AI workflows?

Configure compaction thresholds for multi-step AI workflows by setting the COMPACT_THRESHOLD variable to your preferred value. The skill uses a suggest-compact.sh script and persists a per-session counter to /tmp to trigger periodic reminders.

Does this context management skill work with interactive exploration workflows?

Yes, this context management skill works with interactive exploration workflows by using a PreToolUse hook to monitor tool usage. It specifically applies to exploration-to-implementation transitions where plan finalization matters.

What are the limitations of using a per-session counter for compaction reminders?

Using a per-session counter for compaction reminders relies on a persistent file stored in /tmp, meaning reminders are tied to local session state. Thresholds require manual tuning to match specific project length and team workflow dynamics.