Community程式設計與開發github.com

測試審計

撰寫、修改、審查和清理測試:拒絕重複或與實作耦合的證明;移除僅供測試使用的生產接縫。

測試審計 是什麼?

此技能旨在透過嚴格的門檻審查與系統性審計,提升測試套件的品質與可維護性。它強制每個新建或修改的測試都必須經過「撰寫門檻」審查,確保測試僅保護可觀測的行為、不變量或獨立合約,並拒絕重複、與實作耦合或僅為測試而存在的接縫(seams)。對於現有測試,它採用「全子系統審計」策略,以小批次、所有權一致的方式移除低價值證明,而非追求刪除數量。支援的主要平台為以 Vitest 等測試框架為基礎的專案,流程包含:閱讀審計前的候選證據與完整歷史、記錄剩餘證明、刪除過時的生產接縫,最後執行驗證與自動審查。此技能特別適合需要長期維護高品質測試的大型程式碼庫,能有效減少測試維護成本並提高回歸測試的可信度。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/test-audit

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

測試審計 是做什麼的?

  • 每個新建或修改的測試都必須通過撰寫門檻審查。
  • 審計:以所有權一致的批次移除低價值證明;切勿追求刪除數量。
  • 全子系統審計活動:請先閱讀 CAMPAIGN.md。

撰寫門檻

在新增測試前,請回答:

  1. 是否保護了可觀測的行為、不變量或獨立合約?
  2. 是否存在可信的回歸案例會使其失敗?
  3. 為什麼現有的證明未能涵蓋此情況?每個合約:在最強的邊界上擁有一個主要擁有者。額外的層需要不同的傳輸/生命週期風險。擴展表格/共享測試固件;合併重複的設置。
  4. 是否需要匯出、旗標、包裝器、注入鉤子,但沒有任何生產呼叫者?請將證明移至真實邊界。
  • 請參考邊界與成本指南。
  • 回歸測試必須在修正前因預期原因失敗,並在修復後通過;需報告不可用的基準證明。
  • 一個擁有者的回歸測試涵蓋一個錯誤;切勿在每個交叉層級重複進行。
  • 保持行為不變的重構不應破壞測試。

無用模式

  • 拒絕自身比較、複製的清單、原始碼搜尋、實作/呼叫形狀斷言、重複合約、僅供測試的接縫、受測主體生成的預期值、提供已斷言行爲的模擬物件。
  • 測試固件不得偽造擁有者收據/訂單,或聲稱從未寫入的持久化路徑。
  • 負面控制必須在預期的防衛處失敗;名稱必須符合所演練的行為。
  • 審計候選項目:請使用完整檢查清單。

保留門檻

  • 保留獨立 API、SDK、協定、配置、遷移、儲存、安全性、平台、預設值、提示位元組、生成的語言、套件、發布、架構、可觀測排序合約。靜態/慢速 ≠ 可拋棄。
  • 來源檢查必須能在僅限識別符號的重構後存活,並保護獨立的用戶面向合約。
  • 基準失敗可能是需要修復的錯誤,而非需要刪除的測試。

審計與驗證

  • 在審計編輯之前:閱讀候選證據與工作流程;檢查完整的擁有者/呼叫者/歷史記錄;在刪除前記錄剩餘的證明。
  • 連同測試一起刪除過時的生產接縫;切勿為了刪除數量而最佳化。
  • 遵循證明政策;保持活躍的 Vitest 結出;執行擁有者/同級證明 + 變更檢查;然後進行自動審查。
  • 報告原因、保留的合約、證明/成本、生產程式碼與測試程式碼行數、後續行動。僅在任務授權下進行提交/推送/合併。

Individual skills in this repo

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

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相關技能