本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)41k · #6816

react-doctor

できること

このスキルは、Reactのコードベースに健全性スキャンを実行し、ファイル名と行番号付きで各問題を一覧にする流れを、AIに案内します。Reactアプリを安全で速く、保守しやすくしたい開発者向けです。

使う場面

  • ✓リリースの前に、Reactプロジェクトの健全性チェックをしたいとき。
  • ✓Reactの画面が遅い、または再描画が多すぎて、原因を探したいとき。
  • ✓Reactのコードをレビューし、改善を追跡するためにスコアがほしいとき。

スキルのリンク

https://github.com/PostHog/posthog/blob/master/.agents/skills/react-doctor/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/PostHog/posthog/blob/master/.agents/skills/react-doctor/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Reactアプリの問題をスキャンして、特に深刻なものから修正してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

プロジェクトのフォルダからスキャナーを実行します。スキャナーは、ハードコードされた秘密情報、不適切なエフェクト、重すぎるインポートなど多数のルールを確認します。AIは最も深刻な項目から修正し、もう一度スキャンしてスコアが上がったかを確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

React Doctor

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

Usage

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
よくある質問

目指すべきスコアはどれくらいですか?

75以上が優秀、50〜74は改善が必要、50未満は危険な状態です。

AIは問題を自分で修正しますか?

はい。検出項目を深刻な順に扱い、修正を行い、もう一度スキャンして結果を確認します。

事前にインストールが必要ですか?

スキャナーはnpxで実行されるため、パソコンにNode.jsが必要です。コマンドは毎回、最新のスキャナーを取得します。

詳細

作者による元の説明

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

repo: PostHog/posthog

人気

GitHubのスター
41k
ランキング
#6816
ライセンス
—
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル