安全重構 是做什麼的?
定義行為保留邊界,並在結構性編輯之前建立驗證。
- 將功能變更保留在重構範圍之外。
- 一次只移動一個所有權邊界。
- 除非明確界定範圍,否則保留公開介面、失敗行為、順序與相容性。
- 保持中間狀態可建置且可測試。
- 除非有正確性需求,否則避免增加相依性或配置。
在變更後執行相同的驗證。當行為匹配且所需結構達成時停止。
在保持行為不變的前提下重組程式碼。適用於提取、合併、所有權轉移或清理,其中驗證必須包圍結構性修改。
此技能專為在保留行為的前提下進行程式碼結構重組而設計,例如提取函式、合併模組、轉移所有權或清理程式碼。它強調在進行結構性編輯之前先定義行為保留邊界並建立驗證機制,確保重構過程不會意外引入錯誤。技能支援所有主流 AI 代理平台(如 Claude Code、Cursor、Codex),並要求將功能變更與重構分開,一次只移動一個所有權邊界,且保持中間狀態可建置與可測試。重構完成後必須執行相同的驗證檢查,直到行為匹配且所需結構達成。這對大型程式庫的演進與長期維護特別有用。
npx skills add https://github.com/JuliusBrussee/caveman/tree/main/skills/safe-refactorInstalled? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →
定義行為保留邊界,並在結構性編輯之前建立驗證。
在變更後執行相同的驗證。當行為匹配且所需結構達成時停止。
This repo contains 12 individual skills — each has its own dedicated page.
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.
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.
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.
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.
Inspect Caveman Cloud's experiment lifecycle and block unsafe execution. Use when asked to start, approve, cancel, promote or roll back a Caveman experiment.
Turn a Caveman optimization observation into an operator-chosen candidate with a paired baseline evaluation. Use when asked to inspect or evaluate a Caveman optimization report. Needs explicit approval.
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.
Diagnose ambiguous failures before editing. Use for unknown causes, intermittent behavior, performance regressions, or investigations needing evidence-ranked hypotheses.
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.
Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and preservation proof.
Fix bugs and small behavior changes at the narrowest responsible layer. Use when regression proof, preserved surrounding behavior, and task-relevant tests matter.
Prove existing work meets acceptance conditions without expanding scope. Use for validation-only tasks, completion checks, focused gate runs, and last-mile proof.
Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.
Control Eight Sleep pods (status, temperature, alarms, schedules).
BluOS CLI (blu) for discovery, playback, grouping, and volume.
Create, search, and manage Bear notes via grizzly CLI.
Capture frames or clips from RTSP/ONVIF cameras.
Search GIF providers with CLI/TUI, download results, and extract stills/sheets.