React Component Diagnosisのロゴ

React Component Diagnosis

コミュニティ
hylarucoder
react-component-diagnosis

Reactコンポーネントまたはコンポーネントディレクトリを1つ対象に、利用側のAPI、データフロー、テストのしやすさ、拡張性、パフォーマンス、メンタルモデル、境界や契約を診断し、コード上の根拠と優先順位付きの改善案を提示します。ユーザーがコンポーネントや.tsxファイルを示し、props/API設計、effects、再レンダリング、アーキテクチャ、リファクタリングの必要性について尋ねた場合に使います(コンポーネント診断、props設計、なぜ再レンダリングするのか)。React以外のファイルにはcode-review-and-qualityを、複数のシステムモジュールにまたがる範囲にはhai-architectureを使います。

Add to TypingMind

概要

公開者hylarucoder
リポジトリhai-stack
スキル名react-component-diagnosis
スター
284
フォーク
15
同梱ファイル
2
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    hylarucoderがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「React Component Diagnosis」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/hylarucoder/hai-stack/tree/main/skills/react-component-diagnosis
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hylarucoder/hai-stack.git /tmp/hai-stack
mkdir -p .claude/skills
cp -r /tmp/hai-stack/skills/react-component-diagnosis .claude/skills/react-component-diagnosis
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでReact Component Diagnosisを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にReact Component Diagnosisを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、React Component Diagnosisは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

React Component Diagnosis

Purpose

Diagnose one React component's design from code that was actually read. The report should explain the highest-leverage behavior, API, state, effect, rendering, or boundary problem—not reward a fashionable directory shape or fill seven categories with generic advice.

Evidence gate

  1. Read the component entry file and the direct hooks, utilities, context, types, tests, and callers needed to understand its critical paths. Do not claim the whole directory was reviewed if some files were skipped.
  2. Trace props and external data through derivation, state, effects, callbacks, and rendered output.
  3. Cite concrete file:line evidence for every score deduction and recommendation.
  4. Attribute one root problem to its most relevant dimension; do not double-count it.
  5. Mark anything inferred from missing runtime/profile evidence as unverified.

Dimensions

DimensionCore question
Consumer APICan callers express valid use cases without learning internal mechanics?
Data flowIs props/state/derived data/effect flow unidirectional and traceable?
TestabilityCan important behavior be verified through stable public seams?
ExtensibilityDoes a likely change have a proportionate blast radius without speculative abstraction?
PerformanceIs there evidenced unnecessary rendering, computation, allocation, or leaked work?
Mental modelCan a reader predict ownership and where behavior changes?
Boundaries & contractsAre external data, third parties, errors, and trust boundaries handled once by the right owner?

Read references/dimensions.md for detailed evidence prompts, React-specific failure modes, and score calibration. Use only the prompts relevant to the component.

Guardrails

  • Prop, file, or line counts are clues, never automatic deductions.
  • Do not reward a new type at every layer. A new shape earns its cost only when meaning, constraints, audience, or ownership changes; otherwise preserve one canonical shape.
  • Do not recommend useMemo, useCallback, context splitting, dynamic imports, adapters, slots, factories, or Error Boundaries by default. Name the observed rerender, computation, failure boundary, or change pressure that justifies them.
  • A component can be large and coherent; a small component can still hide tangled state and effects.
  • Praise only patterns supported by code, and award the top score only when the implementation is a useful local precedent.

Workflow

  1. Define the component boundary and summarize its responsibility in one sentence.
  2. Build a small map: caller inputs → derivation/state/effects → children/output → callbacks.
  3. Identify the one or two critical paths most likely to affect users or future changes.
  4. Inspect the seven dimensions against those paths and tests.
  5. Score each dimension from 1–5 using references/dimensions.md, citing evidence and avoiding double-counting.
  6. Rank recommendations by impact and effort; distinguish confirmed problems from profiling or product questions that still need evidence.
  7. Check the report against references/output-template.md before finalizing.

For animation, video, or other high-frequency rendering, explicitly trace what changes each frame, which computations and allocations rerun, DOM-node volume, dependency stability, and whether cleanup actually cancels work. Do not infer a performance defect from hook presence alone.

Output

Use references/output-template.md, trimmed to the component's scale: responsibility, seven-score card, evidence-backed analysis, strengths, and P0/P1/P2 recommendations with effort. Include a diagram only when the multi-step data/effect flow is otherwise hard to understand.

Use a different skill when

  • Non-React file/function code smells → code-review-and-quality.
  • Multiple modules, package boundaries, or system ownership → hai-architecture.
  • One identifier or prop name only → hai-naming.
  • Type-safety-only work → an available TypeScript type-safety skill.
  • Applying the refactor rather than diagnosing it → an implementation/refactoring workflow.

Decision boundary: one component and its direct support surface stays here; a cross-system design question moves to architecture.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「React Component Diagnosis」では何ができますか?

Reactコンポーネントまたはコンポーネントディレクトリを1つ対象に、利用側のAPI、データフロー、テストのしやすさ、拡張性、パフォーマンス、メンタルモデル、境界や契約を診断し、コード上の根拠と優先順位付きの改善案を提示します。ユーザーがコンポーネントや.tsxファイルを示し、props/API設計、effects、再レンダリング、アーキテクチャ、リファクタリングの必要性について尋ねた場合に使います(コンポーネント診断、props設計、なぜ再レンダリングするのか)。React以外のファイルにはcode-review-and-qualityを、複数のシステムモジュールにまたがる範囲にはhai-architectureを使います。

TypingMindでReact Component Diagnosisを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。React Component Diagnosisはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにReact Component Diagnosisをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/hylarucoder/hai-stack/tree/main/skills/react-component-diagnosisを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

React Component Diagnosisを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

React Component Diagnosisで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもReact Component Diagnosisを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「React Component Diagnosis」は無料ですか?

hylarucoderがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇