### [caveman:让AI以「原始人」风格回复,减少65%输出Token,82K+Stars让AI编程助手不再啰嗦](https://www.willai.cc/article/3225) **Published:** 2026-07-03T17:58:48 **Author:** hiyoho **Excerpt:** 🪨 caveman why use many token when few token do trick MIT 许可 82,695+ Stars JavaScript 2026年4月 📌 项目简介 caveman 是一款面向 30+ AI .ai-article { max-width: 900px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.8; color: #333; } .ai-article h2 { color: #1a1a2e; border-bottom: 3px solid #ffd700; padding-bottom: 8px; margin-top: 40px; font-size: 1.6em; } .ai-article h3 { color: #2d2d44; margin-top: 25px; font-size: 1.2em; } .ai-article .project-banner { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); padding: 30px; border-radius: 12px; text-align: center; margin: 25px 0; border: 2px solid #ffd700; } .ai-article .project-banner h1 { color: #ffd700; margin: 0 0 10px 0; font-size: 2em; } .ai-article .project-banner .subtitle { color: #fff; font-size: 1.1em; } .ai-article .badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.85em; margin: 3px; font-weight: 600; } .ai-article .badge-blue { background: #e3f2fd; color: #1565c0; } .ai-article .badge-green { background: #e8f5e9; color: #2e7d32; } .ai-article .badge-orange { background: #fff3e0; color: #e65100; } .ai-article .badge-purple { background: #f3e5f5; color: #7b1fa2; } .ai-article .feature-box { background: #f8f9fa; border-left: 4px solid #ffd700; padding: 20px; margin: 20px 0; border-radius: 0 8px 8px 0; } .ai-article .feature-box h3 { margin-top: 0; color: #1a1a2e; } .ai-article .comparison-table { width: 100%; border-collapse: collapse; margin: 20px 0; } .ai-article .comparison-table th { background: #1a1a2e; color: #fff; padding: 12px; text-align: left; } .ai-article .comparison-table td { padding: 10px 12px; border-bottom: 1px solid #eee; } .ai-article .comparison-table tr:nth-child(even) { background: #f9f9f9; } .ai-article .comparison-table tr:hover { background: #fff8e1; } .ai-article .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; } .ai-article .stat-card { background: linear-gradient(135deg, #1a1a2e, #16213e); color: #fff; padding: 20px; border-radius: 10px; text-align: center; border: 1px solid #ffd700; } .ai-article .stat-card .number { font-size: 2em; font-weight: bold; color: #ffd700; } .ai-article .stat-card .label { font-size: 0.9em; opacity: 0.8; margin-top: 5px; } .ai-article .tip-box { background: #fff8e1; border: 1px solid #ffd700; border-radius: 8px; padding: 15px; margin: 20px 0; } .ai-article .tip-box strong { color: #e65100; } .ai-article .eco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin: 20px 0; } .ai-article .eco-card { border: 2px solid #eee; border-radius: 10px; padding: 20px; transition: all 0.3s; } .ai-article .eco-card:hover { border-color: #ffd700; box-shadow: 0 4px 12px rgba(0,0,0,0.1); } .ai-article .eco-card h4 { margin-top: 0; color: #1a1a2e; } .ai-article code { background: #f5f5f5; padding: 2px 6px; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 0.9em; } .ai-article pre { background: #1a1a2e; color: #fff; padding: 20px; border-radius: 8px; overflow-x: auto; border-left: 4px solid #ffd700; } .ai-article pre code { background: none; color: #fff; padding: 0; } .ai-article .slogan { font-size: 1.4em; text-align: center; color: #ffd700; font-weight: bold; margin: 20px 0; font-style: italic; } # 🪨 caveman why use many token when few token do trick MIT 许可 82,695+ Stars JavaScript 2026年4月 ## 📌 项目简介 **caveman** 是一款面向 30+ AI 编程助手的输出压缩技能/插件,让 AI 以”原始人”风格回复,在不损失技术准确性的前提下减少 **65%** 输出 token。项目的灵魂口号是:**“why use many token when few token do trick”**(要那么多 token 干嘛,少点就够用)。 由 JuliusBrussee 于 2026 年 4 月发布,仅 3 个月便获得 82,695+ Stars,是本周 GitHub 趋势榜最热门项目(单日新增 2,851 Stars)。 “用更少 token 实现更多功能” — 原始人系列工具核心理念 ## ⚙️ 安装要求和过程 ### 环境要求 - **运行环境**:Node.js ≥ 18(Windows/macOS/Linux 全平台支持) - **支持的 AI 工具**:Claude Code、Codex、Gemini CLI、Cursor、Windsurf、Cline、Copilot、OpenClaw 等 30+ 主流 AI 编程助手 - **许可证**:MIT 开源许可 - **隐私**:无遥测、无数据上传、完全本地运行 ### 快速安装(一键脚本) ``` # macOS / Linux / WSL / Git Bash curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.sh | bash # Windows PowerShell 5.1+ irm https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.ps1 | iex ``` 安装过程约 **30 秒**,脚本会自动识别所有已安装的 AI 工具并分别安装,未安装的工具会自动跳过。支持重复运行(覆盖更新)。 ### 指定 AI 工具安装 ``` # Claude Code 插件市场安装 claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman # Gemini CLI 扩展安装 gemini extensions install https://github.com/JuliusBrussee/caveman # 通过技能市场给 Cursor/Windsurf/Cline 等工具安装 npx skills add JuliusBrussee/caveman -a cursor ``` ### 开启/关闭 - 开启:输入 `/caveman` 或对 AI 说 “talk like caveman” - 关闭:对 AI 说 “normal mode” - 在 Claude Code、Codex、Gemini 中,安装后首次回复就默认开启原始人模式,无需额外输入命令 ## 🌟 核心功能 #### 🪨 多等级压缩模式 支持 6 种压缩等级:`normal`(无压缩)、`lite`(轻度)、`full`(中度,默认)、`ultra`(高度)、`wenyan`(文言模式)。可随时通过 `/caveman <等级>` 切换,等级在当前会话持续生效。 #### 📊 内置统计命令 `/caveman-stats` 统计当前会话 token 使用量、累计节省 token 数、对应美元成本。加 `--share` 参数可生成可分享的统计文本,向团队展示节省成果。 #### 📝 记忆文件压缩 `/caveman-compress <文件路径>` 把 `CLAUDE.md` 等记忆文件重写为原始人风格,后续每次会话加载该文件时可减少约 **46%** 输入 token,代码、URL、路径完全保留。 #### 🔧 配套快捷命令 `/caveman-commit` 生成符合 Conventional Commits 规范的提交信息;`/caveman-review` 生成单行 PR 评论;`caveman-shrink` MCP 中间件压缩工具描述文本。 #### 🤖 原始人子代理 `cavecrew-*` 系列原始人风格子代理(调查员、构建者、审查员等),比原生代理少消耗约 **60%** token,延长主上下文可用时长。 #### 📈 状态栏实时显示 在 Claude Code 中,状态栏会显示 `[CAVEMAN] ⛏ 12.4k`,数字为累计节省的 token 量,实时更新。可通过设置 `CAVEMAN_STATUSLINE_SAVINGS=0` 关闭。 ## 📊 压缩效果对比 | 场景 | 正常模式(token) | 原始人模式(token) | 压缩率 | | --- | --- | --- | --- | | 解释 React 重新渲染 bug | 1,180 | 159 | 87% | | 修复鉴权中间件 token 过期问题 | 704 | 121 | 83% | | 配置 PostgreSQL 连接池 | 2,347 | 380 | 84% | | 架构设计:微服务 vs 单体 | 4,463 | 1,030 | 77% | | 解释 git rebase 和 merge 的区别 | 702 | 292 | 58% | | 调试 PostgreSQL 竞态条件 | 1,200 | 232 | 81% | | **平均值** | **1,214** | **294** | **65%** | 65% 平均输出压缩率 46% 记忆文件输入压缩率 60% 子代理 token 节省 30+ 支持 AI 工具数量 ## 💡 典型使用场景 ### 场景一:日常编码会话成本优化 在使用 Claude Code 进行日常开发时,开启 caveman 的 `full` 模式(默认),AI 回复会自动压缩为原始人风格——保留所有技术细节和代码逻辑,但去掉冗余的客套话、重复解释和过度详细的背景说明。一个典型的 1 小时编码会话,累计可节省 10,000+ token,相当于节省约 **$0.15-$0.50**(按 Claude API 定价)。对于重度用户,一个月可节省数十美元。 ### 场景二:长上下文会话的 token 预算管理 在进行大型重构或复杂调试时,上下文窗口是宝贵资源。caveman 通过压缩输出,让每次交互占用的上下文更少,有效**延长可用上下文长度**。配合 `/caveman-compress` 压缩项目记忆文件,还能减少每次会话的初始 token 消耗。对于使用 Claude Code 处理大型代码库(>100 个文件)的开发者,这几乎是必备工具。 ### 场景三:团队级 token 使用优化 `caveman 2`(开发中)将支持团队级别的 token 节省统计和可验证的节省凭证。对于按量付费使用 AI 编程助手的企业团队,caveman 可以提供量化数据,帮助团队了解 AI 工具的使用成本和优化空间。结合 `/caveman-stats --share` 命令,开发者可以向团队展示具体的节省成果。 ## 🚀 推荐理由 **我的使用心得:**caveman 解决了一个几乎所有 AI 编程助手用户都会遇到的痛点——**输出太啰嗦**。Anthropic 的 Claude 尤其如此,它倾向于用非常礼貌、详细、多层次的方式回答问题,哪怕你只问了一个简单的语法问题。caveman 通过让 AI “像原始人一样说话”,巧妙地在保持技术准确性的同时大幅压缩输出。 有几个方面特别值得称赞: 1. **零精度损失的设计哲学**:caveman 只压缩表达风格,不压缩技术内容。代码、报错信息、文件路径、URL 完全保留。在实际使用中,你会发现 AI 给出的解决方案质量没有任何下降,只是回复更短了。 2. **无缝集成体验**:一键安装脚本真的做到了 “30 秒开通”。安装后无需任何配置,AI 会自动以原始人模式回复。这种 “装上就用” 的体验在 AI 工具生态中难能可贵。 3. **可验证的节省数据**:`/caveman-stats` 命令提供的统计数据非常详细,包括 token 节省量、对应美元成本等。这种可量化性让工具的价值一目了然。 4. **原始人系列生态**:caveman 只是 “原始人系列” 的第一个产品。整个系列还包括 [caveman-code](https://github.com/JuliusBrussee/caveman-code)(压缩整个 AI 代理)、[cavemem](https://github.com/JuliusBrussee/cavemem)(压缩跨会话记忆)、[cavekit](https://github.com/JuliusBrussee/cavekit)(优化构建循环)等,形成了一个完整的 token 优化工具链。 当然,这个工具也有一个明显的 “缺点”——AI 的回复会变得非常 “原始人”,习惯了我之前那种详细解释的回复风格后,可能需要一点时间来适应。但一旦适应了,你会发现那些冗长的客套话确实是多余的。 **适用人群**:所有使用 AI 编程助手的开发者,尤其是那些按量付费或使用 API 的用户。对于 Claude Code 的重度用户,这是必备工具。 ## 🔗 下载地址 🌐 官网 [caveman.so](https://caveman.so/) 🐙 GitHub [JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman) 📦 npm [caveman-shrink](https://www.npmjs.com/package/caveman-shrink) 💬 Discord [加入社区](https://discord.gg/phPpe6H7F4) 文章来源:[GitHub – caveman](https://github.com/JuliusBrussee/caveman) | 数据截至 2026 年 7 月 **Tags:** AI, AI Agent, AI开源项目, AI编程, Claude Code, CLI工具, JavaScript, LLM, token优化, 开源 **Categories:** 开源项目 ---