Communityコーディング&開発github.com

ポートフォリオウェブデザイン

マルチアクシスコードレビューを実施します。マージ前に必ず使用してください。自身、別のエージェント、または人間が書いたコードをレビューする際に使用します。変更をメインブランチに取り込む前に、複数の観点からコード品質を評価する必要がある場合に使用します。インラインで貼り付けられた差分やプルリクエストのレビューを依頼された場合に使用します。

ポートフォリオウェブデザイン とは?

このスキルは、コードレビューを包括的かつ構造的に実施するための多軸レビューフレームワークを提供します。正しさ、可読性、アーキテクチャ、セキュリティ、パフォーマンスの5つの軸に沿って評価を行い、品質のゲートを設定することで、すべての変更がマージ前にレビューされることを保証します。このスキルは、Claude Code、Cursor、CodexなどのAIエージェントと対話するあらゆる開発者やAIエージェントユーザーを対象としており、プルリクエストのレビュー、コードの差分レビュー、自身や他のエージェントが生成したコードの評価など、幅広いシナリオで利用できます。レビュープロセスは、コンテキストの理解、テストの優先レビュー、実装のウォークスルー、所見の重要度分類、検証内容の確認という5つのステップで構成され、その後のディスカッションや異議解決のための階層も提供します。このフレームワークに従うことで、レビュアーはコードの品質を多角的に評価し、建設的なフィードバックを提供し、チーム全体のコードベースの健全性を継続的に向上させることができます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/code-review-and-quality

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

コードレビューと品質

概要

品質ゲートによる多次元コードレビュー。すべての変更は、マージ前にレビューされます — 例外はありません。レビューは、正しさ、可読性、アーキテクチャ、セキュリティ、パフォーマンスの5つの軸をカバーします。

承認基準: 変更がコード全体の健康状態を確実に改善する場合、たとえ完璧でなくても承認します。完璧なコードは存在しません — 目標は継続的な改善です。自分が書いた方法と異なるからといって変更をブロックしないでください。コードベースを改善し、プロジェクトの規約に従っている場合は、承認してください。

使用すべきタイミング

  • 任意のPRまたは変更をマージする前
  • 機能の実装を完了した後
  • 別のエージェントやモデルが生成したコードを評価する必要がある場合
  • 既存コードをリファクタリングする場合
  • バグ修正後 (修正自体と回帰テストの両方をレビュー)

5軸レビュー

すべてのレビューは、以下の次元でコードを評価します:

1. 正しさ

コードは、主張することを正しく行っていますか?

  • 仕様やタスク要件に一致していますか?
  • エッジケース (null、空、境界値) は処理されていますか?
  • エラーパスは処理されていますか (ハッピーパスだけでなく)?
  • すべてのテストに合格していますか?テストは正しいものをテストしていますか?
  • オフバイワンエラー、競合状態、または状態の不整合はありませんか?

2. 可読性とシンプルさ

別のエンジニア (またはエージェント) が、作成者の説明なしにこのコードを理解できますか?

  • 名前は説明的で、プロジェクトの規約に一貫していますか? (文脈なしの temp、data、result は避ける)
  • 制御フローは単純明快ですか (ネストされた三項演算子、深いコールバックを避ける)?
  • コードは論理的に整理されていますか (関連するコードをグループ化、明確なモジュール境界)?
  • 簡略化すべき「巧妙な」トリックはありませんか?
  • より少ない行数で実現できませんか? (100行で十分なのに1000行あるのは失敗)
  • 抽象化は、その複雑さに見合っていますか? (3回目のユースケースが現れるまで一般化しない)
  • コメントは、自明でない意図を明確にするのに役立ちますか? (ただし、自明なコードにコメントしない)
  • デッドコードの痕跡はありませんか:no-op変数 (_unused)、後方互換性のためのシム、// removed コメント?
  • 新しい条件分岐が、無関係なフローに無理やり追加されていませんか? それは些細な問題ではなく、設計上の臭いです — 既存のパスを複雑にするのではなく、ロジックを独自のヘルパー、状態、またはポリシーに押し出してください。
  • 同じ形状に対する繰り返しの条件分岐が見られますか? それらは、欠落しているモデルやディスパッチャを示しています。「一時的な」ブランチは、通常、永続的な負債です。

3. アーキテクチャ

変更は、システムの設計に適合していますか?

  • 既存のパターンに従っているか、新しいパターンを導入していますか?新しい場合は、正当化されていますか?
  • クリーンなモジュール境界を維持していますか?
  • 共有すべきコードの重複はありますか?
  • 依存関係は正しい方向に流れていますか (循環依存なし)?
  • 抽象化のレベルは適切ですか (過剰設計ではない、結合度が高すぎない)?
  • このリファクタリングは複雑さを削減していますか、それとも単に移動していますか? 変更を追跡するために読者が保持しなければならない概念の数を数えてください。「よりクリーンな」バージョンでその数が変わらない場合、それはよりクリーンではありません — 同じロジックを再集中させるよりも、ブランチ、モード、またはレイヤー全体を消失させる再構築を優先してください。抽象化を磨くよりも、削除することを優先してください。
  • 機能固有のロジックが、共有または汎用モジュールに漏れ出していませんか? ロジックをその所有レイヤーに保持し、ほぼ重複したものではなく、既存の正規のヘルパーを再利用し、アーキテクチャのドリフトを正規化しないでください。
  • 型境界は明示的ですか? 不透明な不変条件を隠蔽する、理由のない any/unknown/optional/キャストやサイレントフォールバックに疑問を呈してください — 境界を明示的にすることで、周囲の制御フローがよりシンプルになることがよくあります。

4. セキュリティ

詳細なセキュリティガイダンスについては、security-and-hardening を参照してください。変更によって脆弱性が生じますか?

  • ユーザー入力は検証およびサニタイズされていますか?
  • シークレットはコード、ログ、バージョン管理から除外されていますか?
  • 必要な場所で認証/認可はチェックされていますか?
  • SQLクエリはパラメータ化されていますか (文字列連結なし)?
  • 出力はXSSを防ぐためにエンコードされていますか?
  • 依存関係は信頼できるソースからのもので、既知の脆弱性はありませんか?
  • 外部ソース (API、ログ、ユーザーコンテンツ、設定ファイル) からのデータは信頼できないものとして扱われていますか?
  • 外部データフローは、ロジックやレンダリングで使用する前に、システム境界で検証されていますか?

5. パフォーマンス

詳細なプロファイリングと最適化については、performance-optimization を参照してください。変更によってパフォーマンスの問題が生じますか?

  • N+1クエリパターンはありませんか?
  • 無制限のループや制約のないデータフェッチはありませんか?
  • 非同期にすべき同期操作はありませんか?
  • UIコンポーネントでの不要な再レンダリングはありませんか?
  • リストエンドポイントにページネーションが欠落していませんか?
  • ホットパスで大きなオブジェクトが作成されていませんか?

構造的な是正措置

構造的な問題を指摘する場合は、問題だけでなく、その対処法を提案してください。単に「これは複雑だ」と言うだけのレビューでは、作成者は推測するしかありません。名前の付いた再構築を目指してください:

  • 一連の条件分岐を、型付きモデルまたは明示的なディスパッチャに置き換える。
  • 重複したブランチを、単一のより明確なフローに統合する。
  • オーケストレーションをビジネスロジックから分離 し、それぞれが独立して読めるようにする。
  • 機能固有のロジックを 共有モジュールから、その概念を所有するパッケージに移動する。
  • 独自のほぼ重複したものではなく、正規のヘルパーを再利用 する。
  • 型境界を明示的に して、下流の分岐を消失させる。
  • APIを明確にせずに間接参照を追加するだけのパススルーラッパーを削除 する。
  • ヘルパーを抽出するか、大きなファイルを 焦点を絞ったモジュールに分割する。

同じ複雑さを広めるのではなく、可動部分を削除する是正措置を優先してください。

変更のサイズ設定

小さく焦点を絞った変更は、レビューが容易で、マージが迅速で、デプロイが安全です。以下のサイズを目標にしてください:

~100行変更 → 良好。一度のレビューで確認可能。
~300行変更 → 単一の論理的な変更であれば許容可能。
~1000行変更 → 大きすぎる。分割してください。

差分サイズだけでなく、ファイルサイズにも注意してください。 小さな差分でも、ファイルを健全な境界を超えて押し上げる可能性があります — 単一ファイルの合計行数が約1000行 (上記の約1000行変更の閾値とは異なります) は、一般的な検査シグナルであり、厳格な上限ではありません。変更によってすでに大きなファイルが実質的に大きくなる場合は、さらに積み重ねる前に、まずヘルパー、サブコンポーネント、またはモジュールを抽出するかどうかを検討してください。分解してから、追加してください。

「1つの変更」と見なされるもの: 1つのことを処理し、関連するテストを含み、提出後もシステムが機能し続ける、単一の自己完結型の修正。機能の一部 — 機能全体ではありません。

変更が大きすぎる場合の分割戦略:

戦略方法タイミング
スタック小さな変更を提出し、それに基づいて次の変更を開始する順次依存関係
ファイルグループ別異なるレビュアーが必要なグループに対して変更を分離する横断的な懸念事項
水平分割最初に共有コード/スタブを作成し、次にコンシューマを作成する階層化アーキテクチャ
垂直分割機能のより小さなフルスタックスライスに分割する機能開発

大きな変更が許容される場合: 完全なファイル削除と自動リファクタリング。レビュアーはすべての行ではなく、意図を検証するだけで済みます。

リファクタリングと機能開発を分離してください。 既存のコードをリファクタリングし、新しい動作を追加する変更は、2つの変更です — 別々に提出してください。小さなクリーンアップ (変数名の変更) は、レビュアーの裁量で含めることができます。

変更の説明

すべての変更には、バージョン管理の履歴内で単独で意味をなす説明が必要です。

1行目: 短く、命令形で、単独で意味をなすもの。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step.

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

関連スキル