context-optimizer
仓库创建 2026年2月2日最近提交 6 天前SkillHot 收录 20 天前
▸ 精选理由
快速判断何时压缩并给出即时优化建议。
这个 Skill 做什么
诊断和优化 token 使用与会话上下文以避免性能退化。
把会话里占用的 token 和上下文窗口帮你诊断并压缩整理,避免对话越来越慢或答案跑偏。遇到对话变卡、上下文质量下降或 token 预算快用完时就要用它来检查和清理。特点是给出可视化阈值(比如 70%/90%)并提供即时压缩和策略建议,能快速回收上下文空间保性能。
▸ 展开 SKILL.md 英文原文
Optimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.
2.7k
Stars
257
Forks
40
仓库内 Skill
+55
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/rohitg00/pro-workflow/main/skills/context-optimizer/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/rohitg00/pro-workflow/main/skills/context-optimizer/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Context Optimizer
Manage your context window and token budget effectively.
## Quick Diagnosis
1. Run `/context` to check current usage
2. If > 70% → compact now before it degrades
3. If > 90% → you're in the "dumb zone", compact immediately
## Optimization Strategies
### Immediate
| Action | Saves | When |
|--------|-------|------|
| `/compact` | 30-50% context | At task boundaries |
| Disable unused MCPs | ~5% per MCP | When switching domains |
| Use subagents for exploration | Keeps main context clean | Heavy search/read tasks |
| Fresh session via `/resume` | 100% reset | When starting unrelated work |
### Configuration
Set proactive auto-compaction:
```json
{
"env": {
"CLvia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有