frontend-review
Automated and manual review for frontend code, focusing on TypeScript quality and E2E test validation.
Install
mkdir -p .claude/skills/frontend-review && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12889" && unzip -o skill.zip -d .claude/skills/frontend-review && rm skill.zipInstalls to .claude/skills/frontend-review
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
フロントエンド(TypeScript/CSS/E2Eテスト)の変更点を自動検証(Biome/Playwright)および目視レビューし、プロジェクト特有のルールや一般的なベストプラクティスを検証するスキル。Key capabilities
- →Execute linter and format checks (Biome)
- →Run E2E tests (Playwright)
- →Acquire change differences using `git diff`
- →Comprehend overall changes in components, styles, or E2E test code
- →Scrutinize code line by line against a review checklist
How it works
This skill automates linting and E2E tests, then guides a manual review of code changes against project-specific and general best practices.
Inputs & outputs
When to use frontend-review
- →Reviewing frontend PRs
- →Running E2E tests
- →Checking linting and formatting
- →Validating frontend architecture
About this skill
フロントエンドコードレビューガイドライン
このスキルは、React / TypeScript で書かれたフロントエンドコードの変更点(Diff)をレビューする際の手順、自動検証コマンド、および目視レビュー用チェックリストを提供します。
1. レビューの流れ
フロントエンド関連のファイル(frontend/ 配下)に変更があった場合、以下の手順でレビューを実施してください。
- 自動ツールの実行による前提検証:
- フロントエンドのディレクトリでリンターおよびフォーマットチェック(Biome)を実行します:
task lint - E2Eテスト(Playwright)を実行します:
# もしくは cd frontend && npx playwright test # ※Wailsが起動していない状態でも、モックを使用して実行可能です # コマンドは環境に合わせて実行してください task test:e2e - もし自動ツールでエラーが発生した場合は、その修正案も指摘事項に含めます。
- フロントエンドのディレクトリでリンターおよびフォーマットチェック(Biome)を実行します:
- 差分(Diff)の取得:
git diff(またはステージング済みの差分を確認するgit diff --cachedや、特定のブランチと比較するgit diff origin/mainなど)を実行して変更差分を取得します。
- 変更全体の把握:
- どのコンポーネント、スタイル、あるいはE2Eテストコードが追加・変更されたかを把握します。
- 差分の目視レビュー:
- 取得した差分に基づき、後述のレビューチェックリストに照らし合わせてコードを1行ずつ精査します。
- 指摘事項の整理:
- ルール違反や改善の余地がある箇所について、改善案となる「具体的な修正コード例」を合わせて作成します。
- レビュー結果の報告:
- 後述の出力テンプレートに従い、結果をユーザーに報告します。
2. レビューチェックリスト
2.1 アーキテクチャと構造(プロジェクトルール)
- HashRouterの強制: デスクトップアプリ(Wails)のファイルプロトコル制限に対応するため、
BrowserRouterではなく必ずHashRouterが使用されているか。 - コンポーネントの配置: UIコンポーネントは
frontend/src/components/ui/配下に機能ごとのディレクトリ(例:Toolbar/Toolbar.tsx)を作って配置されているか。 - Wails IPC通信: バックエンドの呼び出しには
frontend/wailsjs/go/内の自動生成バインディングを使用し、これらを直接手動で編集していないか。 - 状態管理の制限: 標準の Hooks/Context または軽量な
Zustandのみが使用されているか(ReduxやMobXなどの重量フレームワークが導入されていないか)。
2.2 スタイリングとデザイン(プロジェクトルール)
- CSS Modulesの適用: コンポーネント固有のスタイルは CSS Modules(
*.module.css)として同一ディレクトリに配置されているか。 - クラス名の命名規則: CSS Modules 内のクラス名はキャメルケース(例:
styles.listPage)になっているか。 - CSS変数の徹底利用: 色や背景などの指定に、
frontend/src/styles/variables.cssで定義された変数が使用されているか(ハードコードされたカラーコード、例:#30363d等の生の値が残っていないか)。 - テーマ対応:
body.light-themeの有無によるライト・ダークテーマ切り替えが考慮されているか。 - Vanilla CSSの遵守: ユーザーの明示的な指示がない限り、Tailwind CSS 等の外部ユーティリティファーストフレームワークが導入されていないか。
2.3 コードスタイルとBiome(プロジェクトルール)
- インデントとクォート: インデントに タブ (Tab)、文字列に ダブルクォート (") が使用されているか(Biome の設定に合致しているか)。
- 非nullアサーション(
!)の禁止: TypeScriptの!アサーションによるランタイムクラッシュのリスクを避け、オプショナルチェイニング(?.)や安全な存在チェック(if)で対応しているか。 - フック依存配列の厳格化:
useEffect,useMemo,useCallback等の依存配列に必要な変数が漏れなく指定されているか。また、不要な再生成を防ぐためuseCallback/useMemoが適切に活用されているか。 - アクセシビリティ(a11y)の対応:
- ボタン要素に
type属性(type="button"など)が指定されているか。 - SVG要素に代替テキスト(
<title>)が含まれているか。 - クリックイベントを持つ
div等の非対話的要素にtabIndexおよびonKeyDownが適切に指定されているか。
- ボタン要素に
-
!importantの禁止: CSS内で!importantを使用せず、詳細度を制御してスタイリングしているか。
2.4 TypeScript/React品質向上(一般ルール)
-
any型の原則禁止: 意図しない型安全性の破壊を防ぐため、原則としてanyを使用せず、適切なインターフェースやジェネリクス、またはunknownを使用しているか。 -
useEffectのクリーンアップ処理:useEffect内で登録したイベントリスナー、タイマー(setTimeout,setInterval)、あるいは非同期リクエストのキャンセル処理などのクリーンアップ(return関数)が適切に行われているか。 - 不要な再レンダリングの防止: パフォーマンスに影響を及ぼす重い処理や、子コンポーネントへのコールバック/オブジェクトの引き渡しにおいて、
useCallbackやuseMemoが適切に使用されているか。
2.5 E2Eテストとモック(プロジェクトルール)
- テストコードの配置: Playwrightテストコードが
frontend/tests/e2e/配下に機能ごとに分割して配置されているか。 - Wails APIのモック化: 新しいWails APIの呼び出しを追加した場合、
frontend/tests/e2e/helpers/mock-wails.tsにも適切なモックが追加・更新されているか。 - コードとテストの同期: UIやAPIバインディングの変更と同時に、同一のコミット/PR内でテストおよびモックコードが更新されているか。
3. レビュー結果の出力テンプレート
レビュー結果を報告する際は、以下のフォーマットをそのまま適用して出力してください。
# フロントエンドコードレビュー結果
## 概要
[ここにレビュー対象のブランチ/コミット/変更内容の全体的な要約を記述。自動検証ツール(Biome/Playwright)の実行結果もここに記述]
## 指摘事項
[問題が見つからなかった場合は「指摘事項はありません」と記述]
### 1. [指摘カテゴリ(例: スタイリング、Biomeルール違反、TypeScript品質など)]
* **ファイル**: [ファイル名と行数へのリンク(例: frontend/src/components/ui/Toolbar/Toolbar.tsx#L25-L30)]
* **問題点**: [何がルールに違反しているか、なぜ修正すべきかの理由]
* **修正コード例**:
```tsx
// [ここに修正後の具体的なコード例]
```
---
[必要に応じて指摘事項を繰り返します]
When not to use it
- →When `BrowserRouter` is used instead of `HashRouter` for desktop apps
- →When UI components are not placed under `frontend/src/components/ui/`
- →When backend API calls are made without auto-generated bindings
Limitations
- →Requires `HashRouter` for desktop applications
- →UI components must be placed in specific directories
- →Wails IPC communication must use auto-generated bindings
How it compares
This workflow combines automated checks with a structured manual review checklist, ensuring adherence to project-specific architectural rules and coding standards, unlike a purely manual review.
Compared to similar skills
frontend-review side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| frontend-review (this skill) | 0 | 2mo | Review | Intermediate |
| feature-flags | 6 | 6mo | Review | Intermediate |
| verify-frontend | 0 | 2mo | Review | Intermediate |
| ui-ux-expert-skill | 91 | 9mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
feature-flags
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.
verify-frontend
DeLaser123
Run the full frontend verification pipeline for Paryty — TypeScript check, build, and tests. Use after any TypeScript/React code change.
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
accessibility-compliance
wshobson
Implement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.
frontend-code-review
langgenius
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.
react-best-practices
redpanda-data
Client-side React performance optimization patterns.