strategic-compact

Prompt manual context compaction at configurable workflow thresholds via a PreToolUse hook.

8|1|Updated Dec 6, 2025
One-click install
npx skills add https://github.com/zzh0u/gojet --skill strategic-compact-zzh0u
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/zzh0u/gojet/tree/main/.claude/skills/strategic-compact
Command: npx skills add https://github.com/zzh0u/gojet --skill strategic-compact-zzh0u

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.

Core Features & Use Cases

  • Tracks tool usage and prompts for strategic /compact at defined boundaries
  • Configurable thresholds via COMPACT_THRESHOLD environment variable
  • PreToolUse hook integration for seamless prompts during workflows
  • Simple setup with Claude settings for automated reminders

Quick Start

Configure the PreToolUse hook in your Claude settings to receive automated /compact suggestions at strategic workflow boundaries.

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 workflows without losing track of task phases?

You can preserve context during long AI workflows by prompting for manual compaction at logical milestones. This approach ensures context is saved at strategic task boundaries rather than through arbitrary auto-compaction.

How does a PreToolUse hook trigger context compaction reminders?

A PreToolUse hook tracks tool invocations and triggers periodic reminders for manual compaction. It monitors workflow activity and suggests context preservation actions when defined tool usage boundaries are reached.

Can I configure the threshold for when context compaction prompts appear?

Yes, you can configure compaction prompts by setting the COMPACT_THRESHOLD environment variable. This allows you to define specific tool usage boundaries for when context preservation reminders trigger.

When should I use strategic context compaction instead of automatic compaction?

Use strategic context compaction during exploratory, planning, and execution phases where context preservation matters during task transitions. It prevents losing critical workflow context at arbitrary auto-compaction limits.

How do I set up automated compaction suggestions in Claude?

To set up automated compaction suggestions, configure the PreToolUse hook in your Claude settings. This integration provides seamless prompts for strategic context preservation during your active workflows.