strategic-compact

Prompt manual context compaction at logical task boundaries via PreToolUse hook.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/TruCol270/salty-pickle --skill strategic-compact-trucol270
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/TruCol270/salty-pickle/tree/main/.claude-skills/strategic-compact
Command: npx skills add https://github.com/TruCol270/salty-pickle --skill strategic-compact-trucol270

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Long, multi-phase work sessions tend to accumulate irrelevant context, causing slower responses and confusion. This skill provides prompts to perform manual context compaction at logical boundaries instead of relying on automatic, arbitrary truncation.

Core Features & Use Cases

  • Prompts at phase boundaries to refresh context without losing momentum
  • Configurable threshold and integration with PreToolUse hook for seamless workflow
  • Works with long research → planning → implementation workflows to maintain coherence

Quick Start

Install the strategic-compact skill and configure the PreToolUse hook to invoke the suggest-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 context drift in Claude during long multi-phase workflows?

To prevent context drift during long multi-phase workflows, you can apply manual context compaction at logical task boundaries. This resets the active context window without losing progress, avoiding slower responses and confusion from accumulated irrelevant data.

When should I trigger manual context compaction instead of relying on automatic truncation?

You should trigger manual context compaction at logical milestones, such as transitioning from research to planning or implementation to testing. This ensures context reset occurs at coherent breakpoints rather than relying on arbitrary automatic truncation.

How do I set up prompts to suggest context compaction at task boundaries?

To set up manual compaction prompts, install the skill and configure a PreToolUse hook to invoke the suggest-compact.sh shell script. You also need to define a configurable threshold that triggers the prompt within your Claude environment.

Can I use a shell script to manage Claude context across research and implementation phases?

Yes, you can use a small shell script like suggest-compact.sh to manage Claude context across research and implementation phases. Running it via a PreToolUse hook prompts you to compact context at phase boundaries, maintaining workflow coherence.

What is the best way to maintain context coherence across long planning and testing sessions?

The best way to maintain context coherence across long planning and testing sessions is prompting manual compaction at phase boundaries. This approach refreshes the context window at logical milestones, preventing response degradation without losing session progress.

Do I need a PreToolUse hook to run context compaction scripts in Claude environments?

Yes, a PreToolUse hook is required to run the context compaction shell script in Claude environments. The hook integrates the suggest-compact.sh script into your workflow, ensuring compaction prompts trigger at the configured threshold automatically.