用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill context-optimization命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
LLM token logprobs and calibration. Per-decision confidence, ECE, Brier, reliability diagrams, low-confidence triage.
Analyze LLM token logprobs and calibration. Use for per-decision confidence, ECE, Brier scores, reliability diagrams, and low-confidence triage.
回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
基于 SOC 职业分类
正在显示 SKILL.md
| name | context-optimization |
| description | Optimize context window via MECW principles, memory tiering, and subagent coordination. |
| alwaysApply | false |
| category | conservation |
| token_budget | 150 |
| progressive_loading | true |
| modules | ["modules/context-waiting.md","modules/findings-format.md","modules/mecw-assessment.md","modules/mecw-principles.md","modules/memory-tiers.md","modules/session-routing.md","modules/subagent-coordination.md"] |
| hooks | {"PreToolUse":[{"matcher":"Read","command":"echo \"[skill:context-optimization] 📊 Context analysis started: $(date)\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\n","once":true}],"PostToolUse":[{"matcher":"Bash","command":"# Track context analysis tools\nif echo \"$CLAUDE_TOOL_INPUT\" | grep -qE \"(wc|tokei|cloc|context)\"; then\n echo \"[skill:context-optimization] Context measurement executed: $(date)\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\nfi\n"}],"Stop":[{"command":"echo \"[skill:context-optimization] === Optimization completed at $(date) ===\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\n# Could export: context pressure events over time\n"}]} |
| model_hint | standard |
| role | hook-target |
def select_optimal_modules(context_situation, task_complexity):
if context_situation == "CRITICAL":
return ['mecw-assessment', 'subagent-coordination']
elif task_complexity == 'high':
return ['mecw-principles', 'subagent-coordination']
else:
return ['mecw-assessment']
| Utilization | Status | Action |
|---|---|---|
| < 30% | LOW | Continue normally |
| 30-50% | MODERATE | Monitor, apply principles |
| > 50% | CRITICAL | Immediate optimization required |
Behavior Change: Large bash command and tool outputs are saved to disk instead of being truncated; file references are provided for access.
| Scenario | Before 2.1.2 | After 2.1.2 |
|---|---|---|
| Large test output | Truncated, partial data | Full output via file reference |
| Verbose build logs | Lost after 30K chars | Complete, accessible on-demand |
| Context pressure | Less from truncation | Same - only loaded when read |
head, tail, or grep on file references.modules/mecw-principles.md for core concepts, the 50% rule, and quick-start code examples.modules/mecw-assessment.md for risk identification.modules/subagent-coordination.md for decomposition patterns.modules/context-waiting.md for deferred loading strategies.If context usage remains high after optimization, check for large files that were read entirely rather than selectively. If MECW assessments fail, ensure that your environment provides accurate token count metadata. For permission errors when writing output logs to /tmp, verify that the project's temporary directory is writable.