caveman--caveman-setup

Wire repository LLM callsites through the Caveman gateway for spend measurement.

Updated Dec 3, 2025
One-click install
npx skills add https://github.com/hhenrichsen/dots --skill caveman-caveman-setup-hhenrichsen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caveman--caveman-setup
Source: https://github.com/hhenrichsen/dots/tree/main/dot_skills/caveman/caveman-setup
Command: npx skills add https://github.com/hhenrichsen/dots --skill caveman-caveman-setup-hhenrichsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams shipping LLM-powered code have no visibility into what each request costs. This Skill integrates a repository with the Caveman Cloud gateway so every LLM request is measured and priced, without changing any model-visible behavior. ## Core Features & Use Cases - Callsite Discovery: Scans dependency files and source code for LLM SDKs (OpenAI, Anthropic, Vercel AI SDK, LangChain, LiteLLM) and raw provider HTTP calls before changing anything. - Gateway Wiring: Rewrites each callsite's base URL to the gateway path with an app slug and adds the x-cave-api-key auth header, supporting both stored and byok provider-key modes. - Verified Integration: Sends one real verification request and reports the actual HTTP status and token usage, with verbatim failure templates for unreachable gateways, invalid keys, and routing errors. - Use Case: A developer with a Python support-bot using the OpenAI SDK asks to set up Caveman; the Skill rewires the client base URL, stores the key in the repo's env file, verifies with one ping request, and reports the measured tokens. ## Quick Start Ask the AI to set up Caveman in this repository using the gateway URL, API key, provider-key mode, and dashboard URL from your setup prompt.

Frequently Asked Questions about caveman--caveman-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add LLM spend tracking to my repository?▼

Run the Caveman setup flow: it finds every LLM callsite, points each base URL at the gateway with an app slug, and adds the x-cave-api-key header. One verification request confirms measurement is live on the dashboard.

Which LLM SDKs does the Caveman gateway support?▼

Published recipes cover OpenAI (TypeScript and Python), Anthropic, Vercel AI SDK, LangChain/LangGraph, LiteLLM, and raw HTTP. Frameworks like google-genai, crewai, and pydantic-ai are covered by integration docs fetched during setup.

Does routing through the gateway change my model's behavior?▼

No. Record mode is byte-preserving: it measures what the app sends and what it costs, and changes nothing else. No optimization is enabled and verified savings remain $0 until an optimizer is explicitly turned on.

What is the difference between stored and byok provider keys?▼

With stored mode, provider keys live encrypted in Caveman Cloud and the app only sends the Cave key. With byok, the app keeps its existing provider key and sends it per request via the x-cave-upstream-key header.

Why did Caveman verification return a 401 or 404 error?▼

A 401 cave_invalid_api_key means the gateway rejected the key; mint a new one at the dashboard and update the env file. A 404 cave_route_not_found usually means a malformed app slug or a path that doesn't match the SDK's protocol.

Where is the Caveman API key stored in my repo?▼

The key goes into the env file the repo already uses, such as .env or .env.local, and is referenced from code as an environment variable. It is never hardcoded in source, and the env file is added to .gitignore if needed.