strategic-compact

Prompt manual context compaction when tool-call counts cross a configurable threshold.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps users preserve important context during long, multi-phase AI workflows by prompting for manual context compaction at logical milestones rather than relying on unpredictable auto-compaction.

Core Features & Use Cases

  • Threshold-driven prompts that suggest /compact when tool-call counts cross a configurable threshold.
  • Guidance on when to compact to keep exploration and execution phases distinct across tasks.
  • Clear best practices and decision guidance for applying strategic compaction in real workflows.

Quick Start

Instruct the assistant to monitor tool usage and prompt for manual context compaction at logical milestones.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I preserve context during long AI sessions without losing important task details?

Context preservation during long AI sessions is achieved by prompting manual context compaction at logical milestones. This approach uses a threshold-driven script to suggest compaction when tool-call counts cross a configured limit, keeping essential context intact.

What is strategic context compaction and how does it work for multi-phase tasks?

Strategic context compaction is a phase-based method that suggests a context reset at logical milestones. It works by using a session-scoped counter and an environment-configured threshold to trigger prompts, keeping exploration and execution phases distinct across multi-phase tasks.

When should I manually compact context instead of relying on auto-compaction?

You should manually compact context when approaching context limits during multi-phase tasks or frequent task switching. Manual compaction at logical milestones prevents the unpredictable context loss that occurs with automatic compaction, effectively reducing cognitive load.

How do I configure context compaction prompts based on tool-call thresholds?

Configuring context compaction prompts involves setting an environment-configured threshold for tool-call counts. Once the session-scoped counter crosses this threshold, the script triggers a prompt suggesting you manually compact the context.

Does strategic compaction work for workflows with frequent task switching?

Yes, strategic compaction works for workflows with frequent task switching by preserving essential context at logical milestones. The threshold-driven suggestion script prompts manual compaction to keep exploration and execution phases distinct, preventing context loss.

What are the limitations of threshold-driven context compaction?

Threshold-driven context compaction relies on manual intervention at logical milestones, meaning it requires user action to execute. It depends on an environment-configured threshold and a session-scoped counter, so it will not automatically compact context if prompts are ignored.