✳ClaudeModsClaude Code 模组目录
☰
● 0 人在线 · 浏览 0 次
+ 提交作品
← 返回作品集
Reddit 帖子 · 用量与成本 / 工具与集成 / 工作流与 CI

DensePack:将文本打包成图像以半价节省Claude Code Token成本

DensePack将Read、Bash输出、Word文件及子代理报告等文本打包为带颜色编码和图例的图像,代理读取图像即可按约一半的Token成本消费原始文本内容。基准测试显示其总会话节省超过所有流行插件,且最新版已通过Anthropic插件

FFabiangzt@Fabiangzt
DensePack:将文本打包成图像以半价节省Claude Code Token成本图片1
已翻译

关于这个 mod

DensePack是一个Claude Code插件,通过将文本文件(如Read命令读取的文件、Bash输出、doc/docx文档以及子代理报告)打包成颜色编码的图像,让代理以约原文本50%的Token成本读取同等内容。该图像包含两行图例,能够从图像中逐字节重建代码文件。项目提供可复现的基准测试证明节省效果与准确性,并包含文本副本作为回退验证。作者使用一个月20x Max订阅进行测试与调优,已运行超万次基准,近期发布了1.3.3版,1.4版将支持在更早期阶段拦截其他插件的hook及将其他插件/技能转为DensePack图像。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

git clone https://github.com/Fabian-Galvez/DensePack && cd DensePack # 后续请参照仓库README进行安装配置
原文 / README

FIRST: Big shoutout to the people that helped DensePack! I want to thank the 8 stargazzers that believed in this from the start. I hope you guys see this post or reach out to me directly (so I can personally give you updates) and continue to follow the project because DensePack is NOT like ordinary plugins or skills that may become outdated over time. It's easy to see that DensePack will only continue to improve with time as OCR and AI vision capabilities in general continue to improve. DensePack packs text into images that your agent can read accurately without compressing or trimming anything, and automatically hands your agent the image to read for half the token cost. It packs text files read with Read, Bash output, Word files (doc/docx), and it also packs any subagent report so that your main agent gets an image and their context stays small. The most recent savings benchmarks show savings for a small task and the savings only grow and compound from there. Your agent reads the image and tokenizes the same text as the text file for ~50% the price. Every future Cache read is charged against that 50% image. Many published papers claim that python files can't be read accurately let alone rebuilt byte identically from the image, but DenesPack images use a unique color coding and and include a 2 row legend that has allowed it to rebuild code files byte identical from the image. It's ok to be skeptical. It's ok to think that this isn't accurate and will mess things up. I didn't believe it myself which is why I made the Benchmarks easily reproducible and why I made sure to add fallbacks like keeping a copy of the text in case your agent needs to verify the text. The benchmarks prove savings and accuracy compared to the benches without DensePack. I have been building non stop with DensePack packing everything possible. I even used it to help me improve DensePack itself from v1.0 and on! I see no negative impact or change. I have had to double check I didn't lose connection because my usage bar seems to be frozen sometimes, but it's just the compounding savings effect DensePack has. P.S. I made a Reddit purely to help people save cuz Anthropics prices suck. I worked hard to make something that is secure, works and saves. I used a whole months worth of 20x Max usage testing, fine tuning and running benchmarks to make sure I present the community with a project that they can use and isn't slop. It would not be a lie to say that I have run well over 10,000 benchmarks by now. DensePack works. It works so well that even when it adds an extra turn to verify a line of text, it STILL saves. And it just cleared the initial phases of Anthropic's plugin submission so I hope that this will land in the official Marketplace soon as well. This is my first real project since transitioning into the tech sphere so while it may not seem like much to some, I am extremely proud of the 8 stars that the project has received and how far it's come since being released 2 weeks ago. That being said, I only made a Reddit to share what is helping me save because I hate gate-keeping, but I have not had the best experience here and keep being insulted or talked down to while trying to help or ask questions to understand Reddit better. I recently had a first positive response from a mod and i'm thankful. I just don't know if this is common for new Reddit users and even though I am very appreciative for the few people that were kind, I don't think Reddit is for me so this will probably be my last Reddit post! I say probably because I have an image of the ADS-STE 100 English standard with it's whitelist of words that I use as my style rules which has helped improve the AI sounding output so its more human. I hadn't decided if I would make it its own post but I will probably put it in the comments and be done. You won't need the plugin for this premade image and can just feed to your ai to fix the output for cheap! Thank you and Future upgrades: Thank you to the people that helped, gave honest feedback and tried the plugin! Please update your version! 1.3.3 has new updates and keep an eye out for 1.4!! You can use many plugins with DensePack as it is now (I've tried Ponytail, Caveman, etc). DensePack will keep packing but most plugins have hooks that force their skills to be read before DensePack has had a chance to pack them. v1.4 fixes this with a feature that lets you use those plugins at half the price! It works now, but I won't release it until I know it is secure like everything up until now. New AGENTS CLAUDE and MEMORY md file upgrades are coming along with the ability to turn other pugins and skills into DensePack images. 1.4 may also include a new RAG framework method that utilizes DensePack images but its still a prototype so most likely will be part of 1.5 so i can push the other upgrades first. I am happy to answer questions in the comments. If you want to keep up with the project, consider giving it a star and message me directly! I will personally update you on all things DensePack. Not a newsletter or spammy email or anything like that, more personal direct messages from me so I will probably only be able to keep up with ~20-40 folks for now while I continue my job search. I have nothing to gain, I don't charge for anything, I just want to build community with like minded individuals and help others build more. If that resonates with you, feel free to reach out! FIN submitted by /u/Fabiangzt [link] [comments]

查看原始来源 ↗

更多类似作品