strategic-compact

Suggest manual context compaction at configurable tool-call thresholds.

1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/ShunmeiCho/claude-config --skill strategic-compact-shunmeicho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/ShunmeiCho/claude-config/tree/main/config/skills/strategic-compact
Command: npx skills add https://github.com/ShunmeiCho/claude-config --skill strategic-compact-shunmeicho

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps manage the AI's context window by suggesting manual context compaction at logical points in a workflow, preventing the loss of crucial information that can occur with arbitrary auto-compaction.

Core Features & Use Cases

  • Proactive Suggestions: Offers to compact context based on tool usage thresholds and periodic reminders.
  • Workflow Awareness: Aims to compact context at natural breaks in tasks (e.g., after planning, before execution) rather than mid-operation.
  • Customizable Thresholds: Allows configuration of the number of tool calls before the first suggestion.

Quick Start

Configure the PreToolUse hook in your settings.json to run the strategic-compact.sh script.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I prevent AI context loss during long workflows?

Context compaction at logical intervals prevents AI context loss during long workflows by prompting user-initiated management at configurable tool call thresholds, avoiding arbitrary auto-compaction that drops crucial information mid-task.

What is manual context compaction in AI workflows?

Manual context compaction in AI workflows is the process of summarizing or clearing context at natural task breaks, such as after planning and before execution. It tracks tool calls to provide reminders, ensuring context is preserved through distinct task phases.

How do I configure tool call thresholds for context management reminders?

Configure tool call thresholds for context management reminders by setting up a PreToolUse hook in your settings.json to run the strategic-compact.sh script, allowing customizable limits before the first compaction suggestion triggers.

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

Compact context at natural task breaks like after planning or before execution instead of relying on auto-compaction, preventing mid-operation context loss and enhancing AI workflow efficiency by preserving crucial phase information.

Does strategic-compact require any specific dependencies to run?

Strategic-compact requires no external dependencies to run, operating purely through a shell script configured via a PreToolUse hook in settings.json to track tool calls and provide context management reminders.