Agent skill
strategic-compact
Intelligent context window management with strategic compaction suggestions. Monitors context usage and suggests /compact at logical boundaries. Saves state before compaction to enable recovery.
Install this agent skill to your Project
npx add-skill https://github.com/WenJunDuan/Rlues/tree/main/vibeCoding/old version/claude/config-agent_v7.9.1/.claude/skills/strategic-compact
SKILL.md
Strategic Compact Skill
Optimize context window usage through intelligent compaction timing.
Warning Thresholds
| Level | Usage | Action |
|---|---|---|
| Info | 50% | Monitor |
| Warning | 70% | Suggest compact soon |
| Critical | 85% | Urgent compaction needed |
| Danger | 95% | Immediate compaction |
Good Times to Compact
- ✅ After completing a feature/task
- ✅ Before starting new unrelated work
- ✅ After successful verification
- ✅ At natural conversation breaks
Bad Times to Compact
- ❌ Mid-debugging session
- ❌ During multi-file refactoring
- ❌ When tracking complex state
Pre-Compaction Workflow
- State Capture - Save current task context
- Save State - Write to pre-compact-state.yaml
- Generate Summary - Create session summary
- Execute Compaction - /compact --preserve-state
Post-Compaction Recovery
/resume --from-compact
Loads pre-compact-state.yaml and restores context.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-teams
Path D 并行编排 — 子代理分工 + Agent Teams 协作。需要 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
tdd
Path 分级 TDD 策略
context7
E 阶段按需拉取库文档 — 用 ctx7 获取准确 API 信息
knowledge
跨会话经验管理 — 在 .ai_state 内沉淀和复用项目经验
code-quality
Rev 阶段 Plugin 编排顺序
verification
V 阶段 Path 分级验证清单
Didn't find tool you were looking for?