strategic-compact

Triggers compact prompts based on tracked tool-call counts in Claude sessions.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/ckallum/calsuite --skill strategic-compact-ckallum
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/ckallum/calsuite/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/ckallum/calsuite --skill strategic-compact-ckallum

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Reduces friction during long Claude workflows by prompting users to run /compact at logical milestones to preserve context.

Core Features & Use Cases

  • Tracks tool call counts per session using a temporary file to maintain state across interactions.
  • Prompts for /compact at a configurable threshold (default 50) and again every 25 calls to provide regular checkpoints.
  • Helps teams maintain coherent context during transitions from exploration to execution in complex tasks.

Quick Start

Use the strategic-compact hook to start monitoring tool usage and prompt /compact when the threshold is reached.

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 in long Claude sessions with many tool calls?▼

To preserve context in long Claude sessions, you can prompt strategic compaction at logical milestones. This skill tracks tool call counts and prompts /compact before transitions when usage accumulates.

When should I run /compact during complex editing workflows?▼

You should run /compact during complex editing workflows at a configurable threshold of 50 tool calls, with subsequent prompts every 25 calls. This provides regular checkpoints to maintain coherent context.

How does session tracking work for monitoring tool call counts?▼

Session tracking for tool call counts works by using a temporary file to maintain state across interactions. A PreToolUse hook is wired to monitor usage and issue /compact prompts when the threshold is reached.

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

Yes, you can configure the compaction threshold, which defaults to 50 tool calls. The skill uses a COMPACT_THRESHOLD setting to determine when to prompt for /compact during your session.

Does strategic compaction require any external dependencies?▼

No, strategic compaction does not require external dependencies. It implements a session-scoped counter stored in a temporary file and uses scripts to provide the PreToolUse hook functionality.

What is the best way to manage context loss during transitions from exploration to execution?▼

The best way to manage context loss during transitions from exploration to execution is prompting /compact at logical milestones. This reduces friction by preserving context as tool usage grows in complex tasks.