caveman

命令行工具

JuliusBrussee/caveman

让 AI 说原始人语,节省 65% token。

项目简介

适用于 Claude Code 等 AI 编程助手的技能,通过使用简练的原始人语言,平均压缩约 65% 的输出 token。保持技术准确性的同时大幅降低成本和提升速度。支持多种压缩级别,兼容 30 多种 AI 代理。

README 预览

\n  \n\n\ncaveman\n\n\n  why use many token when few do trick\n\n\n\n  \n  \n  \n\n\n\n  Before/After •\n  Install •\n  What You Get •\n  Benchmarks •\n  Full install guide\n\n\n---\n\nA [Claude Code](https://docs.anthropic.com/en/docs/claude-code) skill/plugin (also Codex, Gemini, Cursor, Windsurf, Cline, Copilot, 30+ more) that makes agent talk like caveman — cuts **~75% of output tokens**, keeps full technical accuracy. Brain still big. Mouth small.\n\n## Before / After\n\n\n\n\n\n### 🗣️ Normal Claude (69 tokens)\n\n> "The reason your React component is re-rendering is likely because you're creating a new object reference on each render cycle. When you pass an inline object as a prop, React's shallow comparison sees it as a different object every time, which triggers a re-render. I'd recommend using useMemo to memoize the object."\n\n\n\n\n###  Caveman Claude (19 tokens)\n\n> "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."\n\n\n\n\n\n\n### 🗣️ Normal Claude\n\n> "Sure! I'd be happy to help you with that. The issue you're experiencing is most likely caused by your authentication middleware not properly validating the token expiry. Let me take a look and suggest a fix."\n\n\n\n\n###  Caveman Claude\n\n> "Bug in auth middleware. Token expiry check use `\n\n\n\n**Same fix. 75% less word. Brain still big.**\n\n```\n┌─────────────────────────────────────┐\n│  TOKENS SAVED          ████████ 75% │\n│  TECHNICAL ACCURACY    ████████ 100%│\n│  SPEED INCREASE        ████████ ~3x │\n│  VIBES                 ████████ OOG │\n└─────────────────────────────────────┘\n```\n\nPick your level of grunt — `lite` (drop filler), `full` (default caveman), `ultra` (telegraphic), or `wenyan` (classical Chinese, even shorter). One command switch. Cost go down forever.\n\n**Speak your tongue.** Caveman keep your language. You write Portuguese, caveman grunt Portuguese. Spanish, French, same. Compress the *style*, not the language. Code, command, e

常见问题 (5)

故障排除
I'm not familiar with a proxy called "Caveman" or the error code `cave_route_not_found` — these may be internal/proprietary tools, or something released after my knowledge cutoff — so I can't give you exact config syntax. But the failure pattern you're describing is a common one with OpenAI-compatible proxies, so here's the general diagnosis and fix: **What's happening** Many clients call `GET /v1/models` at startup to fetch model metadata (including context window size). If the proxy only has routes registered for `POST /v1/chat/completions` (and maybe `/v1/embeddings`, etc.) but not `GET /v1/models`, it returns 404. The client then falls back to a default context limit — in your case 256k. **Things to check/fix, in order of likelihood:** 1. **Route coverage**: Confirm the proxy has a route for `GET /v1/models`, not just chat completions. Many proxy configs register routes per-endpoint and per-method, and `/v1/models` is often forgotten. Add a passthrough route forwarding it to the upstream API. 2. **Method matching**: If routes are matched by path *and* method, make sure GET is allowed on the `/v1` prefix — a wildcard route that only permits POST will 404 a GET. 3. **Path rewriting**: Check whether the proxy strips or rewrites the `/v1` prefix before forwarding. If the upstream expects `/v1/models` but receives `/models` (or vice versa), you'll get a 404 even with a route configured. 4. **Auth header forwarding**: Some proxies drop the `Authorization` header on non-completion endpoints, and some upstreams return 404 (rather than 401) for unauthenticated requests to `/v1/models`. 5. **Client-side workaround**: If you can't modify the proxy, look for a setting in Hermes to manually specify the context length or disable model metadata auto-detection. Most clients that do this auto-discovery also let you pin the context size in config. **To verify the fix**, bypass the client and test directly: ``` curl -H "Authorization: Bearer $KEY" http://<proxy-host>/v1/models ``` If that returns the model list, Hermes should pick up the real context size on its next startup/refresh. If you can share the proxy's route config (sanitized) or its docs, I can point at the specific change needed.

将 Caveman 代理二进制文件升级到 bin-v2.1.0 或更高版本(包含在 Caveman 3.2.0 版本中),然后重启代理。此版本会为 OpenAI、Anthropic 和 OpenAI 兼容的挂载点转发 GET /v1/models 和 GET /v1/models/{id} 请求,包括 /w/<agent>/v1,并根据协议选择适配器。使用以下命令验证:

curl -H "Authorization: Bearer $KEY" http://127.0.0.1:8787/w/hermes/v1/models

如果无法升级,可在 Hermes 的 config.yaml 中覆盖上下文窗口:

custom_providers:
  - name: caveman
    base_url: "http://127.0.0.1:8787/w/hermes/v1"
    context_length: 1000000

升级后请移除此覆盖配置,以便 Hermes 动态读取上游的 context_length。仅更新 npm CLI 可能不会更新代理二进制文件;请运行 caveman setup --install 并手动重启代理。

来源 Issue #1187
故障排除
如何修复 Hermes agent 的版本漂移问题,即已安装的 0.21.4 超过了固定的已测试版本 0.19.1?

验证 hermes@0.21.4 封装是否正确,然后将 agents/profiles/hermes.json 中的 tested_agent_version 从 0.19.1 更新为 0.21.4。一致性 CI 的锁定版本由此值派生,并由 compile.mjs 强制执行。如果该配置文件中包含 last_verified_at 和 verified_by,请一并更新这些字段,然后重新运行一致性工作流。

来源 Issue #1054
故障排除
当安装的 pi 1.0.4 超出固定的测试版本 1.0.2 时,如何修复代理漂移问题?

验证 pi@1.0.4 能够正确封装并通过一致性测试。然后更新 agents/profiles/pi.json,将 tested_agent_version 设置为 1.0.4;一致性 CI 的固定版本由此值派生,并由 compile.mjs 强制执行。如果配置文件中包含 last_verified_at 和 verified_by 字段,也一并更新这些字段,然后运行一致性工作流以清除漂移。

来源 Issue #1194
故障排除
如何修复已安装版本 2.1.292 超过固定的已测试版本 2.1.289 所导致的 Claude 智能体漂移问题?

验证新的 Claude 版本可正常运行,然后更新 profile 中的版本锁定。Claude Code 2.1.292 已在 Node 22.22.0 上完成探测,启动正常;通过 ANTHROPIC_BASE_URL 到 POST /v1/messages?beta=true 的路由重定向已正常完成。在 agents/profiles/claude.json 中,将 tested_agent_version 设置为 2.1.292,然后更新 last_verified_at 和 verified_by(如果存在)。一致性 CI 的版本锁定派生自该字段,并由 compile.mjs 强制执行。版本升级已在 PR #1196 中合并。请注意,安装命令仍未锁定版本:npm i -g @anthropic-ai/claude-code。

来源 Issue #1192
故障排除
如何修复 qwen agent 版本漂移:已安装的 0.25.0 超过了固定的已测试版本 0.24.7?

验证 qwen@0.25.0 能够正确封装并运行。然后更新 agents/profiles/qwen.json,将 tested_agent_version 从 0.24.7 设置为 0.25.0。如果存在 last_verified_at 和 verified_by 字段,请一并更新。一致性 CI 的固定版本(pin)派生自该字段,并由 compile.mjs 强制执行,因此在完成更改后需重新运行代理一致性工作流,以清除漂移报告。

来源 Issue #1195