strategic-compact

Suggest manual context compaction at logical intervals via PreToolUse hook.

3|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/Nixdorfer/ClaudeCodeTool --skill strategic-compact-nixdorfer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/Nixdorfer/ClaudeCodeTool/tree/main/plugins/cache/everything-claude-code/everything-claude-code/1.4.1/.cursor/skills/strategic-compact
Command: npx skills add https://github.com/Nixdorfer/ClaudeCodeTool --skill strategic-compact-nixdorfer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps manage Claude's context window by suggesting manual compaction at logical workflow intervals, preventing arbitrary auto-compaction that can disrupt task flow and lose valuable context.

Core Features & Use Cases

  • Strategic Compaction: Prompts the user to manually compact context at opportune moments (e.g., after exploration, before execution, after milestones).
  • Configurable Thresholds: Allows setting thresholds for tool call counts that trigger suggestions.
  • Pre-computation Hook: Integrates with Claude's PreToolUse hook to provide timely reminders.
  • Use Case: When working on a complex coding task, after researching solutions and before starting to implement, you can use this skill to prompt a manual compact, preserving your research context while clearing out intermediate steps.

Quick Start

Ensure the hook is set up in your ~/.claude/settings.json and then continue your work; the skill will suggest compaction when appropriate.

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 in long coding tasks?

Manual context compaction prevents Claude from losing context during auto-compaction by suggesting strategic compaction at logical workflow intervals, such as after research or before execution, preserving valuable task context.

When should I manually compact context in Claude for multi-phase workflows?

You should manually compact context in Claude at logical milestones, such as after exploring solutions or before implementing code, to clear intermediate steps while preserving essential research and task phase context.

How do I configure context compaction thresholds in Claude based on tool calls?

You can configure context compaction thresholds by setting a specific tool call count limit in your settings, which triggers a manual compaction suggestion through the PreToolUse hook once the threshold is met.

Does this manual context compaction skill integrate with Claude hooks?

Yes, manual context compaction integrates directly with Claude's PreToolUse hook to monitor tool calls and provide timely reminders for compaction at periodic intervals within your configured settings.

Why does arbitrary auto-compaction disrupt complex coding workflows in Claude?

Arbitrary auto-compaction disrupts complex coding workflows by clearing context at inopportune moments, whereas strategic manual compaction preserves critical research and intermediate results through distinct multi-phase task transitions.