caveman-discover

Find and label LLM workflows in a repository to break down gateway spend by workflow.

1|Updated May 3, 2021
One-click install
npx skills add https://github.com/leogurja/dotfiles --skill caveman-discover-leogurja
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caveman-discover
Source: https://github.com/leogurja/dotfiles/tree/main/home/dot_agents/skills/caveman-discover
Command: npx skills add https://github.com/leogurja/dotfiles --skill caveman-discover-leogurja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM traffic routed through the Caveman gateway without workflow labels all lands in a single unlabeled-workflow bucket, making it impossible to see which jobs drive spend. This Skill inventories every LLM entry point in a repository, proposes a labeling table, and wires workflow labels into the code after user approval. ## Core Features & Use Cases - Workflow Inventory: Walks the repository from entry points (HTTP handlers, cron jobs, CLI scripts, eval harnesses, agent definitions) to identify each distinct LLM job. - Slug Naming and Labeling: Generates gateway-valid lowercase slugs and wires them via SDK workflow options, x-cave-workflow headers, or CAVE_WORKFLOW environment variables. - Approval-Gated Changes: Proposes a labeling table first and only edits code after the user agrees, keeping the operation idempotent on re-runs. - Use Case: A team sees one large unlabeled LLM bill; run this Skill to label support-reply, nightly-digest, and eval-suite callsites so each job's spend appears separately on the dashboard. ## Quick Start Ask the agent to discover and label all LLM workflows in this repository so Caveman Cloud spend is grouped by workflow.

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?▼

Label each LLM callsite with a workflow slug so the gateway attributes spend per job. This Skill inventories your repository's LLM entry points, proposes a labeling table, and wires the labels after you approve.

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 the 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, 1-96 characters, using only a-z, 0-9, underscores, and hyphens. Name the job rather than the technology, such as support-reply or nightly-digest, since invalid slugs are rejected with a 400 error.

Does the skill change code without my approval?▼

No. It presents a proposed labeling table first and only edits code after you agree. Re-running it on an already-labeled repository is idempotent and changes nothing.

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

They are not labeled, because workflow labels only travel on gateway traffic. The Skill lists them under a not-wired section in its report and points to the setup skill for routing configuration.