跳到正文
原文
Hacker News Show HN· agentplane·· 1 天前精选AI 评分74

TokenOps 发布 Claude Code 用量诊断插件,定位最烧 token 的提示词

Show HN: Which prompts ate your Claude Code limit? A local, read-only doctor

AI 导读

TokenOps 发布 Claude Code 插件 /tokenops:doctor,读取本地会话日志,列出最贵的 3 条提示词并解释用量去向。示例报告显示 7 天 12 个会话 304 条提示词,按 API 标价约 $235,其中 37% 花在中断后的首条消息上,因为缓存过期需重写整段对话。

推荐理由

作者公开了 Claude Code 用量分析工具的实现细节和本地只读设计,读者可据此判断自己的 token 花在哪。

社媒成稿工作台 · 一键复制

飞书同步推送 · 含数据/日期/出处/启发
核心数据发布日期信源出处独立开发启发
1559
TokenOps 发布 Claude Code 用量诊断插件,定位最烧 token 的提示词

📊 核心数据与事实(2026-12-02):
TokenOps 发布 Claude Code 插件 /tokenops:doctor,读取本地会话日志,列出最贵的 3 条提示词并解释用量去向。示例报告显示 7 天 12 个会话 304 条提示词,按 API 标价约 $235,其中 37% 花在中断后的首条消息上,因为缓存过期需重写整段对话。
• 原文实测切片:Your 3 most expensive prompts (9% of usage) #2 Wed 21:56 project B (prompt hidden) █████████░░░░░░░░░░░ 44% of that 5-hour window | 24x your typical prompt CACHE EXPIRED away 4h 45m, past the 1h cache: one call re-wrote your whole 965k-token…
• 原文实测切片:Where your usage goes 41% Re-reading context every call 37% First message after a break (cache reloaded) 12% Claude's output 11% Caching new context What to change 1.
• 原文实测切片:After 10 sessions on and 10 off, the doctor shows what each one did to your usage per prompt, and the saver mode keeps it only if it saves: Measured on your sessions (saver mode A/B, usage per prompt) Smart RTK -6% usage per prompt (95% range…

💡 对独立开发者的启发:
1/ 作者公开了 Claude Code 用量分析工具的实现细节和本地只读设计,读者可据此判断自己的 token 花在哪。
2/ 面对新模型或开源组件先看三件事:许可证是否商用安全、API/推理边际成本降了多少、能不能直接嵌进现有变现工作流。
3/ 别去卷通用开发者轮子,把底层新能力包装成面向具体行业人群(电商、创作者、中小商家)傻瓜式交付结果的产品。

📅 日期:2026-12-02(北京时间)
📰 信息源出处:Hacker News Show HN · agentplane(github.com)
🔗 原文:https://github.com/theagentplane/tokenops/tree/main/integrations/claude-code
📡 归档:https://billionare.me/items/r863709ai8py1jxht6ueoubsb
去 X 发推
每天 08:00 邮件 / 08:30 飞书准点推送一手高信噪比情报与拆解免费订阅简报

来源:Hacker News Show HN · github.com