Hook拦截大文件读请求
Block big reads with hooks
要点
- 写在 CLAUDE.md 里的分流规则会被忽略,hook 才会硬拦截
- 超大文件读改走廉价模型做摘要,旗舰模型只做推理和编辑
- Spotify 在一个 Java 单体上测到约九成 token 下降
- 先用自己的会话日志估触发率,别假设你也能省九成
原帖开头
A Spotify engineer built a Claude Code plugin that blocks big file reads at the hook layer and reroutes them to a cheap Gemini worker instead of Claude. His first version was routing advice in CLAUDE.md. Claude ignored it. The hook doesn't ask, it blocks. He measured a 90% drop i …






