strategic-compact

Prompt manual snapshots and handoffs to preserve context across long sessions.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/nhouseholder/nicks-claude-code-superpowers --skill strategic-compact-nhouseholder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/nhouseholder/nicks-claude-code-superpowers/tree/main/skills/strategic-compact
Command: npx skills add https://github.com/nhouseholder/nicks-claude-code-superpowers --skill strategic-compact-nhouseholder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Strategic compaction addresses the drift of context in long sessions by advocating manual, selective snapshotting and handoffs instead of letting automated, lossy memory compaction erode critical decisions and state.

Core Features & Use Cases

  • Manual, boundary-aligned compaction prompts before major phase transitions to maintain fidelity.
  • Guidance for when to trigger auto-handoff to preserve requirements and decisions across sessions.
  • Configurable thresholds via environment variables to tailor cadence and guardrails.
  • Pre-agent compaction checks to ensure large-output tasks are spawned with sufficient context.

Quick Start

Run a strategic compact when you reach a logical boundary to preserve context before starting the next phase.

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 sessions without losing critical decisions?

Context drift in long AI sessions happens when automated memory compaction discards critical decisions and state, causing the model to lose track of earlier requirements. Strategic compaction prevents this by prompting manual, selective snapshotting at logical phase boundaries to maintain continuity.

When should I trigger a context handoff during multi-phase work?

You should trigger a context handoff during multi-phase work at major phase transitions, such as moving from research to implementation or before starting a new session, to persist state and guide next steps with sufficient context.

How do I configure compaction thresholds for my workflow environment?

You can configure compaction thresholds using environment variables to tailor the cadence and guardrails of the pre-tool hook script, ensuring large-output tasks are spawned with sufficient context before major phase transitions.

Can I automate context snapshots before spawning large-output tasks?

Yes, you can automate context snapshots using a lightweight pre-agent compaction hook script that checks environment-configurable thresholds and ensures large-output tasks are spawned with sufficient context before execution.

What is the best way to manage memory drift across multiple research and implementation phases?

The best way to manage memory drift across multiple phases is enforcing a defined handoff protocol with manual, boundary-aligned compaction prompts, which persists state and guides next steps to maintain continuity across transitions.

Why does automated context compaction erode critical session state?

Automated context compaction erodes critical session state because it is a lossy process that indiscriminately removes information, whereas strategic compaction advocates manual, boundary-aligned snapshotting to preserve fidelity.