strategic-compact

Suggest manual context compaction at logical intervals during long sessions.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/hiroto0701/dotfiles --skill strategic-compact-hiroto0701
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/hiroto0701/dotfiles/tree/main/private_dot_claude/skills/strategic-compact
Command: npx skills add https://github.com/hiroto0701/dotfiles --skill strategic-compact-hiroto0701

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 intervals, preventing arbitrary auto-compaction that can disrupt workflows and lose valuable context.

Core Features & Use Cases

  • Proactive Compaction Suggestions: Recommends /compact commands at strategic points in long sessions or multi-phase tasks.
  • Context Preservation: Ensures critical information is retained through task transitions (e.g., research to planning, implementation to testing).
  • Use Case: When working on a complex feature that involves initial research, planning, coding, and testing, this skill will prompt you to compact the research context before you start coding, ensuring your implementation plan remains accessible without the bulk of raw research notes.

Quick Start

Use the strategic-compact skill to get a suggestion for manual context compaction.

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's auto-compaction from losing context during long sessions?

Manual context compaction prevents arbitrary auto-compaction by prompting you to compact at logical task transitions. This preserves essential information by proactively suggesting compaction based on tool call thresholds rather than waiting for automatic triggers.

When should I manually compact the context window in multi-phase tasks?

You should compact the context window at task transitions, such as moving from research to planning or implementation to testing. Compacting at these strategic intervals ensures critical information from previous phases is retained without losing your implementation plan.

Do I need a hook in settings.json to manage token limits proactively?

Yes, managing token limits proactively requires setting up a hook in Claude's settings.json for PreToolUse events. This hook configuration enables the skill to monitor tool call thresholds and offer proactive compaction suggestions.

What's the best way to preserve research context before coding implementation?

The best way to preserve research context is to manually compact it before starting the coding phase. This ensures your implementation plan remains accessible and within token limits without the bulk of raw research notes cluttering the context window.

Does context compaction work with complex feature development workflows?

Yes, context compaction works effectively with complex feature workflows involving research, planning, coding, and testing phases. It prompts you to compact at each logical transition point, ensuring critical context is retained throughout the entire multi-phase development process.