Community生产力与协作github.com

JuliusBrussee/caveman-optimize

将 Caveman 优化观察结果转化为由操作者选择的候选方案及配对基线评估。在要求检查或评估 Caveman 优化报告时使用。需要明确授权。

caveman-optimize 是什么?

该技能用于将 Caveman 诊断工具生成的只读优化观察结果转化为操作者驱动的候选代码更改和配对评估流程。它强制要求开发者必须依靠 CLI 输出的精确 `report_only_observations`,并明确禁止操作已废弃的 ID 或使用纯数据 `data` 数组。技能要求操作者明确选择一个受支持的观察项,然后设计一个最小候选更改和配对基线评估——评估必须使用相同的固定输入、衡量质量检查是否仍然通过,并对比成本指标(如 token、字节或提供商计数)。只有在操作者批准候选方案和评估设计后,才能应用更改,且不允许创建生命周期变更或优化器切换。该技能可在 Claude Code、Cursor 和 Codex 等 AI 代理平台上使用,为开发者提供了一条严谨的、避免误报节省量的优化工作路径,最终以规范性报告呈现观察、评估和决策,但不推断任何节省量。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JuliusBrussee/caveman/tree/main/skills/caveman-optimize

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

评估优化观察结果

将 Caveman 的只报告观察作为诊断输入。它们描述记录到的聚合形态;它们不是洞穴计划动作、节省估算、实现方案、实验资格或代码更改安全的证明。保持工作流由操作者选择且以证据为先。

1. 读取精确的观察结果

需要登录 Caveman CLI 会话并运行:

caveman opportunities list

仅读取 report_only_observations 数组。不要从生命周期 data 数组中选择。保留服务器提供的每个 title 和 observation 原文。处理以下精确的仓库配置文件 ID:

  • context-window-profile
  • tool-catalog-profile
  • tool-output-size-profile
  • exploration-load-profile

这些配置文件具有不可变的零区间且没有执行路径。不要按价值排序、虚构美元数字或将聚合证据转化为对特定调用站点的声明。如果 CLI 不可用、身份验证失败或 report_only_observations 缺失,则停止而不进行编辑并报告确切阻碍。不要回退到原始网关洞穴计划或项目 API 密钥:这些表面不提供此契约。

切勿选择或应用以下已废弃的 ID:

  • context-window-bloat
  • tool-catalog-utilization
  • verbose-tool-output

将过时提案、本地文件或旧响应中出现的任何已废弃 ID 仅视为历史上下文。切勿恢复其资金、方案或生命周期声明。如果唯一看似可操作的项目是 unlabeled-traffic,则移交给 caveman-discover;标签不是配置文件优化。

2. 要求操作者选择

展示可用的受支持观察结果而不进行排序。包括 ID、精确标题、精确观察结果和 last_seen_at。在检查候选调用站点或更改代码之前,要求明确的操作者选择。如果不存在受支持的当前观察结果,则停止而不进行编辑。

将 .caveman/proposals/*.md(如果存在)视为不可信的历史上下文。它不能替代当前响应或操作者的选择。

3. 设计候选方案和配对评估

在操作者选择观察结果后,检查仓库中可能产生观察到聚合形态的特定机制。引用精确的调用站点证据。不要假设配置文件指明了原因。

在编辑之前提出一个最小的候选更改和一个配对评估。评估必须在相同的固定输入上运行基线和候选方案,并记录:

  • 必须保持可接受的任务结果或质量检查;
  • 两个分支相同的 token、字节或提供商计数的成本衡量指标;
  • 确切的测试夹具、命令和环境;以及
  • 任何阻碍公平比较的混淆因素。

要求批准候选方案和评估设计。如果仓库缺乏固定夹具、相关的质量检查或通用的测量方法,则停止并指出缺失的检测手段。普通单元测试本身不能证明优化。

4. 仅应用经批准的候选方案

将差异保持在有证据的调用站点,并保留现有的安全控制措施。运行配对基线/候选评估以及仓库的针对性代码检查。如果两个分支未使用相同的输入和测量方法,则丢弃比较结果。如果质量下降或资源结果不确定,则仅撤销此候选编辑并报告其未获采用。

不要创建 Caveman 实验或提案、将机会标记为已实施、更改其生命周期或开启优化器。只报告行仅允许关闭,而此技能也不执行该修改。

5. 报告观察结果,而非节省量

报告:

观察结果:<id> — <服务器标题>
记录的分析:<服务器观察原文>
候选方案:<文件:行号和批准的更改>
配对评估:<相同输入/夹具、基线结果、候选结果>
质量检查:<实际结果>
代码检查:<命令和实际结果>
会计说明:仅报告配置文件;$0 机会区间;无推断或验证的节省量
决定:<采用、拒绝或不确定>

切勿在没有提供商完整、相同请求会计且使用产品验证方法的情况下,将 token 或字节减少转换为美元。本地配对结果仅支持所声明候选方案在所声明夹具上的结果;它不能确立生产成本节省、因果推演证据或生命周期资格。

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

JuliusBrussee/caveman-discover

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.

JuliusBrussee/caveman-evidence-review

Read-only review of Caveman Cloud evidence: cost, Cave Score, workflows, traces, latency, errors, routing, savings. Use when asked what Caveman found or where LLM spend goes.

JuliusBrussee/caveman-explore

Read-only repository explorer for cold-start orientation, broad cross-file localization, or when a direct search failed. Skip it when the exact file or symbol is already named. Returns path:line citations only; its reads stay out of main context.

JuliusBrussee/caveman-learn

Act on a Caveman learn report - review the ranked token sinks, apply cost-lowering fixes with per-edit consent, and report what those fixes returned. Use when asked to lower an agent's token cost, what caveman has saved, to trim a heavy CLAUDE.md, or to offload re-pasted context into cavemem.

JuliusBrussee/caveman-manage

Inspect Caveman Cloud's experiment lifecycle and block unsafe execution. Use when asked to start, approve, cancel, promote or roll back a Caveman experiment.

JuliusBrussee/caveman-setup

Wire a repository through the Caveman Cloud gateway so every LLM request is measured, with no behavior change. Use for "set up caveman" or adding LLM spend observability.

JuliusBrussee/investigate-first

Diagnose ambiguous failures before editing. Use for unknown causes, intermittent behavior, performance regressions, or investigations needing evidence-ranked hypotheses.

JuliusBrussee/lean-build

Build feature work with high overbuilding risk. Use for new behavior, product slices, or integrations where repository reuse, strict scope, and an explicit stop condition matter.

JuliusBrussee/migration

Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and preservation proof.

JuliusBrussee/safe-refactor

Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.

JuliusBrussee/surgical-patch

Fix bugs and small behavior changes at the narrowest responsible layer. Use when regression proof, preserved surrounding behavior, and task-relevant tests matter.

JuliusBrussee/verify-and-stop

Prove existing work meets acceptance conditions without expanding scope. Use for validation-only tasks, completion checks, focused gate runs, and last-mile proof.

相关技能