save-token
yesilsin-netizen/save-token · skills.sh
Open source Repository Open in the app JSON README (API)
About
Skill publicada por yesilsin-netizen/save-token no skills.sh. Instale com: npx skills add yesilsin-netizen/save-token@save-token
Details
- Kind
- Agent skills
- Publisher
- yesilsin-netizen
- Origin
- skillssh
- Category
- ferramentas
- Stars
- 1
- Last push
- 2026-03-16T07:57:03Z
- Repository state
- ativo
- License
- MIT
- Added
- 2026-10-07 06:30:02
- Updated
- 2026-10-07 06:30:02
- Origin id
yesilsin-netizen/save-token/save-token
README
# 💰 Save Token | Token 节省器 [](https://skills.sh) [](https://clawhub.ai/yesilsin-netizen/save-token) [](https://github.com/yesilsin-netizen/save-token) [](LICENSE) [](https://github.com/yesilsin-netizen/save-token) > **Save tokens, save money, save the world.** > > 指导 Agent 如何通过避免重复上下文来节省 Token 的技能。 ## 🚀 快速开始 ### 安装 ```bash # 推荐:通过 Skills CLI 全局安装 npx skills add yesilsin-netizen/save-token -g # 或:通过 Git 克隆 git clone https://github.com/yesilsin-netizen/save-token.git # 或:通过 ClawHub CLI clawhub install save-token ``` ### 验证安装 ```bash # 检查是否安装成功 npx skills list -g | grep save-token ``` ### 快速使用 Agent 会在以下情况自动应用节省策略: - 对话超过 10 轮 - 文件被多次读取 - 上下文超过 5000 字符 - 用户提到 "token" / "成本" ## 📋 四大节省策略 ### 1️⃣ 摘要代替重发 ```markdown ❌ Bad: Re-sending 50 turns of conversation (10,000+ tokens) ✅ Good: "Previous context: User was analyzing stock investment strategies. Key decisions made: prioritize low P/E, check cash flow. Now focusing on: specific company analysis." ``` **节省效果**:长对话节省 30-50% Token ### 2️⃣ 引用代替重复 ```markdown ❌ Bad: Reading the same 200KB file again ✅ Good: "As we found earlier in the file, the revenue is $50M..." ``` **节省效果**:重复文件读取节省 80%+ Token ### 3️⃣ 去重相同块 ```markdown ❌ Bad: Same error message appears 5 times (500 chars × 5 = 2500 chars) ✅ Good: "[Error message appeared 5 times, showing once]: Connection timeout..." ``` **节省效果**:错误消息去重节省 60%+ Token ### 4️⃣ 压缩冗长输出 ```markdown ❌ Bad: Including full 1000-line log file ✅ Good: "Log file (1000 lines): Key errors on lines 45, 78, 234. Pattern: Connection drops every 5 minutes. Full log available if needed." ``` **节省效果**:日志文件压缩节省 70-90% Token ## 💰 预期节省效果 | 场景 | 节省比例 | |------|---------| | 长对话(>10轮) | 30-50% | | 重复文件读取 | 80%+ | | 错误消息去重 | 60%+ | | 日志文件压缩 | 70-90% | ## 📖 完整文档 查看 [SKILL.md](https://github.com/yesilsin-netizen/save-token/blob/HEAD/SKILL.md) 获取: - 详细的策略说明 - 完整的使用示例 - 最佳实践指南 ## 🔗 相关链接 - 📚 [完整文档](https://github.com/yesilsin-netizen/save-token/blob/HEAD/SKILL.md) - 🐛 [问题反馈](https://github.com/yesilsin-netizen/save-token/issues) - 💬 [讨论区](https://github.com/yesilsin-netizen/save-token/discussions) - 🏠 [ClawHub 主页](https://clawhub.ai/yesilsin-netizen/save-token) ## 🤝 贡献 欢迎贡献新的节省策略! 1. Fork 本仓库 2. 添加新的策略或优化现有策略 3. 提交 Pull Request ## 📝 许可证 [MIT License](https://github.com/yesilsin-netizen/save-token/blob/HEAD/LICENSE) © 2026 yesilsin-netizen --- **⭐ 如果这个技能对你有帮助,请给个 Star!**