编程 Claude Code 按 token 计费太贵,这个 Go 代理让 Claude 说「原始人英语」,省 65% 开销

2026-09-12 09:51:23

Claude Code 按 token 计费太贵,这个 Go 代理让 Claude 说「原始人英语」,省 65% 开销

Token 费用:AI 编程的隐性成本

2026 年,AI 编程助手成了标配。Claude Code、Cursor、GitHub Copilot,每天用得不亦乐乎。

但有个问题:token 费用。

Claude Code 按 token 计费。一个复杂的代码重构,可能消耗几十万 token。一个月下来,费用够吃好几顿饭。

为什么这么贵?

  • AI 喜欢说废话:"Certainly! I'd be happy to help you with that..."
  • 解释太详细:一个简单的函数,解释半页纸
  • 客套话多:"Great question!" "That's an interesting approach..."
  • 重复内容:同一件事说三遍

你付钱买的是代码和解决方案,不是英语作文。

Caveman 的做法:让 Claude 说「原始人英语」。

Caveman 是什么

项目信息:

项目信息
GitHubgithub.com/JuliusBrussee/caveman
Star热门(GitHub Trending #1)
语言Go
协议开源
作者Julius Brussee(19 岁,荷兰)
定位Claude Code token 压缩 skill
核心特性原始人英语风格,节省 65% token
工作原理本地代理,压缩输入输出

Caveman 做的事情:

  1. 风格转换:让 Claude 用简短、直接的「原始人英语」回复
  2. 去废话:去掉客套、冗余解释、重复内容
  3. 本地代理:在 Claude 和 API 之间插入压缩层
  4. 节省 token:平均节省 65% 的 token 开销

一个 Claude Code skill,安装即用。

安装

前置条件

  • Claude Code 已安装
  • Go 1.21+(用于编译代理)

安装步骤

# 克隆仓库
git clone https://github.com/JuliusBrussee/caveman.git
cd caveman

# 编译代理
go build -o caveman-proxy ./cmd/proxy

# 安装 skill 到 Claude Code
claude skill install ./skill

# 启动代理
./caveman-proxy --port 8080

配置 Claude Code

在 Claude Code 配置中指定代理:

{
"apiBaseUrl": "http://localhost:8080"
}

完成。现在 Claude 会用「原始人英语」回复你。

效果对比

普通 Claude 回复

Certainly! I'd be happy to help you with that function.

Here's the refactored version of your code:
[代码]

Let me explain what I did:
1. First, I noticed that the loop could be optimized...
2. Additionally, I removed the unnecessary variable...
3. Furthermore, the error handling could be improved...

I hope this helps! Let me know if you have any questions or need further clarification.
Great question, by the way!

Token 消耗:约 200 tokens

Caveman Claude 回复

function better now.
[代码]

changed:
- loop faster
- removed unused var
- fixed error handling

need more? ask.

Token 消耗:约 70 tokens

节省:65%

工作原理

Caveman 是一个本地代理,插入在 Claude Code 和 Anthropic API 之间。

Claude Code → Caveman Proxy → Anthropic API
↓
压缩 prompt
压缩 response

压缩 Prompt

Caveman 在发送 prompt 前,注入系统指令:

You are Caveman. You speak like caveman.
Rules:
- No filler words
- No pleasantries
- No long explanations
- Short sentences only
- Get to point fast
- "why use many token when few token do trick"

压缩 Response

Caveman 分析 Claude 的回复,进一步压缩:

  • 去掉 "Sure!" "Certainly!" 等开头
  • 压缩解释性文字
  • 保留代码和关键信息
  • 简化句子结构

字节级精确

压缩是字节级精确的,不会改变语义。代码、数字、关键信息原样保留。

实际使用场景

场景 1:代码重构

你:重构这个函数,提高性能

普通 Claude:

"Certainly! I'd be happy to help you refactor this function for better performance. Let me analyze the current implementation and suggest improvements...[500 字解释][代码]I hope this helps! Let me know if you need further clarification."

Caveman Claude:

"function faster now.
[代码]

changed:
- O(n²) → O(n)
- removed redundant loop
- cache results

3x faster."

场景 2:Debug

你:这个报错什么意思?

普通 Claude:

"Great question! Let me explain this error in detail. The error you're seeing is a common issue that occurs when...[300 字解释]To fix this, you can...[解决方案]I hope this clears things up! Feel free to ask if you have more questions."

Caveman Claude:

"error = null pointer. line 42.
fix:
if obj != nil {
obj.DoSomething()
}
done."

场景 3:代码解释

你:解释这段代码

普通 Claude:

"Absolutely! Let me walk you through this code step by step.This function takes...[500 字详细解释每一行]In summary, this code does X, Y, and Z.Great code, by the way! Well written."

Caveman Claude:

"code do:
1. read file
2. parse json
3. filter active users
4. return list

input: file path
output: []User

simple."

适用场景

适合用 Caveman

  • 日常编码:快速问答,不需要详细解释
  • 代码重构:只要结果,不要长篇大论
  • Debug:快速定位问题,解决问题
  • Token 敏感:费用预算有限
  • 英语非母语:简单英语更好理解

不适合用 Caveman

  • 学习新技术:需要详细解释和背景知识
  • 架构设计:需要深入讨论权衡取舍
  • 代码审查:需要详细的反馈和建议
  • 文档编写:需要完整的说明文字

与其他方案对比

方案节省比例易用性适用场景
Caveman65%高(skill)日常编码
手动提示「简洁回复」30-40%偶尔使用
自定义 system prompt40-50%高级用户
换小模型50-70%质量要求低
不用 AI100%最低玩笑

Caveman 是最佳平衡:节省多,质量损失小,安装即用。

作者故事

Julius Brussee,19 岁,荷兰小伙。

他的 slogan:"I build Caveman: one compression engine, dropped in at every depth of your stack, each one cutting what your AI traffic costs."

他爸 Arjan Brussee(一位资深工程师)在 LinkedIn 上分享这个项目,满脸骄傲。

一个 19 岁的小伙,看到了 AI token 费用这个痛点,用 Go 写了一个本地代理,让 Claude 说「原始人英语」,节省了 65% 的费用。然后登上了 GitHub Trending 第一。

不足之处

语义损失。压缩后的回复可能丢失一些细微的上下文和解释。对于复杂问题,可能需要追问。

不适合学习。如果你想学习新技术或深入理解某个概念,Caveman 的简洁风格可能不够。

需要本地代理。多了一个进程要运行,增加了复杂度。

依赖 Claude Code。目前只支持 Claude Code,其他 AI 助手需要适配。

风格固定。「原始人英语」风格是固定的,不能自定义压缩程度。

结语

Caveman 是个有趣的项目。19 岁荷兰小伙,看到了 AI token 费用这个痛点,用 Go 写了一个本地代理,让 Claude 说「原始人英语」。

结果?节省 65% token,登上 GitHub Trending 第一。

"why use many token when few token do trick"

如果你也在意 Claude Code 的 token 费用,试试 Caveman。


参考链接:

  • Caveman GitHub:
  • Trendshift:
  • Product Hunt:
复制全文 生成海报 Go Claude Code AI编程 token优化 开源项目

推荐文章

程序员茄子在线接单