Communitygithub.com

審查循環 (Review Loop)

在單一會話中,由工作者與審查者子代理反覆迭代,對工作成果進行1-10分評分並提供可行反饋,持續修正直至達到品質門檻。適合在重視品質而非速度的任務中使用。觸發詞:「使用審查循環」、「打磨這個」、「迭代這個」、「/審查循環」、「帶反饋循環的審查」。

審查循環 (Review Loop) 是什麼?

這是一個名為「審查循環」的AI代理技能,其核心原則在於「初稿絕非最終版本」,透過反覆的迭代審查來產生比單次通過更優質的輸出。該技能適用於Claude Code、Cursor、Codex等支援子代理生成能力的平台,對於不支援的平台則建議透過開啟全新聊天上下文來模擬審查步驟(僅貼上工作成果,不帶入先前的推理)。運作方式為:工作者先完成任務,然後生成一個獨立的審查者子代理對工作成果進行1-10分評分並提供具體、可行的反饋;工作者根據反饋進行修正,然後再次送審,直到分數達到預設的品質門檻(預設為8分)或達到最大循環次數(預設為4次)。該技能強調審查者的能力必須等於或優於工作者,以確保有效的批評。使用者可以透過自然語言指令覆寫預設設定,例如指定品質門檻、審查模型或循環次數。整體上,這是一個強健且可自訂的迭代改進流程,特別適合複雜實作、規格文件撰寫、安全性要求高的程式碼或任何需要高品質輸出的任務。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/xzedm/clipplic-landing/tree/HEAD/.agents/skills/review-loop

在你喜歡的 AI 中提問

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

說明文件

審查循環 (Review Loop) 是做什麼的?

在單一會話中進行迭代的工作者-審查者循環。你完成工作,生成一個審查者子代理來評判它,根據反饋進行修正,重複此過程直到滿足品質門檻。

核心原則: 初稿絕非最終版本。迭代式的批評比單次通過能產生更好的輸出。

平台說明: 此技能最適合支援子代理生成的代理工具。 在不具備此功能的平台上,可以透過開啟全新的聊天上下文、僅貼上工作成果(不帶入先前的推理),並要求其給予1-10分評分及具體反饋,來模擬審查步驟。

快速開始

  1. 說:"實作X,使用審查循環" 或 "對我剛寫的檔案執行審查循環"
  2. 代理完成工作(或讀取現有工作)
  3. 一個獨立的審查者子代理對其進行1-10分評分,並提供具體反饋
  4. 代理根據反饋修正並重複,直到分數 >= 8(預設品質門檻)
  5. 最終輸出時提供循環摘要

何時使用

  • 使用者說「使用審查循環」、「打磨這個」、「迭代這個」、「/審查循環」
  • 重視品質而非速度的複雜實作
  • 設計文件、規格或技術寫作
  • 需要高穩定性的程式碼(安全性、數據管道、金融邏輯)
  • 當使用者希望在流程中納入對抗式批評時

何時不使用

  • 簡單修復、快速編輯、單行修改
  • 以測試作為品質門檻的任務(應使用 TDD + CI)
  • 當使用者只希望快速完成時
  • 探索性/原型工作,目標是學習而非交付
  • 沒有明確驗收標準的任務 — 請先定義這些標準,再使用審查循環

預設值

設定預設值
最少循環2
最多循環4
品質門檻8/10
工作者模型(你目前的模型)
審查者模型(你目前的模型或快速/平衡的替代方案)

模型選擇

審查者的任務是評估邏輯和約束條件。工作者的任務是編寫和修改程式碼。請根據任務需求選擇子代理的能力。

關鍵規則: 審查者必須始終等於或優於工作者。如果審查者比工作者弱,它將無法正確評判複雜的邏輯或捕捉細微的回歸問題。

任務複雜度工作者能力審查者能力理由
簡單/機械性(CRUD、格式化、樣板)快速/輕量平衡輕量工作者速度快,平衡審查者容易發現問題
標準(功能、重構、文件)平衡平衡成本、速度和品質的良好組合
複雜(多檔案、整合、設計)平衡進階/推理進階審查者能發現細微的架構問題,平衡工作者可以實作它們
非常複雜(安全性、量化、分散式系統)進階/推理進階/推理兩者都需要完整的上下文和推理能力。審查者必須與工作者能力匹配。

黃金法則: 工作者必須足夠聰明才能執行審查者的反饋。如果審查者說「使用基於通道的信號量修復競爭條件」,而工作者無法理解並發處理,那麼循環將無法收斂。

升級信號: 如果連續兩次循環得分沒有改善,且反饋內容相同,表示工作者模型太弱。請升級:

  • 選項A:要求使用者切換到能力更強的模型
  • 選項B:暫時降低品質門檻,並向使用者說明差距
  • 選項C:將任務分解為較小的子任務,並對每個子任務執行審查循環

預設行為: 由於你(主要代理)就是工作者,請根據任務生成一個能力等於或超過你目前能力的審查者子代理:

  • 大多數任務 → 標準/平衡審查者
  • 專業/困難任務 → 進階/推理審查者
  • 快速檢查 → 快速/輕量審查者(僅當你本身也作為輕量工作者時)

使用者覆寫

使用者可以在請求中自然覆寫任何預設設定。請自然解析這些內容:

"使用審查循環實作X,品質門檻9,審查時使用進階模型,最多5次循環"
"打磨這個,最少2次循環,門檻8"
"執行審查循環,使用快速審查者,最多2次循環"
"使用審查循環,推理審查者,品質門檻9,最少3次最多6次"

解析規則:

  • "品質門檻 N" 或 "門檻 N" → quality_gate = N
  • "[模型] 審查者" 或 "使用 [模型] 審查" → 審查者模型覆寫
  • "最多 N 次循環" → max_loops = N
  • "最少 N 次循環" → min_loops = N
  • 如果使用者未指定,使用預設值
  • 如果使用者說「徹底」或「嚴格」 → 解釋為 quality_gate 8, min_loops 2
  • 如果使用者說「快速」或「迅速」 → 解釋為 max_loops 2, quality_gate 6

流程

flowchart TD
    A[完成工作] --> B[生成審查者子代理]
    B --> C{達到最少循環次數?}
    C -- 否,總是繼續 --> E[根據反饋修正]
    C -- 是 --> D{分數 >= 品質門檻?}
    D -- 是 --> F[最終打磨]
    D -- 否 --> G{達到最多循環次數?}
    G -- 是,無論如何都停止 --> F
    G -- 否 --> E
    E --> B
    F --> H([完成])

逐步說明

步驟 1:完成工作

像平常一樣完成任務。撰寫程式碼、建立規格、實作功能。全力以赴,產出你最好的初稿。

步驟 2:生成審查者子代理

使用代理工具派遣一個審查者。審查者必須:

  • 是一個獨立的子代理(全新的上下文,不受你的推理影響)
  • 僅接收工作成果(檔案、差異)— 而非你的思考過程
  • 給予1-10分評分,並提供具體、可行的反饋
  • 預設使用平衡/標準模型(對於複雜/專業任務,則使用進階推理模型)

審查者提示模板:

你是一位嚴格的審查者。請對以下工作進行1-10分評分,並提供具體、可行的反饋。

## 已完成的工作
{任務的簡短說明}

## 審查標準
{任務特定的標準 — 對這個任務來說重要的是什麼}

良好標準的範例:
  對於 REST API 端點:
    - 使用正確的 HTTP 狀態碼
    - 所有參數都有輸入驗證
    - 強制執行身份驗證;不允許未經認證的存取
    - 沒有 N+1 查詢模式

  對於設計文件:
    - 問題陳述明確無歧義
    - 考慮了替代方案並說明權衡
    - 對實作複雜度沒有含糊其辭
    - 成功指標是可量化的

  對於數據管道:
    - 冪等性 — 可安全重新執行
    - 優雅處理 Schema 變更
    - 記錄了失敗模式
    - 處理了 PII 問題

## 指示
1. 仔細閱讀工作成果
2. 評分 1-10,其中:
   - 1-3:基本上有缺陷或遺漏主要需求
   - 4-6:可運作但有重大問題
   - 7-8:良好,僅有輕微問題
   - 9-10:優秀,已準備好交付
3. 列出具體問題,並在可能的情況下提供檔案:行號
4. 對於每個問題,說明為什麼它很重要以及該如何修復
5. 不要客氣 — 要誠實且直接
6. 明確陳述你的分數,格式為 "Score: N/10"

## 要審查的檔案
{貼上檔案內容或列出檔案路徑及相關摘錄}

步驟 3:解析反饋

從審查者的回應中提取:

  • 分數(數字)
  • 問題(分類為 關鍵 / 重要 / 次要)
  • 具體修正(要更改什麼)

向使用者報告:

循環 {N}/{最大次數}:分數 {X}/10
- {關鍵反饋要點摘要}

步驟 4:檢查停止條件

按以下順序檢查:

  1. 如果已完成循環次數 < 最少循環次數 → 繼續(總是)
  2. 如果分數 >= 品質門檻 → 停止,進行最終打磨
  3. 如果已完成循環次數 >= 最多循環次數 → 停止,進行最終打磨
  4. 否則 → 修正並循環

步驟 5:修正

處理審查者的反饋。修復關鍵和重要的問題。次要問題可選。然後回到步驟 2。

重要: 每次修正都應有針對性。不要全部重寫 — 修復審查者標記的問題。在心中維護所有先前反饋的清單,以避免回歸。

步驟 6:最終打磨

一旦循環結束(達到品質門檻或達到最大循環次數):

  • 如有必要,處理剩餘的次要問題(如果很簡單)
  • 驗證最終輸出是否連貫一致(沒有來自修正循環的遺留問題)
  • 向使用者報告最終分數和循環次數

按任務類型調整審查標準

任務類型審查者應關注的重點
程式碼正確性、邊界情況、錯誤處理、可讀性、無安全問題
規格/設計完整性、可行性、無含糊其辭、可實作性
重構無行為改變、無回歸、比之前更乾淨
寫作清晰度、結構、適合目標受眾、無冗詞
錯誤修復已處理根本原因、存在回歸測試、無副作用
基礎設施/IaC冪等性、最小權限、無硬編碼機密、可安全銷毀
資料庫遷移可逆性、索引策略、數據遺失風險、擴展效能
API 設計向後相容性、身份驗證、版本控制、錯誤合約
測試套件邊界情況覆蓋率、無測試相依性、有意義的斷言

兩種操作模式

模式 A:「執行並審查」(完整循環)

使用者給出任務並要求使用審查循環。你完成工作並執行審查循環。

使用者:「實作快取層。使用審查循環,品質門檻8。」

你:
1. 實作快取層
2. 生成審查者 → 分數 6,反饋:缺少淘汰機制,無 TTL
3. 修正:加入淘汰機制 + TTL
4. 生成審查者 → 分數 8,反饋:命名上的小問題
5. 最終打磨,完成

模式 B:「審查現有內容」(僅審查)

使用者已經完成工作,或者你已經完成工作。僅對現有內容執行審查循環。

使用者:「對我剛寫的身份驗證模組執行審查循環」

你:
1. 讀取身份驗證模組
2. 生成審查者 → 分數 5,反饋:SQL 注入,無速率限制
3. 修正:參數化查詢,加入速率限制器
4. 生成審查者 → 分數 8,通過
5. 完成

紅旗警示

絕對不要:

  • 自我審查而不生成子代理(錨定偏誤)
  • 跳過修正循環,因為「反饋是錯的」而沒有正當理由
  • 自我膨脹分數(「我認為這其實有9分」)
  • 在未經使用者同意的情況下繼續超過最大循環次數
  • 與審查者分享你的完整推理/歷史(他們必須審查工作成果,而非你的意圖)

如果審查者是錯的:

  • 用證據反駁(顯示程式碼/測試來證明反饋不正確)
  • 在修正中跳過那個特定點
  • 在你的報告中向使用者說明
  • 不要為了補償而降低品質標準

範例報告格式

--- 審查循環:{任務名稱} ---

循環 1/4:分數 6/10
  審查者:缺少輸入驗證,未處理網路超時錯誤,
           函數過長(80行)。
  處理:修復這三個問題。

循環 2/4:分數 8/10
  審查者:乾淨。次要:變數名稱 `d` 可以更具描述性。
  處理:已達到品質門檻(8 >= 8)。進行最終打磨。

結果:以 8/10 在 2 次循環內完成。

已知限制

  • 審查者子代理沒有先前循環的記憶 — 請在每次審查提示中明確包含先前的反饋上下文,以避免重複處理已解決的問題
  • 如果審查提示標準過於模糊,可能出現分數膨脹 — 請花時間撰寫具體、可量化的標準
  • 此技能不能取代針對安全關鍵或合規敏感程式碼的人工程式碼審查;請將輸出視為強而有力的初稿
  • 如果任務定義不夠明確,循環可能無法收斂 — 請在開始前定義清晰的驗收標準

成本與速度

  • 每次循環 = 1 次審查者子代理呼叫
  • 對於一個完整的 3 次循環,預估時間約為單次實作時間的 1–2 倍
  • 與交付有缺陷的程式碼、模糊的規格或觸發後期審查循環相比,這是相對便宜的
  • 大多數審查使用預設/標準模型;僅對專業領域(安全審計、分散式系統、量化金融)升級到進階推理模型

授權條款

MIT — 可自由使用、改編,並與任何 AI 工具或平台重新分發。感謝標註出處。歡迎貢獻。

Individual skills in this repo

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

xzedm/clipplic-landing

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

xzedm/clipplic-landing

Material Design 3 and Android platform guidelines. Use when building Android apps with Jetpack Compose or XML layouts, implementing Material You, navigation, or accessibility. Triggers on tasks involving Android UI, Compose components, dynamic color, or Material Design compliance.

xzedm/clipplic-landing

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

xzedm/clipplic-landing

Design iOS apps following Apple's Human Interface Guidelines. Generate native components, validate designs, and ensure accessibility compliance for iPhone, iPad, and Apple Watch.

xzedm/clipplic-landing

Redesign mobile app UI to feel unmistakably Apple-like, iOS-forward, and native. Use this skill when building iOS apps, applying Apple Human Interface Guidelines, or creating native-feeling mobile interfaces with SF Pro typography, translucency, and system-like components.

xzedm/clipplic-landing

Accessibility engineering for product interfaces, from focus states and keyboard support to ARIA, forms, and screen readers. Use when building or reviewing UI components, modals, menus, forms, custom widgets, or when the user says "make this accessible" or reports keyboard or screen-reader issues. Triggers on accessibility, a11y, WCAG, aria, focus ring, focus-visible, focus trap, keyboard navigation, tab order, tabindex, screen reader, sr-only, aria-live, alt text, hit area, touch target, prefers-reduced-motion, autoplay, toast duration, skip link, semantic HTML, aria-label, form errors, disabled buttons, "not keyboard accessible".

xzedm/clipplic-landing

OKLCH color space and color usage for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, theme with Tailwind v4, and apply color with meaning. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, semantic color tokens, hue drift, chroma, dark mode colors, accent color, color meaning, light and dark appearance, increased contrast.

xzedm/clipplic-landing

Layout structure for web interfaces, from grouping and alignment to reading order, progressive disclosure, and adaptive breakpoints. Use when structuring a page or component, spacing or aligning controls, deciding what collapses at small sizes, handling RTL layout direction, or reviewing frontend code for layout. Triggers on layout, spacing, alignment, grouping, negative space, whitespace, visual hierarchy, reading order, progressive disclosure, breakpoints, responsive layout, container queries, safe area, full-bleed, edge-to-edge, layout margins, RTL layout, logical properties.

xzedm/clipplic-landing

Web typography from choosing fonts to spacing, wrapping and accessibility. Use when picking or pairing typefaces, configuring variable fonts or OpenType features, setting up a type scale, checking heading hierarchy, styling text in components, truncating text, styling underlines, selection, placeholders or carets, or reviewing frontend code for typography. Triggers on typography, fonts, font formats, woff2, variable fonts, font-weight, opentype, font-feature-settings, letter-spacing, line-height, type scale, heading hierarchy, heading levels, tabular numbers, text-wrap, truncation, line clamp, underlines, text-decoration, text selection, iOS input zoom, scaled input text, font smoothing, text contrast, measure, line length, text-box, smart punctuation, drop cap.

xzedm/clipplic-landing

Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, micro-interactions, enter/exit animations, choosing or reviewing icons, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, image outlines, box shadows, icons, icon stroke weight, icon states, motion restraint.

xzedm/clipplic-landing

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

xzedm/clipplic-landing

Generate developer handoff specs from a design. Use when a design is ready for engineering and needs a spec sheet covering layout, design tokens, component props, interaction states, responsive breakpoints, edge cases, and animation details.

xzedm/clipplic-landing

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

xzedm/clipplic-landing

Extract design primitives from a public website and generate starter token files for your project.

xzedm/clipplic-landing

Use this skill alongside figma-use when the task involves translating an application page, view, or multi-section layout into Figma. Triggers: 'write to Figma', 'create in Figma from code', 'push page to Figma', 'take this app/page and build it in Figma', 'create a screen', 'build a landing page in Figma', 'update the Figma screen to match code', 'convert this modal/dialog/drawer/panel to Figma'. This is the preferred workflow skill whenever the user wants to build or update a full page, modal, dialog, drawer, sidebar, panel, or any composed multi-section view in Figma from code or a description. Discovers design system components, variables, and styles from Code Connect files, existing screens, and library search, then imports them and assembles views incrementally section-by-section using design system tokens instead of hardcoded values.

xzedm/clipplic-landing

**MANDATORY prerequisite**: you MUST invoke this skill BEFORE every `use_figma` tool call. NEVER call `use_figma` directly without loading this skill first. Skipping it causes common, hard-to-debug failures. Trigger whenever the user wants to perform a write action or a unique read action that requires JavaScript execution in the Figma file context, e.g. create/edit/delete nodes, set up variables or tokens, build components and variants, modify auto-layout or fills, bind variables to properties, or inspect file structure programmatically.

xzedm/clipplic-landing

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

xzedm/clipplic-landing

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications.

xzedm/clipplic-landing

Elite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA page structure, wide editorial typography (bans 6-line wraps), gapless bento grids, strict GSAP ScrollTriggers (pinning, stacking, scrubbing), inline micro-images, and massive section spacing.

xzedm/clipplic-landing

Fast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)

相關技能