React Doctor

作者 brianlovin1a9819ebf3fe無授權條款376 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫6 個月前更新

Diagnose and fix React codebase health issues. Use when reviewing React code, fixing performance problems, auditing security, or improving code quality.

AI 產生的概覽

診斷 React 程式碼庫在安全、效能、正確性與架構方面的健康問題,並給出 0-100 分。

功能
掃描 React 程式碼庫中的安全、效能、正確性、架構、Next.js、打包體積、伺服器端、無障礙與死程式碼問題。它會輸出附檔案路徑與行號的診斷結果,並給出 0-100 分及嚴重程度分級。工作流程是先執行掃描,優先修正錯誤,再重新執行以確認分數提升。
適用情境
適用於審查 React 程式碼、修正效能問題、稽核安全性或提升整體程式碼品質。也適合在重構前後對專案做一次整體健康檢查。
執行需求
需要 Node.js 與 npx,並具備網路存取以取得 react-doctor 套件。此技能不含指令碼,僅為說明文件。

React Doctor

Scans your React codebase for security, performance, correctness, and architecture issues. Outputs a 0-100 score with actionable diagnostics.

Usage

bash
npx -y react-doctor@latest . --verbose

Workflow

  1. Run the command above at the project root
  2. Read every diagnostic with file paths and line numbers
  3. Fix issues starting with errors (highest severity)
  4. Re-run to verify the score improved

Rules (47+)

  • Security: hardcoded secrets in client bundle, eval()
  • State & Effects: derived state in useEffect, missing cleanup, useState from props, cascading setState
  • Architecture: components inside components, giant components, inline render functions
  • Performance: layout property animations, transition-all, large blur values
  • Correctness: array index as key, conditional rendering bugs
  • Next.js: missing metadata, client-side fetching for server data, async client components
  • Bundle Size: barrel imports, full lodash, moment.js, missing code splitting
  • Server: missing auth in server actions, blocking without after()
  • Accessibility: missing prefers-reduced-motion
  • Dead Code: unused files, exports, types

Score

  • 75+: Great
  • 50-74: Needs work
  • 0-49: Critical

來源與署名

來源:brianlovin/agent-config位於skills/react-doctor提交1a9819e

授權條款: 無授權條款

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

檢舉或申請下架