mksglu/context-mode:20.8k stars 的 AI 编码上下文优化器,Hacker News
mksglu/context-mode(GitHub 20.8k stars、当日 +96 stars、Elastic License v2)是一款给 AI 编码 Agent 用的上下文窗口优化 MCP 服务器,三件套:1) Sandbox 工具输出 98% 减量(315 KB → 5.4 KB),2) SQLite FTS5 + BM25 做 session 持续性让模型跨 compaction 不丢上下文,3) "Think in Code" 强制让 LLM 写脚本跑分析而不是用 read 工具把数据吃进 context。PreToolUse/PostToolUse/SessionStart/PreCompact/UserPromptSubmit/Stop 六类 hook 拦截,支持 Claude Code、Codex、Cursor、Copilot CLI/IDE/JetBrains、Gemini CLI、Qwen Code、Kimi Code、Antigravity IDE/CLI、OpenClaw 等 17 个客户端,是 ponytail 之后 AI Agent 工具链里第二个跨平台编排的硬基础设施。