product-mockup について
製品やアプリの展示画像を作るデザインスキルです。実物製品にはGeminiの画像生成、アプリのスクリーンショットにはHTML/CSSのフレームを使い、画面内容を保ちます。
主な機能
- 01Geminiによる製品シーン生成
- 02CSSでのデバイスフレーム作成
- 03遠近感と複数デバイスのレイアウト
- 04比較表示と機能コールアウト
- 05スクリーンショットのウィンドウ表示
活用シーン
- 01実物製品のライフスタイル画像やパッケージ画像の制作
- 02実際のアプリ画面をデバイスモックアップに配置
- 03リデザイン前後の違いの提示
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ arnavpuri/ designskills --skill product-mockupインストール後、Claude Code で/product-mockupを入力して読み込まれたか確認します。
詳細
プロダクトモックアップのデザイン
プロフェッショナルなプロダクトモックアップやショーケースを作成します。方法は2つあります。
- Gemini(物理的な製品のデフォルト): 製品写真+プロンプト → フォトリアルな演出シーン、パッケージ、ライフスタイル写真
- HTML/CSS(アプリ/ウェブのスクリーンショットのデフォルト): Gemini は UI を描き直すため、テキスト、アイコン、レイアウトが変更されます。そこで、実際のスクリーンショットを CSS のデバイスフレームで囲み(手順 3~9)、PNG にレンダリングします。フォトリアルなデバイスシーンにする場合は、画面を空白にしたシーンを生成してから、コードでスクリーンショットを合成します
手順 1:デザインコンテキストを読み込む
- まず
.agents/design-context.mdを読みます。ブランドカラー(16 進数)、フォント、スタイルの類型が記載されています - ファイルがない場合は、
design-contextのデフォルトフォールバックを使用し、デフォルト設定を使用したことをユーザーに伝えます - プロダクトモックアップは、ブランドのデザインスタイル(ミニマル、力強い、豪華など)に合わせます
Gemini による画像生成
パイプライン/CLI:image-generation。プロンプトの作成、トリミング、テキストオーバーレイによる代替方法については、graphic-design の手順 3 を参照してください。
--image product.pngを指定して製品写真を渡し、「参照画像とまったく同じ形状、色、ラベルのテキスト、ロゴを維持してください」と指示します- アスペクト比:ECサイトやSNS向けは 1:1 または 4:5、ウェブのヒーロー画像向けは 16:9 または 3:2 とし、
--resize WxHで正確なピクセルサイズにトリミングします - 出力された PNG を読み込み、元の写真と比較します。ラベルのテキスト、ロゴ、プロポーション、色、部品数が一致している必要があります。AI による製品の「改良」は不具合です。フォローアップの各ターンでは、問題を1つずつ修正します
- マーケットプレイスのメイン画像(Amazon など)では、通常、純白の #FFFFFF 背景、フレームの約85%を占める製品、最長辺が 1000px 以上(ズーム用は 1600 以上)が求められます。マーケットプレイスの最新ルールを確認してください
プロンプトの例
- 製品写真:「この [製品] を [背景の説明] の上に配置してください。プロフェッショナルな製品写真のスタイル。[照明]。[追加要素]。」
- デバイスモックアップ:「[アプリ/ウェブサイトのスクリーンショット] を表示した [デバイスの種類] のモックアップを作成してください。[表面/背景] 上での [角度/視点]。柔らかな影、[照明スタイル]。すっきりとしたリアルな見せ方。」
- パッケージモックアップ:「[ブランド] の製品パッケージのモックアップを作成してください。[背景] に置いた、[ラベルデザインの説明] を施した [箱/ボトル/バッグ]。スタジオ照明、[追加の小道具]。高級感があり、店頭にそのまま並べられる印象。」
手順 2:モックアップの種類を特定する
| 種類 | 最適な用途 | 主なテクニック |
|---|---|---|
| デバイスフレーム | アプリ/ウェブのスクリーンショット | CSS デバイスシェル |
| ライフスタイル/コンテキスト | 環境の中に置かれた製品 | 背景+影 |
| 3D パースペクティブ | 動きのある見せ方 | CSS の perspective/transform |
| ビフォー/アフター | 変化の提示 | 分割ビューでの比較 |
| 機能のコールアウト | 機能の強調 | 線+ラベル |
| パッケージ | 物理的な製品の箱 | CSS による 3D ボックス |
| マルチデバイス | レスポンシブ表示のショーケース | 複数のフレーム |
| スクリーンショットフレーム | すっきりとしたスクリーンショットの表示 | ウィンドウの枠+影 |
手順 3:デバイスモックアップのフレーム
iPhone/スマートフォンのフレーム
.phone-mockup {
position: relative; width: 280px; height: 572px; background: #1a1a1a;
border-radius: 40px; padding: 12px;
box-shadow: 0 0 0 2px #333, 0 0 0 4px #1a1a1a, 0 20px 60px rgba(0,0,0,0.4);
}
.phone-mockup .screen { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #fff; position: relative; }
.phone-mockup .dynamic-island {
position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
width: 100px; height: 28px; background: #000; border-radius: 20px; z-index: 10;
}
.phone-mockup .screen img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
ノートパソコン/MacBook のフレーム
.laptop-mockup { position: relative; width: 680px; }
.laptop-screen { background: #222; border-radius: 12px 12px 0 0; padding: 16px 16px 0; position: relative; }
.laptop-screen .screen { width: 100%; aspect-ratio: 16/10; background: #fff; border-radius: 4px 4px 0 0; overflow: hidden; }
.laptop-screen::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; background: #444; border-radius: 50%; }
.laptop-base { height: 14px; background: linear-gradient(180deg, #ccc 0%, #aaa 100%); border-radius: 0 0 8px 8px; }
ブラウザーウィンドウのフレーム
.browser-mockup { width: 800px; border-radius: 8px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.browser-chrome { background: #E5E7EB; padding: 10px 16px; display: flex; align-items: center; gap: 8px; }
.browser-dots { display: flex; gap: 6px; }
.browser-dots span { width: 10px; height: 10px; border-radius: 50%; }
.browser-dots span:nth-child(1) { background: #EF4444; }
.browser-dots span:nth-child(2) { background: #F59E0B; }
.browser-dots span:nth-child(3) { background: #22C55E; }
.browser-url { flex: 1; background: #fff; border-radius: 4px; padding: 4px 12px; font-size: 12px; color: #666; }
.browser-content { background: #fff; width: 100%; aspect-ratio: 16/10; overflow: hidden; }
手順 4:3D パースペクティブ変換
アイソメトリックビュー
.isometric-container { perspective: 1200px; display: flex; justify-content: center; align-items: center; padding: 80px; }
.isometric-device { transform: rotateX(12deg) rotateY(-8deg) rotateZ(2deg); transform-style: preserve-3d; transition: transform 0.4s ease; }
.isometric-device:hover { transform: rotateX(5deg) rotateY(-3deg) rotateZ(0deg); }
浮遊するパースペクティブ
.float-device {
transform: rotateY(-15deg) rotateX(5deg) translateZ(20px);
transform-style: preserve-3d; animation: gentleFloat 6s ease-in-out infinite;
}
@keyframes gentleFloat {
0%, 100% { transform: rotateY(-15deg) rotateX(5deg) translateZ(20px) translateY(0); }
50% { transform: rotateY(-15deg) rotateX(5deg) translateZ(20px) translateY(-12px); }
}
デバイスを重ねた表示
.device-stack { position: relative; perspective: 1200px; width: 800px; height: 600px; }
.device-stack .phone { position: absolute; right: 10%; bottom: 5%; z-index: 3; transform: rotateY(-5deg) translateZ(40px); }
.device-stack .laptop { position: absolute; left: 5%; top: 10%; z-index: 1; transform: rotateY(5deg); }
.device-stack .tablet { position: absolute; right: 25%; top: 5%; z-index: 2; transform: rotateY(-3deg) translateZ(20px) scale(0.8); }
扇形レイアウト
.fan-layout { display: flex; align-items: flex-end; justify-content: center; perspective: 1500px; }
.fan-layout .screen:nth-child(1) { transform: rotateY(25deg) translateX(-30px); }
.fan-layout .screen:nth-child(2) { transform: rotateY(0deg) translateZ(30px); z-index: 2; }
.fan-layout .screen:nth-child(3) { transform: rotateY(-25deg) translateX(30px); }
手順 5:ライフスタイル背景での見せ方
グラデーションのステージ
.product-stage {
display: flex; align-items: center; justify-content: center; min-height: 600px; padding: 80px;
background: radial-gradient(ellipse at 50% 120%, rgba(var(--primary-rgb), 0.15) 0%, transparent 60%),
linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
}
デスク/表面のシーン
.desk-scene {
position: relative; background: linear-gradient(180deg, #F8FAFC 0%, #E2E8F0 100%);
min-height: 600px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 40px;
}
.desk-scene::before {
content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
background: linear-gradient(180deg, #E2E8F0, #CBD5E1);
}
.desk-scene .device { position: relative; z-index: 2; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15)); }
手順 6:ビフォー/アフターの比較
スライダー形式
.comparison { position: relative; width: 800px; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.comparison .before, .comparison .after { position: absolute; inset: 0; }
.comparison .before { z-index: 1; filter: grayscale(50%) brightness(0.9); }
.comparison .after { z-index: 2; clip-path: inset(0 50% 0 0); }
.comparison .divider { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: #fff; z-index: 3; }
横並び
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.side-by-side .label { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
手順 7:機能を強調するコールアウト
線でつないだコールアウト
.feature-showcase { position: relative; display: flex; align-items: center; justify-content: center; padding: 80px; }
.callout { position: absolute; display: flex; align-items: center; gap: 8px; }
.callout .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2); flex-shrink: 0; }
.callout .line { width: 60px; height: 1px; background: rgba(255,255,255,0.3); flex-shrink: 0; }
.callout .text { font-size: 13px; font-weight: 500; background: rgba(0,0,0,0.4); backdrop-filter: blur(8px); padding: 6px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); white-space: nowrap; }
番号付き機能リスト
.feature-list { display: flex; flex-direction: column; gap: 20px; }
.feature-item { display: flex; align-items: flex-start; gap: 16px; }
.feature-number { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
手順 8:パッケージのビジュアル化(3D ボックス)
.product-box { width: 200px; height: 280px; position: relative; transform-style: preserve-3d; transform: rotateX(-12deg) rotateY(-25deg); /* negative X tilt shows the top face */ }
.box-front { position: absolute; width: 200px; height: 280px; background: var(--primary); transform: translateZ(30px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; border-radius: 4px; }
/* Box is 200w x 280h x 60d, centered on z=0: front at +30, side at x=200, top at y=0 */
.box-side { position: absolute; left: 0; top: 0; width: 60px; height: 280px; background: color-mix(in srgb, var(--primary) 80%, black); transform: rotateY(90deg) translateZ(170px); /* 170 = width - depth/2 */ }
.box-top { position: absolute; left: 0; top: 0; width: 200px; height: 60px; background: color-mix(in srgb, var(--primary) 90%, white); transform: rotateX(90deg) translateZ(30px); /* 30 = depth/2 */ }
/* Wrap .product-box in a parent with `perspective: 1000px` */
手順 9:スクリーンショットの見せ方
すっきりしたウィンドウフレーム
.screenshot-frame { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 20px 60px rgba(0,0,0,0.15); background: #fff; }
.screenshot-frame .chrome { height: 36px; background: linear-gradient(180deg, #F9FAFB, #F3F4F6); display: flex; align-items: center; padding: 0 12px; gap: 6px; border-bottom: 1px solid #E5E7EB; }
.screenshot-frame .chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: #D1D5DB; }
.screenshot-frame img { width: 100%; display: block; }
スクリーンショットを回転させたコラージュ
.screenshot-collage { display: flex; padding: 40px; justify-content: center; }
.screenshot-collage .shot:nth-child(1) { transform: rotate(-5deg); z-index: 1; }
.screenshot-collage .shot:nth-child(2) { transform: rotate(0deg) translateY(-10px); z-index: 2; }
.screenshot-collage .shot:nth-child(3) { transform: rotate(5deg); z-index: 1; }
.screenshot-collage .shot { border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2); border: 4px solid #fff; }
品質チェックリスト
- デバイスのフレームがリアルに見える(適切な比率、影、ディテール)
- 影が自然である(柔らかく、方向性があり、均一ではない)
- 3D 変換に適切な遠近感がある
- スクリーンショットの内容が見え、ゆがんでいない
- デザインコンテキストのブランドカラーをステージ/背景に使用している
- 複数のデバイスが互いに対して適切な大きさに調整されている
- 全体の構成が製品に注目を集めている
- Gemini の出力を読み込み、元の製品写真と比較した(ラベル、ロゴ、形状に変更がない)
- デバイスフレーム内のスクリーンショットが実際の未加工の UI であり、引き伸ばされていない(画面のアスペクト比に一致している)
- コードの出力を PNG にレンダリングし(
node <graphic-design>/scripts/render.mjs mockup.html --size WxH --out mockup.png)、納品前に PNG を読み込んだ - コードが自己完結した HTML/CSS である
コメント
Markdown 対応