agentsclimarketplace

Review

Skill TinyWugaga/fe-dev-workflow/skills/review

Code review guidance for React + TypeScript projects. Covers Hooks rules and pitfalls, useEffect/useMemo/useCallback misuse, component design, React 19 Actions/RSC/Suspense, TanStack Query v5, TypeScript type safety, async/await, immutability, plus cross-cutting concerns: architecture, performance (Web Vitals, re-renders), security (XSS), error handling, async/concurrency, HTML standards (semantic markup, accessibility/a11y/ARIA, WCAG, forms, metadata/SEO), CSS/Less/Sass, common bugs, and universal quality anti-patterns. Loads project-specific conventions (CLAUDE.md, conventions/ docs, code-review-checklist.md, project plugins) as the highest-priority review layer before applying generic guides. 合併前必經階段(merge 前一律先 review)。 Use when: reviewing a React/TypeScript pull request or diff, "review this before I merge", 「幫我 review」「檢查改動」「有什麼風險」, checking a component or hook, auditing a personal React app, checking whether changes conform to project conventions, checking semantic HTML / accessibility / a11y / ARIA / WCAG compliance, finding bugs, establishing review standards, or giving feedback on front-end code.From its SKILL.md

Install
npx -y skills add TinyWugaga/fe-dev-workflow --skill review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

8.2 KB, as published. Nobody here has run it

Code Review Skill

針對 React + TypeScript 個人應用專案的程式碼審查技能。把審查從模糊建議變成結構化、可重複、專家級的流程:先理解範圍,再逐層檢查,最後給出分級、可執行的回饋。

本 skill 是 SOP 的必經階段:任何改動合併前必跑。順序為 implement → acceptance → review → merge——先確認做對東西(驗收),再打磨品質(review)。

When to Use This Skill

  • 審查 React / TypeScript 的 PR 或 diff(合併前自查)
  • 檢查單個 component 或 custom hook 的改動
  • 審查個人 React 應用專案的整體品質
  • 建立前端審查標準 / checklist
  • 找 bug、評估效能與安全風險
  • 給出有建設性的回饋

Core Principles

1. The Review Mindset

程式碼審查的目標是抓 bug、保證可維護性、分享知識、改進設計;不是炫技、不是糾結格式(交給 linter)、不是按個人偏好重寫。

2. Effective Feedback

好的回饋具體、可執行、對事不對人、有優先順序,並且也肯定寫得好的地方。

❌ Bad: "This is wrong."
✅ Good: "這裡多個請求併發時可能有競態,考慮用 AbortController 取消舊請求。"

❌ Bad: "Rename this variable."
✅ Good: "[nit] `uc` 改成 `userCount` 會更清楚,不阻塞合併。"

3. Review Scope

人工審查重點: 邏輯正確性與邊界、安全漏洞、效能、測試覆蓋、錯誤處理、API 設計與命名、架構契合度。

交給工具(不要手動挑): 格式(Prettier)、import 排序、lint 違規、簡單拼寫。先確認專案已跑 tsc --noEmit、ESLint、測試,再開始人工審查。

Review Process

Phase 0: Project Conventions(1–2 分鐘)

依 Project Layer Protocol 探測並載入專案規範——探測順序、約定檔名、「專案規範優先」「鐵律違反即 🔴 blocking」「找不到就明講未套用專案規範」皆以該協定為準。review 特別注意:

  • 找到 conventions/code-review-checklist.md 就逐項執行:先跑可機械驗證的檢查,再做語意判斷項。
  • 本次改動若有對應的 docs/features/<feature>.md,一併載入——其驗收條件是 Phase 2 測試覆蓋把關的依據。

Phase 1: Context Gathering(2–3 分鐘)

讀 PR 描述與關聯 issue → 看改動規模(>400 行考慮拆分)→ 確認 CI / type-check / 測試透過 → 理解業務需求。

Phase 2: High-Level Review(5–10 分鐘)

  1. 架構與設計 — 方案是否契合問題?重大改動參閱 Architecture Review Guide。
  2. 效能評估 — 是否有不必要的 re-render、過早最佳化、N+1?參閱 Performance Review Guide。
  3. 檔案組織 — 新檔案放對位置了嗎?
  4. 測試策略 — 邊界情況有覆蓋嗎?測試是否覆蓋 feature doc 的驗收條件與邊界——逐條對照 docs/features/<feature>.md,驗收條件沒有對應測試(或標註為人工驗收)的,標 🟡 指出。測試規範參閱 Testing Guide。

Phase 3: Line-by-Line Review(10–20 分鐘)

每個檔案檢查:

  • 邏輯與正確性 — 邊界、off-by-one、null/undefined、競態、stale closure
  • 安全 — 輸入驗證、XSS(dangerouslySetInnerHTML)、敏感資料外洩
  • HTML 語意與無障礙 — 語意標籤、alt、label 關聯、鍵盤可操作、WCAG 對比。參閱 HTML Standards Guide。
  • 效能 — 多餘 re-render、未穩定的依賴、記憶體洩漏
  • 可維護性 — 命名清晰、單一職責、必要註釋
  • 複用 — 接受新程式碼前,先搜尋既有 util / hook / 元件,避免重複實現。參閱 Universal Quality Guide。

Phase 4: Summary & Decision(2–3 分鐘)

總結主要顧慮 → 指出做得好的地方 → 給出明確決定:✅ Approve / 💬 Comment / 🔄 Request Changes。

Severity Labels

每條 finding 都標註優先順序:

  • 🔴 [blocking] — 合併前必須修
  • 🟡 [important] — 應該修,有異議可討論
  • 🟢 [nit] — 錦上添花,不阻塞
  • 💡 [suggestion] — 可考慮的替代方案
  • 📚 [learning] — 教育性說明,無需動作
  • 🎉 [praise] — 寫得好

🔴 / 🟡 / 🟢 是貫穿本技能所有指南的三級嚴重度;其餘為非阻塞標註。

Language & Framework Guides

主題Reference File重點
ReactReact GuideHooks 規則、useEffect、useMemo/useCallback、元件設計、React 19 Actions、RSC、Suspense、TanStack Query v5
TypeScriptTypeScript Guide型別安全、泛型、高階型別、strict 模式、async/await、不可變性、TS 5.x 新特性
CSS / Less / SassCSS Guide變數規範、!important、效能、響應式、相容性

Cross-Cutting Guides

與語言無關、適用於所有審查的通用模式:

主題Reference File重點
Architecture ReviewArchitecture Review GuideSOLID、反模式、耦合/內聚、依賴方向
Performance ReviewPerformance Review GuideWeb Vitals、re-render、演算法複雜度、記憶體洩漏、快取
Security ReviewSecurity Review GuideXSS、CSRF、SSRF、IDOR、注入風險
HTML StandardsHTML Standards Guide語意標籤、無障礙 a11y/ARIA、WCAG 2.1 AA、表單、metadata/SEO、媒體效能、JSX 對應
Universal QualityUniversal Quality Guide複用審查、引數膨脹、漏抽象、巢狀條件、stringly-typed、TOCTOU、no-op 更新、冗餘狀態
Common BugsCommon Bugs Checklist常見 bug 模式與陷阱
XSS PreventionXSS Prevention Guide輸出編碼、CSP、輸入驗證 vs 編碼、偵測
Error HandlingError Handling GuideFail fast、錯誤層級、反模式、日誌
Async & ConcurrencyConcurrency Guideasync/await、競態、取消、結構化併發
Review Best PracticesCode Review Best Practices溝通、審查者心態、給回饋、嚴重度標籤
TestingTesting Guide測什麼不測什麼、單元/整合邊界、mock 原則、命名

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.