caveman-setup
하는 일
이 스킬은 프로젝트의 AI 호출을 Caveman 게이트웨이를 통해 보내, 결과를 바꾸지 않고 전송 내용과 비용을 측정합니다. LLM 지출을 파악하고 싶은 개발자를 위한 것입니다.
사용하는 경우
- ✓저장소에서 LLM 지출을 측정하고 싶을 때.
- ✓앱 동작을 바꾸지 않고 Caveman 추적을 설정하고 싶을 때.
- ✓리팩터링이 아니라 최소한의 검증된 통합이 필요할 때.
스킬 링크
https://github.com/JuliusBrussee/caveman/blob/main/skills/caveman-setup/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 저장소의 모든 LLM 요청이 측정되도록 Caveman 게이트웨이를 거치게 해 주고, 앱의 동작은 그대로 유지해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 게이트웨이 주소와 키를 받아, 기존 설정을 통해 각 실제 AI 호출 지점을 업데이트합니다. 키는 환경 변수에 보관하고, 확인한 내용을 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
You are wiring this repository through the Caveman gateway. Caveman is a byte-preserving LLM proxy: in record mode it measures what your app sends and what it costs, and changes nothing else. Your job is a minimal, verified integration — not a refactor.
The prompt that sent you here provides four values. Refer to them as:
GATEWAY— the gateway base URL (e.g.https://gateway.caveman.soorhttp://127.0.0.1:8787)CAVE_API_KEY— the gateway auth secret (treat like any API key: env var only, never committed, never printed in full)PROVIDER_KEYS—stored(provider keys live encrypted in Caveman Cloud) orbyok(this app sends its own provider key per request)DASHBOARD— the dashboard base URL (e.g.https://app.caveman.so)
If any value is missing, stop and ask for it. Do not guess a URL or mint a key.
Rules (non-negotiable)
- Coherent integration. Wire every live LLM callsite through existing configuration and responsible seams. Touch each layer correctness requires. No drive-by refactors or formatting sweeps; add an abstraction only when it clarifies ownership or lowers lifecycle cost.
- Secrets stay in env vars.
CAVE_API_KEYgoes into the env file the repo already uses (.env,.env.local, …). If that file isn't gitignored, add it to.gitignoreand say so. Never hardcode the key in source. - Report only what you observed. The final report states the HTTP status and usage numbers from the real verification response — never assumed success. If verification fails, report the failure template instead.
- Record mode only. You are adding measurement. You do not enable any optimization, and you do not claim any savings — verified savings are $0 until an optimizer is explicitly turned on and passes its eval gate.
- Provider keys are not your business. With
PROVIDER_KEYS: storedyou never see one. Withbyok, the app's existing provider key stays exactly where it already is.
Step 1 — Find every live LLM callsite
Read dependency files (package.json, requirements.txt, pyproject.toml,
go.mod, lockfiles) and search the source for LLM clients:
- SDK imports:
openai,@anthropic-ai/sdk,anthropic,ai+@ai-sdk/*(Vercel),langchain*,litellm,google-genai/@google/genai,crewai,pydantic_ai,openai-agents/agents - Raw HTTP to
api.openai.com,api.anthropic.com,generativelanguage.googleapis.com - Existing base-URL env vars:
OPENAI_BASE_URL,OPENAI_API_BASE,ANTHROPIC_BASE_URL,GEMINI_BASE_URL,GOOGLE_GEMINI_BASE_URL
List what you found (file:line per callsite) before changing anything. If you find no LLM callsites, stop and report the "nothing to wire" template at the end of this file — do not invent an integration.
Step 2 — Pick the app slug
One slug names this app in the gateway path: GATEWAY/w/<app>. Derive it from
the package/module name (e.g. support-bot, acme-api). Grammar:
lowercase [a-z0-9] first, then [a-z0-9._-], max 64 chars. Spend for this
whole app groups under that slug on the dashboard.
Step 3 — Wire each callsite
The pattern is always the same: base URL → the gateway with /w/<app>,
plus one auth header. Gateway auth is x-cave-api-key: CAVE_API_KEY
(Authorization: Bearer CAVE_API_KEY also works where a header is awkward).
With PROVIDER_KEYS: byok, also send x-cave-upstream-key: <the provider key the app already uses>.
Two facts that make the wiring safe (both are gateway-enforced, not hopes):
the gateway rebuilds upstream auth headers from scratch, so a client's
Authorization/x-api-key value is never forwarded to the provider; and with
stored, upstream auth comes from the encrypted connection server-side. So in
stored mode, where an SDK insists on an api-key parameter, set it to the
Cave key — it authenticates the gateway and goes no further.
Exact shapes (use the one matching each callsite — these are the product's published recipes, not suggestions):
OpenAI SDK (TS) — Chat Completions and Responses both route through:
const client = new OpenAI({
baseURL: `${process.env.CAVE_GATEWAY_URL}/w/<app>/openai/v1`,
apiKey: process.env.OPENAI_API_KEY, // byok: unchanged · stored: use CAVE_API_KEY
defaultHeaders: {
"x-cave-api-key": process.env.CAVE_API_KEY!,
// byok only:
"x-cave-upstream-key": process.env.OPENAI_API_KEY!,
},
});
OpenAI SDK (Python) — same shape: `base_ur
자주 묻는 질문
앱 동작이 바뀌나요?
설명에 따르면 기록 모드에서 게이트웨이는 측정만 하고 다른 것은 바꾸지 않습니다.
API 키는 어디에 두나요?
버전 관리에서 제외된 환경 파일에 두며, 소스 코드에는 절대 넣지 않습니다.
값이 없으면 어떻게 하나요?
스킬은 추측하지 않고 멈춰서 필요한 값을 요청합니다.
상세 정보
작성자의 원본 설명
Wire a repository through the Caveman Cloud gateway so every LLM request is measured, with no behavior change. Use for "set up caveman" or adding LLM spend observability.
repo: JuliusBrussee/caveman
인기도
- GitHub 스타
- 117k
- 순위
- #754
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
cavecrew
117k에이전트가 검색, 작은 수정, 변경 검토를 간결한 하위 에이전트에 맡길 시점을 골라 주 대화의 공간을 아끼도록 돕습니다.
caveman-compress
117kCLAUDE.md나 할 일 목록 같은 메모 파일을 입력 토큰을 줄이기 위해 짧은 caveman 스타일로 줄이도록 에이전트를 돕습니다.
caveman-stats
117k에이전트가 Claude Code 세션이 사용한 출력 및 캐시 읽기 토큰 수를 모드별로 묶어 보여 주도록 돕습니다.
caveman
117k에이전트가 기술적 사실은 모두 유지하면서 군더더기를 뺀 짧고 직접적인 스타일로 답하도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.