未加工のツール出力でコンテキストを無駄にするのはやめましょう
使うタイミング: エージェントが 30 分後には「忘れて」しまい、再読み込みで $$ を消費してしまうと感じます。
前提条件
- クロードコード v1.0.33+ —
brew upgrade claude-codeornpm update -g @anthropic-ai/claude-code
フロー
-
インストール/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode✓ コピーしました→ Plugin registers hooks + 6 sandbox tools -
確認する/context-mode:ctx-doctor✓ コピーしました→ All checks [x]
-
通常の使用Now do a big task that would normally blow context — e.g. analyze all .log files under /var/log✓ コピーしました→ ctx_execute used instead of raw Read; output indexed not dumped
-
貯蓄をチェックする/context-mode:ctx-stats✓ コピーしました→ Per-tool reduction ratio reported
結果: 同じタスクですが、圧縮までに 10 倍の時間がかかり、エージェントはそれを記憶します。
注意点
- Other MCPs bypass the routing — Pass their tool calls through ctx_batch_execute for consistent accounting