开发者 localixai 及其团队发布了名为 Tokendoctor 的 Claude Code 插件,该工具旨在通过优化令牌使用效率,帮助用户将代码辅助服务的使用成本降低最高 38% 1。与传统依赖耗时摘要压缩的方式不同,Tokendoctor 引入了一种新的“滑动(slide)”机制来替代原有流程,从而显著节省处理时间与费用 1。为了展示实际效果,用户在更改任何设置前可通过 /tokendoctor:sessions 命令重放自己的历史会话以预览优化结果 1。
技术测试数据显示,在真实会话场景中,Claude Code 原生摘要功能将 367K tokens 压缩至 35K 需要耗时 65.3 秒,而 Tokendoctor 的 slide 功能将类似规模的 368K tokens 压缩至 36K 仅耗时 0.04 秒 1。作者提供的统计指出,基于 2023年9月22日至11月1日期间记录的 109 次操作,原生摘要的平均耗时为 79 秒 1。此外,在 Haiku 5.5 模型上的精度保持测试表明,slide 功能与原生摘要在信息保留率上表现一致,均成功保留了 6/6 决策点和 8/8 KEYs,未造成质量损失 1。
该插件完全在本地运行,遵循 MIT 许可证发布,且不涉及 MCP 服务器架构 1。出于隐私与安全考虑,Tokendoctor 每日仅从 code.claude.com 获取两个公开文档页面进行离线缓存校验,承诺不发送任何用户数据 1。用户可通过执行 claude plugin marketplace add localixai/tokendoctor 和 claude plugin install tokendoctor@tokendoctor 两条命令完成安装 1。
Developers have released a new plugin for Claude Code called Tokendoctor, which aims to reduce usage costs by as much as 38% through optimized token management 1. The tool operates locally and introduces a novel "slide" mechanism designed to replace traditional summary compression, thereby saving both time and money 1. By analyzing user session history and adjusting context window sizes, the plugin seeks to maintain performance while cutting expenses 1.
To demonstrate its efficacy before any settings are changed, the plugin includes a /tokendoctor:sessions feature that replays the user's own sessions to show potential optimizations 1. Performance comparisons reveal significant speed improvements: in real-world scenarios, Claude Code’s native summarization process took 65.3 seconds to compress 367K tokens down to 35K, whereas Tokendoctor’s slide function compressed 368K tokens to 36K in just 0.04 seconds 1. Furthermore, data from the author indicates that native summaries averaged 79 seconds across 109 records between September 22 and November 1, 2023 1. Despite these changes, accuracy tests on the Haiku 5.5 model showed that the slide function retained information consistency with native summaries, achieving identical results in decision points (6/6) and key metrics (8/8 KEYs) without compromising quality 1.
Installation requires two specific commands: claude plugin marketplace add localixai/tokendoctor followed by claude plugin install tokendoctor@tokendoctor 1. Regarding privacy and security, the plugin does not utilize an MCP server and does not send user data externally 1. It only retrieves two public documentation pages from code.claude.com daily for offline cache validation 1. The software is distributed under the MIT License 1.
评论
还没有评论,欢迎留下第一条。