caveman-discover

Inventories LLM workflows in a repository and wires workflow labels onto gateway requests.

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/bittlinkm/claude-setup --skill caveman-discover-bittlinkm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-discover
Source: https://github.com/bittlinkm/claude-setup/tree/main/skills/caveman-discover
Command: npx skills add https://github.com/bittlinkm/claude-setup --skill caveman-discover-bittlinkm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM spend routed through the Caveman gateway lands in one anonymous unlabeled-workflow bucket, making it impossible to attribute cost to the jobs the code actually performs. This Skill finds every LLM workflow in a repository, names each one with a valid slug, and wires the label into the callsite so spend is grouped by workflow. ## Core Features & Use Cases - Workflow inventory: Walks entry points (HTTP handlers, cron jobs, queue consumers, CLI scripts, eval harnesses, agent definitions) to find every job that calls an LLM. - Slug naming and labeling: Proposes gateway-valid slugs ([a-z0-9_-], 1-96 chars) and wires labels via SDK options, x-cave-workflow headers, caveman wrap --workflow flags, or raw HTTP headers. - Proposal-first workflow: Presents a labeling table for user approval before changing code, stays idempotent on re-runs, and verifies one labeled path after applying. - Use Case: A service with a support-reply bot, a nightly digest cron, and an eval script all calling OpenAI through the gateway gets three labeled workflows so the dashboard shows spend per job instead of one bucket. ## Quick Start Ask the assistant to discover the LLM workflows in this repository and propose a labeling table for Caveman Cloud.

Frequently Asked Questions about 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 in Caveman Cloud?

Run workflow discovery on the repository to inventory every LLM-calling job, approve the proposed labeling table, and wire each slug into its callsite. Labeled spend then appears on the dashboard at /activity?tab=workflows as each workflow runs.

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

Add an x-cave-workflow header with your slug to the same defaultHeaders or extra_headers block that carries x-cave-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, match [a-z0-9_-], and be 1-96 characters long. Name the job rather than the technology, such as support-reply or nightly-digest, since the gateway rejects invalid labels with a 400 cave_invalid_request_header error.

Does workflow discovery change my code automatically?

No. The skill presents a labeling table and waits for your approval before editing anything. Re-running it on an already-labeled repository is idempotent and changes nothing.

What happens to LLM calls not routed through the Caveman gateway?

They cannot be labeled, because workflow labels only travel on gateway traffic. The skill lists these callsites under "not wired" in its report and leaves routing to the caveman-setup skill.