cc-skill-strategic-compact
Suggest Strategic Context Compaction Points
Long Claude Code sessions accumulate context that degrades performance over time. This skill identifies optimal moments to compact context without disrupting workflow momentum.
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“cc-skill-strategic-compact”。 Tool call threshold reached (50 calls)
预期结果:
[StrategicCompact] 50 tool calls reached - consider /compact if transitioning phases
正在使用“cc-skill-strategic-compact”。 Periodic checkpoint at 75 tool calls
预期结果:
[StrategicCompact] 75 tool calls - good checkpoint for /compact if context is stale
正在使用“cc-skill-strategic-compact”。 User runs /compact after seeing suggestion
预期结果:
Conversation summary created with key decisions and code changes preserved. Context reduced from 50 messages to 12 summary points.
安全审计
安全All static analysis findings are false positives. The skill is a benign shell script that tracks tool call counts in a temp file and outputs suggestions to stderr. No network access, no credential handling, no command injection vectors. The temp file usage is for local state tracking only.
低风险问题 (1)
风险因素
📁 文件系统访问 (1)
质量评分
你能构建什么
Extended Development Sessions
Developers working on complex multi-file refactoring tasks receive timely reminders to compact context after completing exploration phases before moving to implementation
Research to Implementation Transitions
Data scientists and analysts get checkpoint notifications when transitioning from data exploration to code generation, ensuring relevant context is preserved
Multi-Task Workflow Management
Project managers juggling multiple concurrent tasks receive periodic suggestions to compact completed work before starting new milestones
试试这些提示
Review our conversation and create a concise summary of key decisions, code changes, and open questions. Preserve only what's needed to continue the current task.
We are transitioning from exploration to implementation. Summarize the requirements and constraints discovered, then reset context for the implementation phase.
Complete the current milestone and create an archival summary. Document what was accomplished, files modified, and any follow-up actions. Then compact to prepare for the next milestone.
Analyze our current conversation context. Identify redundant exchanges, resolved questions, and outdated information that can be safely removed while maintaining task continuity.
最佳实践
- Compact context after completing logical workflow phases, not during active problem-solving
- Review compaction suggestions and manually verify important context is preserved before compacting
- Set COMPACT_THRESHOLD environment variable to match your typical session complexity and attention span
避免
- Do not compact context in the middle of debugging sessions where full history is essential
- Avoid setting thresholds too low (under 25) which causes premature compaction suggestions
- Do not rely solely on automated suggestions - use judgment about task criticality before compacting
常见问题
How does this skill track tool call counts?
Does this skill automatically compact my context?
Can I customize when suggestions appear?
What happens if I delete the temp counter file?
Is this skill safe to use with sensitive projects?
Do I need to configure hooks manually?
开发者详情
作者
affaan-m许可证
MIT
仓库
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/cc-skill-strategic-compact引用
main
文件结构