将代码定位、一至两个文件的修改和差异审查分配给专门的辅助智能体,以简短的结构化格式接收结果,减少主智能体的上下文占用。
- 查找定义和调用位置
- 限定在一至两个文件内修改
- 审查代码差异中的缺陷
按具体工作梳理代码中使用大语言模型的流程,先提出用途标签方案,获批后再添加标签,便于在 Caveman Cloud 中按流程分别查看费用。
Find and label every LLM workflow in the repository so Caveman Cloud groups spend by workflow instead of one bucket. Use for "discover workflows" or breaking LLM spend down by workflow.
caveman-discover 查找代码中使用大语言模型的流程,按“回复咨询”“生成夜间摘要”等可辨认的工作添加标签。它检查接口入口、定时任务、脚本及实际消耗词元的评估流程,使 Caveman Cloud 能按用途汇总费用。标签设置在使用共享调用组件的各项流程上,而非共享组件本身。
适合模型费用汇总在一起、无法分辨具体用途的情况,也适合需要区分多个功能、定时任务和评估运行费用的开发者。
修改代码前会先展示标签方案,并取得用户同意。标签仅适用于经过 Caveman 网关的流量,未连接网关的流程会在报告中单独列出。标签名称有字符和长度限制,之后改名会使费用历史分开。每项流程下次运行后才会计入汇总,因此定时任务可能要到计划执行时间才显示。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。
总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月20日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
You are labeling this repository's LLM workflows for Caveman Cloud. A
workflow is a job the code performs — "answer a support ticket", "build the
nightly digest", "run the eval suite" — not a technology. Every gateway
request can carry a workflow label; unlabeled traffic all lands in one
unlabeled-workflow bucket. Your job: find the workflows, name them well,
wire the labels, and verify nothing broke.
This changes code, so it goes through the user's normal review: propose the table first, apply after the user agrees. Re-running on an already-labeled repo must change nothing (idempotent).
This skill is operator-invoked. An unlabeled-traffic Cave Plan observation is
review-only and does not create an advisory file, proposal, or Draft PR. Do not
infer that telemetry selected a callsite or authorized an edit. Independently
inventory the repository, present the labeling table, and wait for the user's
approval before changing code.
Walk the repo from its entry points, not from its imports:
scripts/, bin/, package.json scripts)One workflow = one job a human would name. Ten callsites inside the same
request handler are one workflow; one shared llm.ts helper used by three
jobs is three workflows (label at the callers, never the shared helper).
Slug grammar (the gateway enforces this): lowercase [a-z0-9_-], 1–96 chars.
Name the job, not the tech:
support-reply, nightly-digest, pr-review, eval-suite,
onboarding-emailopenai-calls (tech), main (says nothing), SupportReply (invalid),
johns-test-3 (won't age)Names are forever-ish — renaming later splits the spend history. When a job's
purpose isn't clear from the code, derive the slug from the file name and mark
it review in the table rather than inventing a purpose.
Present this table and ask to proceed:
| workflow | job | where | how it gets labeled |
|---|---|---|---|
| support-reply | answers inbound tickets | src/bot/reply.ts:41 | defaultHeaders on the reply client |
| nightly-digest | 02:00 summary job | jobs/digest.ts:12 | header on the digest client |
| eval-suite (review) | scripts/eval.ts:8 — purpose inferred from filename | scripts/eval.ts:8 | env override at invocation |
Then wire each label with the lightest mechanism available at that callsite:
workflow option, or
defaultWorkflow on the client a single-job service constructs."x-cave-workflow": "<slug>" to the same defaultHeaders /
default_headers / extra_headers block that already carries
x-cave-api-key. Shared client used by several jobs → pass the header per
call (every SDK above accepts per-request header overrides), or give each
job its own thin client.caveman wrap): --workflow <slug> flag or
CAVE_WORKFLOW=<slug> env at the invocation site (cron line, CI step).x-cave-workflow header to the request.Label the callers, keep the diff minimal, match the repo's style. If a callsite is not routed through the Caveman gateway at all, don't label it — list it under "not wired" in the report (labels only travel on gateway traffic; wiring is the caveman-setup skill's job).
Run whatever the repo already uses to exercise one labeled path (a test, a
dev script, one curl). Then confirm: the request still succeeds (the gateway
rejects an invalid label with 400 cave_invalid_request_header — fix the slug
if so). Labeled spend appears on the dashboard at /activity?tab=workflows as
each workflow next runs; jobs on a schedule show up when the schedule fires,
and that's worth saying in the report rather than pretending they're live.
## Workflows labeled
| workflow | job | where |
|---|---|---|
| support-reply | answers inbound tickets | src/bot/reply.ts:41 |
| nightly-digest | 02:00 summary job | jobs/digest.ts:12 |
Verified: <the labeled path you actually exercised, and what you observed>
Lands at: <DASHBOARD>/activity?tab=workflows — each row appears as that workflow
next runs. Anything still unlabeled shows as `unlabeled-workflow`.
Not wired (no gateway routing, so no label): <list or "none">
Marked review: <slugs whose purpose was inferred from filenames, or "none">
If you found no LLM entry points at all: say exactly that, and point at the
setup skill (<docs origin>/docs/agent-setup.md) instead of manufacturing a
table.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
将代码定位、一至两个文件的修改和差异审查分配给专门的辅助智能体,以简短的结构化格式接收结果,减少主智能体的上下文占用。
将智能体回复整理为先给结论的简短文字,省去问候和冗长铺垫,同时保留代码、数值、否定与例外条件等必要信息,兼顾可读性。
按Conventional Commits格式生成简短的提交消息,说明代码变更意图,并为破坏兼容性的变更、迁移等情况补充正文背景。
将CLAUDE.md、任务列表等文件中的自然语言压缩为简短表述,减少输入令牌。保留代码与文档结构,并在单独位置备份便于阅读的原文。
以只读方式检查Caveman Cloud的费用、响应时间和错误,对照汇总数据与单次执行记录,依据证据整理支出构成及可改进之处。
以只读方式查找陌生代码或直接搜索未找到的处理逻辑,定位相关文件。返回简短的路径列表,并附上实际阅读过的行范围和相关理由,供其他智能体参考。