strategic-compact

Suggest manual context compaction after configurable tool-call thresholds and intervals.

Updated May 24, 2023
One-click install
npx skills add https://github.com/Kimjiman/basic-arch --skill strategic-compact-kimjiman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/Kimjiman/basic-arch/tree/main/.claude/skills/strategic-compact
Command: npx skills add https://github.com/Kimjiman/basic-arch --skill strategic-compact-kimjiman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps manage the AI's context window by suggesting manual compaction at logical intervals, preventing arbitrary auto-compaction that can disrupt workflows and lose valuable information.

Core Features & Use Cases

  • Proactive Compaction Suggestions: Recommends when to manually compact the AI's context based on tool usage and task phases.
  • Preserves Task Flow: Avoids mid-task context loss by triggering suggestions at natural breakpoints (e.g., after research, before implementation).
  • Use Case: When working on a complex project with multiple research, planning, and implementation phases, this skill will prompt you to compact the context after you've finished gathering information and before you start writing code, ensuring the most relevant information is retained.

Quick Start

Manually compact the AI's context by typing /compact followed by a brief summary of the current focus.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I prevent auto-compaction from losing context during an AI workflow?

Preventing arbitrary auto-compaction requires suggesting manual context compaction at logical intervals. This approach tracks tool calls and prompts you to compact at natural breakpoints, preserving task flow and retaining relevant information before context limits are hit.

What is manual context compaction and when should I use it in prompt engineering?

Manual context compaction is the process of summarizing and clearing the AI context window at a chosen point. You should use it at natural task breakpoints, such as after research and before implementation, to ensure the most relevant information is retained.

How do I configure context management thresholds for session optimization?

Configuring context management thresholds involves setting environment variables for tool call limits and periodic intervals. You can adjust these settings and set up hook configurations in your user settings to control when manual compaction suggestions are triggered.

Can I trigger context compaction suggestions at specific task phases?

Yes, you can trigger context compaction suggestions at specific task phases. The system monitors your tool usage and prompts for manual compaction after a configurable threshold, allowing you to clear context after research phases and before writing code.

Does arbitrary auto-compaction disrupt complex AI workflows?

Arbitrary auto-compaction disrupts complex AI workflows by clearing the context window mid-task, which loses valuable information. Suggesting manual compaction at logical intervals prevents this by triggering prompts at natural breakpoints rather than arbitrary limits.