Communitygithub.com

Geruyang/agent-skills-library

ブラウザゲームのUIサーフェスを設計します。HUD、メニュー、オーバーレイ、レスポンシブレイアウト、またはプレイフィールドを保護する必要のあるビジュアルディレクションをユーザーが要求した場合に使用します。

agent-skills-library とは?

このスキルは、ブラウザゲームのインターフェースレイヤーを設計・実装するための包括的なガイドラインを提供します。汎用的なダッシュボードUIではなく、ゲーム体験をサポートする読みやすくテーマに沿ったインターフェースを生成することを目的としています。デフォルトでは、ゲームワールドはcanvasやWebGLで構築し、テキストが多いUIはDOMで構築することを前提としています。CSS変数によるテーマ設定、明確な情報階層の構築、特に3Dゲームにおけるプレイフィールドの保護に重点を置いています。デスクトップとモバイルの両方に対応し、カメラや入力制御との競合を避ける設計を推奨します。また、過剰なアニメーションや汎用的なアプリレイアウトなどのアンチパターンも定義されており、ゲームの世界観に根ざしたUIを実現するための具体的なルールが提供されています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Geruyang/agent-skills-library/tree/HEAD/original-skills/x-openai-game-ui-frontend-1cdc78a

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

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

ドキュメント

Game UI Frontend

概要

ゲームに可視的なインターフェースレイヤーが必要な場合にこのスキルを使用します。仕事は汎用的なダッシュボードUIを生成することではありません。ゲーム体験をサポートする、読みやすくテーマに沿ったブラウザゲームインタフェースを生成することです。

デフォルトの前提:ゲームワールドはcanvasまたはWebGLで構築し、テキスト主体のUIはDOMで構築します。

フロントエンド標準

  1. コーディング前にビジュアルディレクションを確立する。
    • ジャンルとファンタジー
    • マテリアル言語
    • タイポグラフィ
    • パレット
    • モーションのトーン
  2. UIテーマにCSS変数を使用する。
  3. 明確な階層を構築する。
    • クリティカルな戦闘または生存情報を最優先
    • 二次的なツールを次に
    • めったに使用しない設定はメニューやドロワーの背後に
  4. 特に3Dでは、プレイフィールドを最優先に保護する。
    • 初期画面は数秒以内にプレイ可能であると感じられること。
    • デフォルトでは、1つの主要な永続HUDクラスターと、最大1つの小さな二次クラスターを使用する。
    • 通常プレイ中はプレイフィールドの中央をクリアに保つ。
    • 通常プレイ中はプレイフィールドの中央下部をほぼクリアに保つ。
    • ロア、フィールドノート、クエスト詳細、長いコントロールリストは、ドロワー、トグル、またはポーズ画面の背後に配置する。
    • 永続的なボックス型パネルよりも、コンテキストに応じたプロンプトや一時的なヒントを優先する。
  5. オーバーレイは動きがあっても読みやすいようにする。
    • 必要に応じて、背景パネル、エッジ処理、コントラスト、控えめなぼかしを使用する。
  6. 最初からデスクトップとモバイルの両方に対応して設計する。
  7. 3D UIはカメラと入力制御の境界を考慮して設計する。
    • メニュー、ダイアログ、またはポインタ駆動のUIがアクティブな場合は、カメラ制御入力を一時停止またはゲートする。
    • ポインターロック、ドラッグして見回す、メニュー操作の状態を明示的にする。

3Dスターターのデフォルト

探索、移動、または三人称スタータースキャフォールドには、以下のUIバジェットを推奨します:

  • 端に1つのコンパクトな目標チップまたはステータスストリップ
  • 1つの一時的なコントロールヒントまたはインタラクションプロンプト
  • 1つのオプションの折りたたみ可能な二次サーフェス(ジャーナル、マップ、クエストログなど)

最初のロード時にすべての情報サーフェスを開かないでください。ユーザーがより深いUIを開く前に、シーンが読み取れる状態である必要があります。

3Dブラウザゲームのデフォルト実装制約として:

  • 常時表示の全幅ヘッダー+マルチカードボディ+全幅フッターのレイアウトは使用しない
  • 通常移動中に大きな中央画面または中央下部のオーバーレイを配置しない
  • ユーザーが明示的に密集したレイアウトを要求しない限り、デスクトップでは永続HUDでビューポートの約20〜25%以上を覆わない
  • モバイルでは、大きなパネルでプレイフィールドを覆う前に、狭いスタックまたはコンテキストチップに折りたたむ

プロンプトルール

モデルにゲームUIの設計または実装を依頼する際は、以下を含めてください:

  • ゲームのファンタジー
  • カメラまたは視点
  • プレイヤーのアクション
  • HUDレイヤー
  • 3Dの場合のカメラまたはコントロールモード
  • モーションのトーン
  • デスクトップとモバイルの期待値
  • プレイフィールド保護と開示戦略
  • 避けるべき明示的なアンチパターン

具体的なプロンプトの形状については、../../references/frontend-prompts.md を参照してください。

モーションルール

  • 絶え間ないマイクロアニメーションよりも、意味のある少数のトランジションを優先する。
  • 強いモーションは、状態変化、報酬、危険、オンボーディングのために予約する。
  • 非必須のアニメーションには、動きを減らす設定を尊重する。
  • 3D HUDのモーションがカメラのモーションと競合しないようにする。

良い状態の例

  • HUD要素はシーンを平坦化せずに判読可能である。
  • メニューはSaaS管理パネルのように見えず、ゲームワールドにネイティブであると感じられる。
  • レイアウトはブレークポイント間でクリーンに適応する。
  • ポインタ、キーボード、ゲーム状態のフィードバックが明確である。
  • 3Dゲームでは、メニューとHUDの状態がカメラ制御やポインターロックと競合しない。
  • 3Dゲームでは、最初のプレイ可能なビューが、移動、照準、空間認識のためにビューポートの大部分を利用可能に保つ。
  • 永続的な情報密度は、スクリーンショットがUIコンポではなくゲームシーンとして読める程度に低い。

アンチパターン

  • 汎用的なアプリダッシュボードレイアウト
  • テーマのないフラットなプレースホルダースタイリング
  • 意図のないデフォルトフォントスタック
  • プレイフィールドを覆い隠す密集したオーバーレイ
  • ライブのプレイ可能なシーンの上に配置された大きなタイトルカードや複数段落のノート
  • ビューポートのすべての端に均等に分散された等重量のボックス型パネル
  • コントロール、目標、ノート、ロアが最初のロードですべて展開されている
  • 3Dプレイでの常時表示の上部・下部クロームと大きな中央またはボディパネル
  • すべての要素に対する過剰なモーション
  • DOMの方が明確で安価な場合のCanvasのみのUI
  • 標準DOMの方が明確な場合にHUDコントロールを3Dシーンに強制的に組み込む
  • モーダルやインベントリパネルの下でカメラ入力をアクティブのままにする

参考文献

  • 共有アーキテクチャ: ../web-game-foundations/SKILL.md
  • プロンプトレシピ: ../../references/frontend-prompts.md
  • ローカルクローム3Dレイアウトパターン: ../../references/three-hud-layout-patterns.md
  • Reactホスト3D UIコンテキスト: ../react-three-fiber-game/SKILL.md
  • プレイテストレビュー: ../../references/playtest-checklist.md

Individual skills in this repo

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

Geruyang/agent-skills-library

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

Geruyang/agent-skills-library

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

Geruyang/agent-skills-library

Use for new frontend applications, dashboards, games, creative websites, hero sections, and visually driven UI from scratch, or when the user explicitly asks for a redesign/restyle/modernization. Builds from clean, airy, high-taste, readable image-generated concept design with section-specific references, faithful implementation, and browser testing.

Geruyang/agent-skills-library

Use when testing, debugging, or making targeted improvements to rendered frontend apps through the Build Web Apps or web dev plugin: local dev servers, UI regressions, interaction bugs, console errors, responsive layout, and visual QA. Check whether the Browser plugin is available and use it first when it is; otherwise use regular Playwright with the recorded reason.

Geruyang/agent-skills-library

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

Geruyang/agent-skills-library

Guide for building, configuring, and deploying microfrontends on Vercel. Use this skill when the user mentions microfrontends, multi-zones, splitting an app across teams, independent deployments, cross-app routing, incremental migration, composing multiple frontends under one domain, microfrontends.json, @vercel/microfrontends, the microfrontends local proxy, or path-based routing between Vercel projects. Also use when the user asks about shared layouts across projects, navigation between microfrontends, fallback environments, asset prefixes, or feature flag controlled routing.

Geruyang/agent-skills-library

Next.js App Router expert guidance. Use when building, debugging, or architecting Next.js applications — routing, Server Components, Server Actions, Cache Components, layouts, middleware/proxy, data fetching, rendering strategies, and deployment on Vercel.

Geruyang/agent-skills-library

Use when sizing Public Equity Investing positions, finding equity hedges, or building an integrated position-and-hedge risk plan from a listed-equity thesis. Do not use for thesis construction, standalone event underwriting, trade execution, personal investment advice, or credit-instrument risk.

Geruyang/agent-skills-library

Integrate data visualizations into React and Next.js applications. Use when the user needs chart components, UML-like or architecture diagram components, React integration patterns, Next.js client or server boundaries, hydration-safe rendering, lazy loading, framework-aware performance, scroll-driven visual stories, or export guidance.

Geruyang/agent-skills-library

shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring themes, or troubleshooting component issues.

Geruyang/agent-skills-library

v0 by Vercel expert guidance. Use when discussing AI code generation, generating UI components from prompts, v0 CLI usage, v0 SDK/API integration, or integrating v0 into development workflows with GitHub and Vercel deployment.

Geruyang/agent-skills-library

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".

関連スキル