strategic-compact

Suggest manual context compaction at workflow transitions via a PreToolUse hook.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/linnefromice/claude-code-workspace --skill strategic-compact-linnefromice
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/linnefromice/claude-code-workspace/tree/main/template-.claude/skills/strategic-compact
Command: npx skills add https://github.com/linnefromice/claude-code-workspace --skill strategic-compact-linnefromice

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Solves context loss by suggesting manual context compaction.

Core Features & Use Cases

  • Suggests manual context compaction at logical workflow boundaries to preserve essential information.
  • Triggers prompts during key transitions like after research, before execution, and after milestone completion.

Quick Start

Enable the PreToolUse hook and ensure the script is present at ~/.claude/skills/strategic-compact/suggest-compact.sh, then initiate a workflow with tool usage exceeding the threshold to trigger a compact reminder.

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 loss during long AI assistant workflows with heavy tool usage?

Manual context compaction works by suggesting consolidation at logical workflow boundaries. A PreToolUse hook tracks tool calls against a configurable threshold and triggers reminders after research phases or before execution, ensuring essential information is preserved during transitions.

How do I set up a PreToolUse hook to trigger context compaction reminders?

To trigger context compaction reminders, enable the PreToolUse hook and ensure the script is present at ~/.claude/skills/strategic-compact/suggest-compact.sh. Initiate a workflow with tool usage exceeding your configured threshold to activate the compact reminder at strategic points.

When should I manually compact context in an AI automation workflow?

You should manually compact context during key workflow transitions like after research, before execution, and after milestone completion. Compacting at these phase changes preserves essential insights and prevents context loss when shifting between distinct operational stages.

Can I configure the tool call threshold for context compaction reminders?

Yes, the context compaction skill enforces a configurable threshold for tool calls. You can adjust this threshold to control when the PreToolUse hook issues reminders, allowing you to tailor the compaction frequency to your specific workflow and context management needs.

What are the limitations of relying on manual context compaction for AI assistants?

Manual context compaction relies on user action to preserve context, meaning it suggests compaction rather than executing it automatically. It is limited to triggering reminders at threshold boundaries and phase changes, requiring the user to actively manage and execute the context consolidation process.