strategic-compact

Prompt for /compact at phase boundaries using a PreToolUse threshold hook.

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/phanTian2026/mobiletrading --skill strategic-compact-phantian2026
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-compact
Source: https://github.com/phanTian2026/mobiletrading/tree/main/trae/skills/strategic-compact
Command: npx skills add https://github.com/phanTian2026/mobiletrading --skill strategic-compact-phantian2026

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manual context compression at phase boundaries to preserve important context and prevent mid-task interruptions caused by automatic compression.

Core Features & Use Cases

  • Encourages compression at logical milestones (end of exploration, milestone completion, before phase transitions) to maintain continuity.
  • Provides a lightweight hook (PreToolUse) to prompt for /compact based on tool usage and phase state.
  • Reduces risk of losing context when switching tasks or handing off to next team member.

Quick Start

Describe the current phase and trigger a /compact prompt when entering a new phase boundary.

Frequently Asked Questions about strategic-compact

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

FAQPage Schema
How do I prevent automatic context compression from interrupting my AI workflow?

Manual context compression at phase boundaries prevents automatic interruptions by prompting you to run /compact at logical milestones, preserving important task context before the system truncates it.

What is a phase boundary in AI context management?

A phase boundary in AI context management marks logical task transitions like exploration end, milestone completion, or phase shifts where you manually compact context to ensure continuity.

How do I trigger a manual compact prompt during development?

You trigger a manual compact prompt by using a PreToolUse hook that tracks tool calls and suggests /compact when usage thresholds are met or phase boundaries are reached.

Can I configure the context compression threshold?

Yes, you can configure the context compression threshold using the optional COMPACT_THRESHOLD environment variable to control when the hook suggests running /compact.

Why does manual context compacting matter for team handoffs?

Manual context compacting matters for team handoffs because it preserves critical task state and milestones, reducing the risk of losing context when switching tasks or transferring to another team member.