strategic-compact

Track tool calls and remind users to compact context at phase boundaries.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/GGEdu/claude-god-mode-template --skill strategic-compact-ggedu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/GGEdu/claude-god-mode-template/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/GGEdu/claude-god-mode-template --skill strategic-compact-ggedu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long-running Claude sessions and multi-phase tasks suffer from arbitrary auto-compaction that can lose important context. This skill prompts manual context compaction at logical phase boundaries to maintain continuity without sacrificing essential information.

Core Features & Use Cases

  • Tracks tool calls within a session to identify when a compact would be beneficial.
  • Uses a configurable threshold and periodic reminders to prompt users before context becomes unwieldy.
  • Provides a simple hook setup and configuration guide for seamless integration into workflows.

Quick Start

Enable the strategic-compact hook by adding the PreToolUse entry to your Claude settings.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I prevent losing context during long Claude sessions?

To prevent losing context during long Claude sessions, you can trigger manual context compaction at logical phase boundaries instead of relying on arbitrary auto-compaction. This preserves essential information by prompting you before the context window becomes unwieldy.

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

Manual context compaction is the process of summarizing and clearing session context at logical phase boundaries, such as moving from research to implementation. Use it during multi-phase tasks to maintain continuity without sacrificing critical information.

How do I set up reminders to compact context in Claude?

You can set up context compaction reminders by enabling a PreToolUse hook in your Claude settings. This hook tracks tool calls against a configurable threshold and issues periodic prompts to consider using the /compact command.

Does strategic context management work for multi-phase workflows?

Yes, strategic context management is specifically designed for multi-phase workflows like research, plan, implement, and test. It tracks tool calls to identify optimal compaction points, ensuring continuity across distinct phase transitions.

Why does auto-compaction lose important session context?

Auto-compaction loses important session context because it triggers arbitrarily based on context window limits rather than logical task boundaries. This can discard critical details mid-task, whereas manual compaction allows you to summarize at safe breakpoints.

Can I configure the threshold for context compaction reminders?

Yes, you can configure the threshold for context compaction reminders. The hook uses this configurable limit to track tool calls within a session and determines exactly when to issue periodic reminders to prompt a manual /compact.