✳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]

查看原始來源 ↗

更多類似作品