Skip to content
cccskills
FreePublished on GitHub

Next.js App Router Client/Server Boundary

App Router の Server Component でクライアント専用APIを使っていないか確認する。

The English summary is being prepared. Showing the original description.

See how to install

Files included (9)

  • SKILL.md2.4 KB
  • eval/promptfoo.yaml1.3 KB
  • fixtures/01-usestate-in-server-component-happy.md816 B
  • fixtures/02-use-client-directive-false-positive.md662 B
  • golden/01-usestate-in-server-component-happy.md743 B
  • golden/02-use-client-directive-false-positive.md300 B
  • prompt/system.md1.3 KB
  • prompt/user.md278 B
  • README.md354 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Goal / 目的

  • App Router の Server Component でクライアント専用APIを誤って使うミスを減らす。

Non-goals / 扱わないこと

  • 画面設計やUI/UXの是非。
  • App Router 以外のフレームワーク構成。
  • 非同期データ取得の最適化全般(別スキルの対象)。

False-positive guards / 抑制条件

  • ファイル先頭に use client が明示されている場合は指摘しない。
  • コメントで意図的な回避策が明記されている場合は慎重に扱う。

Rule / ルール

  • Server Component で useState / useEffect / useLayoutEffect を使わない。
  • Server Component で window / document / localStorage / sessionStorage を参照しない。

Evidence / 根拠の取り方

  • 差分内にクライアント専用APIが直接登場していることを示す。
  • use client の有無を併記し、境界違反である根拠を示す。

Heuristics / 判定の手がかり

  • use client のないファイルで React Hooks や DOM API を使っている。
  • window 依存の処理が Server Component に残っている。

Actions / 改善案

  • use client が必要な場合は、対象コンポーネントを分割してクライアント側へ移す。
  • DOM API が必要な処理をクライアント専用の子コンポーネントに閉じ込める。

Output / 出力

  • Finding: / Evidence: / Impact: / Fix: を含む短いメッセージにする。

評価指標(Evaluation)

  • 合格基準: 境界違反が差分に紐づき、根拠と最小修正が説明されている。
  • 不合格基準: 差分と無関係な指摘、根拠のない断定、抑制条件の無視。

人間に返す条件(Human Handoff)

  • 設計意図が不明で解釈が分かれる場合は質問として返す。
  • 大規模なコンポーネント分割が必要な場合は人間レビューへ返す。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

<What this skill does>

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

画像・ボタン・フォーム要素に適切なアクセシブルネームがあるか確認する。

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

Ensure ADRs capture context, decision, alternatives, tradeoffs, and follow-ups in a way that prevents future drift.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

敵対的分析手法を統合したレビューの entry skill。認知バイアス対策の3手法 (Pre-mortem / War Game / Logic Torturing)と、宣言・主張と実態の乖離を突く claim-vs-actual 検出3パターン(Self-Contradiction / Refactor-Claim Audit / Cross-File Leakage)へルーティングし、通常のレビューでは見えない設計の盲点・ 防御の穴・論理の弱点・宣言と実装のズレを可視化する。

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

Review changes to the Agent Skills import/export bridge for path safety, round-trip fidelity, and validation correctness.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

Checks whether AI-assisted work defines review criteria, accessible context, explicit review loop, human judgment boundary, and feedback capture before delegating to an agent.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

See all skills by s977043

Report a problem with this skill