Community生產力與協作github.com

JuliusBrussee/caveman-optimize

將 Caveman 優化觀察轉換為由操作者選擇的候選方案,並附帶配對基準評估。當被要求檢查或評估 Caveman 優化報告時使用。需要明確授權。

caveman-optimize 是什麼?

這個技能旨在將 Caveman 工具的唯報告觀察結果,轉化為一個由開發人員(操作者)主動選擇的、有明確證據支持的程式碼變更候選方案,並與其配對的基準評估一起執行。它嚴格用於診斷目的,不接受來自 Caveman 主動生命週期的資料或貨幣化主張。該技能支援多個特定的儲存庫分析設定檔,例如 `context-window-profile` 和 `tool-catalog-profile`,這些設定檔被設計為不可變且無法直接執行。其主要工作流程是:先驗證 Caveman CLI 權限並讀取精確的觀察結果,然後要求操作者明確選擇一個觀察結果,接著檢查程式碼庫以提出一個最小的變更候選方案及一個匹配的評估設計(包含固定的輸入、品質檢查和成本衡量),最後在獲得操作者明確批准後才應用該變更。如果無法取得 CLI、觀察結果不存在,或儲存庫缺少合適的固定測試夾具,該技能會停止執行並報告具體的障礙,從而確保不出現未經授權的編輯或錯誤的優化聲稱。這個技能主要用於類似 Claude Code 或 Cursor 等支援開發工具中 AI Agent 的語境,幫助開發者以嚴謹和節制的方式處理機器產生的優化見解。

相容平台~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 的唯報告觀察結果作為診斷輸入。它們描述的是記錄到的聚合形狀;並非 Cave Plan 操作、節省估算、實作說明、實驗資格,或證明程式碼變更是安全的。保持工作流程由操作者選擇,並以證據優先。

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 不存在,請停止編輯並報告確切的阻礙。請勿改用原始的 Gateway Cave Plan 或專案 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. 報告觀察結果,而非節省額

報告:

Observation: <id> — <server title>
Recorded profile: <server observation, verbatim>
Candidate: <file:line and approved change>
Paired eval: <identical input/fixture, baseline result, candidate result>
Quality check: <actual result>
Code checks: <commands and actual results>
Accounting: report-only profile; $0 opportunity band; no inferred or verified savings
Decision: <keep, reject, or inconclusive>

若無提供者完整、相同請求的會計資訊(由產品的驗證方法提供),切勿將 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.

相關技能