strategic-compact

Suggest manual context compaction at logical workflow boundaries via PreToolUse hooks.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/filipas123/Claude-Code-PKC-v1 --skill strategic-compact-filipas123
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/filipas123/Claude-Code-PKC-v1/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/filipas123/Claude-Code-PKC-v1 --skill strategic-compact-filipas123

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the issue of arbitrary auto-compaction in Claude, which can disrupt workflows by removing crucial context mid-task. It enables users to manually trigger context compaction at logical breakpoints, preserving important information through task phases.

Core Features & Use Cases

  • Strategic Compaction Suggestions: Provides timely prompts to manually compact context based on tool usage thresholds and periodic reminders.
  • Preserves Task Flow: Avoids mid-task context loss by suggesting compaction only at logical intervals (e.g., after exploration, before execution).
  • Use Case: When working on a complex coding project, after researching solutions and finalizing a plan, you can use this skill's suggestion to compact the research context, keeping the implementation plan fresh for the next phase.

Quick Start

Use the strategic-compact skill to suggest manual context compaction when transitioning between task phases.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I prevent Claude from losing context during auto-compaction?▼

Manual context compaction prevents Claude from losing context during auto-compaction by prompting you to trigger compaction at logical workflow boundaries, preserving crucial task information through execution phases.

When should I manually compact context in Claude workflows?▼

You should manually compact context in Claude workflows at logical breakpoints, such as after researching solutions and finalizing a plan, to keep implementation details fresh before execution begins.

How does the strategic-compact skill track when to suggest context compaction?▼

The strategic-compact skill tracks when to suggest context compaction by executing a bash script on PreToolUse hooks to monitor tool invocation counts and trigger periodic reminders at workflow boundaries.

Can I use strategic-compact without installing additional dependencies?▼

Yes, you can use strategic-compact without additional dependencies because it operates using a standalone bash script integrated directly into PreToolUse hooks, requiring no external packages.

Does arbitrary auto-compaction disrupt complex coding workflows in Claude?▼

Arbitrary auto-compaction disrupts complex coding workflows in Claude by removing crucial context mid-task, which is why suggesting manual compaction at strategic intervals preserves task flow and important research information.

What are the limitations of relying on tool call counts for context compaction triggers?▼

Relying on tool call counts for context compaction triggers provides periodic reminders rather than semantic understanding, meaning compaction suggestions occur at usage thresholds instead of recognizing actual task completion boundaries.