Frontend Code Review

作者 langgenius2b65f0e89309無授權條款157K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Use only when the user explicitly requests a review or audit of frontend code under `web/` or `packages/dify-ui/`. Supports pending-change, file-focused, and pasted-diff reviews. Do not use for implementation-only requests, diagnosis without review intent, or backend-only code.

AI 產生的概覽

審查 web/ 或 packages/dify-ui/ 下的前端程式碼,找出缺陷與契約違規,並依嚴重程度輸出發現。

功能
此技能會對 web/ 與 packages/dify-ui/ 路徑下的前端程式碼進行審查或稽核,支援待提交變更、指定檔案以及貼上的 diff 三種範圍。它先確立審查範圍,閱讀變更行與相關的 AGENTS.md,再視需要查閱無障礙、Dify UI、元件架構、資料與查詢契約、測試、效能、執行期不變式及程式碼品質等參考包。產出依嚴重程度(P0 至 P3)排序的發現,每項包含檔案與行號、觀察到的失敗或專案規則,以及具體的修正方向。此技能僅為指示文件,不附帶指令碼。
適用情境
當使用者明確要求審查或稽核 web/ 或 packages/dify-ui/ 下的前端程式碼時使用。它支援待提交變更、指定檔案與貼上 diff 的審查。不適用於僅要求實作、沒有審查意圖的診斷,或僅涉及後端的程式碼。
執行需求
除代理外不需任何指令碼或套件。此技能會讀取隨附的參考檔案,並可能查閱專案檔案,例如 packages/dify-ui/README.md、AGENTS.md、docs/overlays.md 與 web/docs/test.md;當本機參考無法判定某項行為時,也會查閱目前的官方文件。

Frontend Code Review

Review the requested scope for concrete defects and violations of explicit project contracts. This skill owns review decisions; its references route to canonical rules without activating another skill's implementation workflow.

Evidence First

  1. Establish the review scope from the requested files or current diff.
  2. Read the changed lines, their behavior owner, and the nearest scoped AGENTS.md.
  3. Trace public consumers, generated contracts, primitive APIs, or runtime configuration only when they decide correctness.
  4. Report findings tied to an observable failure, violated contract, security boundary, or demonstrated maintenance risk. Explicit team conventions are contracts: establish their scope and exceptions, and do not invent user impact to justify a convention finding.

Rule Routing

Read only the packs matched by the diff:

  • DOM semantics, focus, keyboard, forms, disabled state, or visible interaction: references/accessibility-ui.md [blocked]
  • Dify UI imports, Base UI wrappers, overlays, tokens, or primitive contracts: references/dify-ui.md [blocked]
  • Component ownership, props, state, Effects, navigation, or module boundaries: references/component-architecture.md [blocked]
  • Generated clients, Query, mutations, auth, SSR, URL state, or persistence: references/data-query-contracts.md [blocked]
  • Test files or a concrete missing-regression-test finding: references/testing.md [blocked]
  • Bundle, waterfall, rendering, or subscription cost supported by evidence: references/performance.md [blocked]
  • Stable Dify runtime invariants in the named paths: references/dify-invariants.md [blocked]
  • General TypeScript or styling quality not owned above: references/code-quality.md [blocked]

Read packages/dify-ui/README.md, packages/dify-ui/AGENTS.md, packages/dify-ui/docs/overlays.md, or web/docs/test.md only when the reviewed code falls under that contract. Check current official documentation when local code and bundled references do not settle a framework, browser, or accessibility behavior.

Severity And Output

  • P0: security or privacy leak, data loss, production crash, or inaccessible critical workflow.
  • P1: user-visible regression, invalid API or authorization contract, hydration failure, or broken primary interaction.
  • P2: concrete maintainability, performance, test, or accessibility defect, or a material violation of an explicit project contract.
  • P3: minor actionable cleanup; omit unless the user requested a thorough audit.

Lead with findings ordered by severity. Include a tight file and line reference, the observed failure or applicable project rule, and a concrete fix direction. Explain the rule's applicability for convention findings; describe downstream consequences only when supported by evidence. When no findings remain, say so briefly and state any material verification gap. Do not add praise sections, speculative risks, or an unsolicited offer to implement fixes.

來源與署名

來源:langgenius/dify位於.agents/skills/frontend-code-review提交2b65f0e

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架