caveman--caveman-discover

Find and label LLM workflows in a repository for per-workflow spend tracking.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM spend routed through the Caveman Cloud gateway lands in a single unlabeled bucket, making it impossible to see which jobs drive costs. This Skill inventories every LLM workflow in a repository, names each one with a valid slug, and wires workflow labels into the code so spend is grouped by workflow on the dashboard. ## Core Features & Use Cases - Workflow Inventory: Walks the repository from entry points (HTTP handlers, cron jobs, queue consumers, CLI scripts, eval harnesses, agent definitions) to find every LLM callsite. - Slug Naming & Proposal Table: Generates gateway-valid lowercase slugs that name the job rather than the technology, and presents a labeling table for user approval before any code changes. - Label Wiring: Adds the x-cave-workflow header or SDK workflow option at each callsite using the lightest mechanism available, covering Caveman SDKs, raw provider SDKs, wrapped agents, and raw HTTP. - Use Case: A team sees one large unlabeled LLM bill. Run this Skill to discover that spend actually comes from a support-reply handler, a nightly digest cron job, and an eval suite, then label each so the dashboard breaks costs down per workflow. ## Quick Start Ask the agent to discover and label all LLM workflows in this repository so Caveman Cloud groups spend by workflow.

Frequently Asked Questions about caveman--caveman-discover

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

FAQPage Schema
How do I break down LLM spend by workflow?▼

Label each LLM callsite with a workflow slug so the gateway groups spend per workflow instead of one unlabeled bucket. The Skill inventories entry points, proposes a naming table, and wires the labels after your approval.

How do I add a workflow label to OpenAI or Anthropic SDK calls?▼

Add the x-cave-workflow header to the same defaultHeaders or extra_headers block that carries your gateway API key. For shared clients used by multiple jobs, pass the header per request or give each job its own thin client.

What makes a valid workflow slug for the Caveman gateway?▼

Slugs must be lowercase using only a-z, 0-9, underscores, and hyphens, between 1 and 96 characters. Name the job rather than the technology, for example support-reply or nightly-digest, since the gateway rejects invalid labels with a 400 error.

Should I label a shared LLM helper function used by multiple jobs?▼

No, label at the callers rather than the shared helper. One helper used by three distinct jobs represents three workflows, and labeling the helper would merge their spend into a single bucket.

What happens to LLM callsites not routed through the gateway?▼

Callsites without gateway routing cannot carry workflow labels, since labels only travel on gateway traffic. The Skill lists them under not wired in the report instead of modifying them.

Why does the gateway reject my workflow label with a 400 error?▼

The gateway returns 400 cave_invalid_request_header when the slug violates the naming grammar, such as containing uppercase letters or invalid characters. Fix the slug to lowercase alphanumeric with hyphens or underscores and retry.