strategic-compact

Enforce manual context compression at strategic workflow boundaries via suggest-compact.sh.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/shygoly/sapbase --skill strategic-compact-shygoly
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/shygoly/sapbase/tree/main/docs/zh-CN/skills/strategic-compact
Command: npx skills add https://github.com/shygoly/sapbase --skill strategic-compact-shygoly

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

本技能帮助在任务的关键节点强制手动压缩上下文,避免自动压缩带来的信息丢失与逻辑错位。

Core Features & Use Cases

  • 手动触发:在工作流的策略点执行上下文压缩,保留执行计划与关键决策。
  • 针对多阶段任务:在里程碑之间和逻辑边界处进行上下文清理,确保下一阶段可控。
  • 适用场景:长流程、跨团队协作、需要回滚/审计的任务。

Quick Start

Configure PreToolUse to trigger suggest-compact.sh and set COMPACT_THRESHOLD to enable manual context compression at strategic workflow boundaries.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I manually compress context at strategic workflow boundaries in Claude?

Manual context compression at workflow boundaries is enforced by configuring PreToolUse events to trigger the suggest-compact.sh hook and setting the COMPACT_THRESHOLD parameter. This approach preserves execution plans and critical decisions across multi-step tasks by avoiding automatic context drift.

Why does automatic context compression cause information loss in long-running processes?

Automatic context compression causes information loss and logic misalignment in long-running processes because it lacks awareness of logical boundaries. Manual compression at strategic milestones ensures the next phase remains controllable by retaining critical context, execution plans, and key decisions between phases.

When do I need manual context compression for multi-step tasks?

You need manual context compression for multi-step tasks involving long workflows, cross-team collaboration, or tasks requiring rollback and audit capabilities. It enforces context cleanup at logical boundaries between milestones, ensuring the next phase remains controllable and context is preserved.

Does manual context compression work with PreToolUse hooks for milestone tracking?

Yes, manual context compression integrates directly with PreToolUse hooks for milestone tracking. By triggering the suggest-compact.sh script through PreToolUse events and configuring the COMPACT_THRESHOLD, you coordinate compression precisely at workflow boundaries between milestones.

What are the limitations of relying on automatic context management for cross-team collaboration?

Automatic context management lacks the ability to recognize logical boundaries between milestones, leading to uncontrolled context drift and lost critical decisions. For cross-team collaboration and audit-ready tasks, manual compression at strategic boundaries is required to preserve execution plans and ensure phase controllability.