Communitygithub.com

代理技能交換/技能

一個結構化的自我審查清單,在提交重大代碼變更之前執行。涵蓋邊界情況、錯誤路徑、測試覆蓋率、文檔和代碼品質,使 CI 成為最後手段,而非首位審查者。

技能 是什麼?

這項技能旨在充當自主代碼代理的自動化品質門控,特別適用於 Claude Code、Cursor 或 Codex 等平台。它提供了一份結構化的五步自我審查清單,涵蓋邊界條件、錯誤處理、測試覆蓋率、文檔準確性以及程式碼品質,所有這些都應在提交之前手動或透過自動化腳本執行。其目標是讓代理在變更進入 CI 管道或影響最終使用者之前就發現問題,從而減少迭代次數和潛在的錯誤。該技能支援複雜變更的觸發條件、簡易變更的略過條件,並提供一個快速煙霧測試命令,以防止帶有已知問題的程式碼被提交。通過遵守此清單,代理可以模擬人類審查者的角色,確保程式碼質量,同時避免常見的反模式,例如將所有檢查責任推給 CI。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/agentskillexchange/skills/tree/HEAD/skills/pre-landing-review

在你喜歡的 AI 中提問

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

說明文件

落地前自我審查

在提交重大變更之前,執行此檢查清單。在 CI 發現問題之前先抓住它——或者更糟,在使用者發現之前。

使用時機

當以下任何一項為真時,執行此技能:

  • 變更超過 100 行程式碼
  • 修改超過 5 個檔案
  • 觸及核心基礎設施(執行器、儲存、主要調度循環)
  • 引入新的抽象或公開 API
  • 對邊界情況或設計選擇不確定

快速閘門:

git diff --stat HEAD | tail -5  # 變更了多少?
git diff --name-only HEAD | wc -l  # 變更了多少檔案?

略過條件

  • 小型變更(≤50 行,≤3 個檔案)
  • 純文檔或課程更新
  • 僅測試變更(測試本身有它們自己的審查)
  • 具有明顯且有限範圍的簡單一行錯誤修復
  • 無邏輯變更的機械性重構

檢查清單

1. 邊界情況

- [ ] 處理了空值/空輸入?
- [ ] 測試了邊界條件(差一錯誤、空列表、零)?
- [ ] 考慮了並發訪問或競爭條件?
- [ ] 如果處理文字,考慮了 Unicode/編碼問題?

2. 錯誤路徑

- [ ] 所有異常在正確層級被捕獲(不過於廣泛)?
- [ ] 錯誤訊息具有資訊性(什麼失敗了、為什麼、該怎麼做)?
- [ ] 失敗模式優雅地失敗,而非靜默失敗?
- [ ] 沒有裸露的 `except:` 或吞沒的錯誤?

3. 測試覆蓋率

- [ ] 關鍵路徑有測試?
- [ ] 上述識別的邊界情況有測試?
- [ ] 測試實際執行且通過?
- [ ] 沒有留下 `pass` 或 `...` 的測試樁?

4. 文檔

- [ ] Docstrings/註解與當前行為匹配?
- [ ] 如果公開介面變更,README 已更新?
- [ ] 提交訊息捕捉了變更內容和原因?
- [ ] 相關的架構文檔仍然準確?

5. 程式碼品質

- [ ] 命名清晰且與周圍程式碼一致?
- [ ] 沒有明顯的程式碼壞味道(上帝函數、魔術數字、硬編碼路徑)?
- [ ] 遵循檔案/套件中的現有模式?
- [ ] 靜態分析 / 型別檢查通過?

一行煙霧測試

# 在提交之前執行(根據你的堆疊調整):
make format && make typecheck && pytest -x -q && echo "✅ 可以發布"

如果任何步驟失敗,在提交之前修復它。不要帶著紅色狀態發布。

反模式

反模式修復方式
"CI 會抓到它"CI 是最後手段,而非你自身判斷的替代品。先抓住問題。
"我之後再補測試"之後不會來。現在就寫測試,否則永久接受這個缺口。
"我手動測試時它運作正常"手動測試不可重現。寫一個自動化測試,以便未來的工作階段也能驗證它。
"錯誤訊息是一個 TODO"TODO 錯誤訊息會以 TODO 錯誤訊息的形式發布。現在就寫真正的訊息。
"我可以從程式碼看出它處理了這個情況"如果沒有測試,未來的重構會在不察覺的情況下破壞它。

為什麼這很重要

自主代理被訓練成產出足夠好的輸出以避免修正。沒有結構化的審查閘門,自主程式碼提交會繞過通常能捕捉迴歸和邊界情況的人類審查環節。這項技能扮演了那個閘門的角色——五個有針對性的透鏡依序執行,確保沒有明顯的問題遺漏。

報酬會複合累積:每一次成功抓住真實問題的審查,都是一次 CI 往返的節省、一個使用者錯誤的避免,以及一個不需要的回退 PR。

相關

Individual skills in this repo

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

Academic Paper Citation Network Mapper

Builds citation networks from Semantic Scholar API and CrossRef DOI metadata. Visualizes paper influence graphs using NetworkX, identifies seminal works, and tracks research lineage across fields.

ACF Custom Fields REST Exposer

Exposes Advanced Custom Fields data through the WordPress REST API using register_rest_field and acf_format_value. Handles repeater fields, flexible content layouts, and gallery fields with proper serialization.

ACF Extended for Advanced Custom Fields Workflows

An ASE skill built around ACF Extended, the WordPress enhancement suite for Advanced Custom Fields that adds field types, admin improvements, front-end forms, options pages, and developer tooling. It is a practical fit for agents working inside complex WordPress content models and custom field workflows.

ACF to Gutenberg Block Migrator

Converts Advanced Custom Fields field groups into native Gutenberg blocks using the ACF Block API v2 and @wordpress/scripts build pipeline. Maps ACF repeaters, groups, and flexible content to InnerBlocks and block attributes with server-side rendering via acf_register_block_type().

Activepieces Open Source Workflow Automation

Activepieces is an open-source, self-hostable workflow automation platform with 200+ integrations. It provides a visual builder for creating automated workflows and exposes all its connectors as MCP servers for AI agent use.

ActivityWatch Cross-Platform Automated Time Tracker and Producti

ActivityWatch is a privacy-first, open-source automated time tracker that records application usage, browser activity, and AFK status across Windows, macOS, and Linux. With 16k+ GitHub stars, it provides detailed productivity analytics without sending data to external servers.

act Local GitHub Actions Runner

act is an open-source CLI tool that runs GitHub Actions workflows locally using Docker, enabling fast feedback on workflow changes without pushing to GitHub. It is a standard tool for local Actions development and testing.

Add a browser review checkpoint before risky agent actions with

Use AgentClick when an agent should pause before risky commands, plans, drafts, or code changes so a human can inspect, edit, approve, or reject them in a purpose-built browser UI.

Add Claude design-system and accessibility workflows with UX/UI

Use UX/UI Agent Skills when Claude should generate tokens, component specs, accessibility audits, and framework-specific UI code from a repeatable design workflow.

Add executable smoke tests for shell scripts and CLIs before ref

Use Bats-core when an agent needs to turn fragile shell scripts or command-line workflows into something it can verify repeatedly after edits. The agent writes focused Bash tests for success paths, failure paths, and output contracts, then runs them locally or in CI before a refactor, release, or incident fix goes out.

Add graph-backed memory and context retrieval to agent workflows

Use Cognee to ingest project knowledge into graph and vector memory so agents can retrieve durable context across sessions and workflows.

Add IDE-style semantic code navigation and symbol-safe refactors

Give a coding agent symbol-aware lookup, cross-file rename, and structural edit tools before it starts making brittle text-only changes.

Add managed long-term memory to LangGraph agents with LangMem

Give LangGraph agents memory management and search tools so they can store, retrieve, and update durable facts across sessions.

Add multimodal lifelong memory to MCP and Python agents with Sim

Use SimpleMem to store, compress, index, and retrieve text or multimodal memories for agents through MCP or Python integrations.

Add persistent project memory and hook-driven synthesis with Cla

Keep Claude Code sessions grounded in prior decisions, project context, and daily handoff notes instead of starting from zero every time.

Add Postgres-native vector retrieval to agent and RAG workflows

Store embeddings beside application data in Postgres, create vector indexes, and query nearest neighbors for semantic search, RAG, recommendations, or agent memory retrieval.

Address GitHub PR review comments from the current branch with g

Find the open PR for the current branch, gather unresolved review comments, and drive a focused comment-resolution workflow with gh-authenticated context.

Add runtime guardrails to TypeScript agents with VoltAgent

Use VoltAgent to intercept, validate, and enforce input/output policies in TypeScript agent workflows.

Add temporal context memory to agent workflows with Zep

Use Zep as an external context layer for agents that need to store events, assemble temporal graph context, and retrieve relevant memory before model calls.

Adobe Firefly API Batch Image Generator

Calls Adobe Firefly

相關技能