ecc-strategic-compact

Track tool usage and prompt manual context compaction at configurable thresholds.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/karimatayuta/graph-vector-rag --skill ecc-strategic-compact
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ecc-strategic-compact
Source: https://github.com/karimatayuta/graph-vector-rag/tree/main/.claude/skills/ecc-strategic-compact
Command: npx skills add https://github.com/karimatayuta/graph-vector-rag --skill ecc-strategic-compact

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Maintains context across long AI sessions by prompting manual context compaction at logical phases instead of relying on arbitrary auto-compaction.

Core Features & Use Cases

  • Tracks tool invocations within a session and increments a counter.
  • Reminds at a configurable threshold and periodically thereafter to checkpoint context freshness.
  • Integrates with Claude-like workflows via a shell script that runs on PreToolUse hooks to prompt for /compact.

Quick Start

Run the suggest-compact.sh script to enable context compaction reminders during your session.

Frequently Asked Questions about ecc-strategic-compact

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent context loss in long AI workflows?

To prevent context loss in long AI workflows, trigger manual context compaction at logical phase boundaries using a shell script that tracks tool invocations and prompts you to checkpoint session context freshness.

Why does auto-compaction fail to maintain context across long AI sessions?

Auto-compaction relies on arbitrary limits. Strategic context compaction solves this by prompting manual checkpoints at logical workflow boundaries to preserve session continuity.

How do I configure context compaction reminders for my AI session?

Configure context compaction reminders by setting the COMPACT_THRESHOLD environment variable and running the suggest-compact.sh script to trigger notifications when your tool invocation counter reaches the limit.

Do I need a Bash environment to use PreToolUse hooks for context compaction?

Yes, you need a Bash environment to run the suggest-compact.sh script. The script integrates with PreToolUse hooks to increment a counter and remind you to checkpoint context at configurable thresholds.

When should I manually compact context instead of relying on automatic thresholds?

Manually compact context at logical phase boundaries during interactive exploration-to-execution tasks. This ensures context freshness is checkpointed after completing distinct stages rather than at arbitrary token limits.