Community图像github.com

画廊式产品卡片

把真实产品截图排成高分辨率画廊卡片:对比、双设备同屏、局部放大和版本说明。

画廊式产品卡片 是什么?

把真正的界面截图排成接近印刷品的展板,覆盖多种纸感与舞台主题和多种画幅,并导出 PNG 与一份离线总览。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/oil-oil/oil-showcase/tree/HEAD/skills/oil-showcase

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

画廊式产品卡片 是做什么的?

Compose real product screenshots into restrained, visually pleasing high-resolution display cards. The canvas includes a built-in code-only photography studio lighting and atmosphere themes (warm-paper, dark-studio, cool-gallery, wallpaper-stage, blueprint-grid — five themes, inline SVG matte grain, zero AI-generated images). The product’s accent color is used sparingly, injected only into obscured sculptural numbering, dashed luminous guide lines, minimalist transition arrows, and focus frames. Adaptable for websites, dark-mode desktop workstations, native tools, and mobile apps.

Below, <python> refers to a Python 3.10+ interpreter: on macOS and Linux it is typically python3, on Windows typically py -3.

Step 1: Quietly check the environment

First, run a read-only check to confirm the Python version, the local browser, and availability of built-in fonts:

<python> scripts/render_cards.py doctor

If no browser is detected, stop and instruct the user to install Chrome/Chromium/Edge, or specify the executable path via the environment variable CHROME_PATH.

Step 2: Collect real product assets

Display cards must use real product screenshots, real page crops, or transparent foreground layers. Fake mock interfaces, decorative stickers, or empty marketing badges are prohibited.

  • No empty filler demos: Each card must carry high-information-density real product visuals or immediately visible value comparisons. Do not use a "70% blank background + a few lines of simple code" or a plain screenshot with only a light/dark skin swap as a demo.
  • True magnification principle: Link-out magnifiers (window-callout) and before-after comparisons (before-after) must use a 2×–4× cropped zoom so that readers can clearly read interface text even in thumbnails or at 900px document width without opening the full image. Never shrink an entire window and cram it into a magnifier card or a narrow comparison panel.
  • If the user already has images ready, verify the file path, aspect ratio, and clarity, then use them directly.
  • To capture a borderless high-definition screenshot from a local HTML file or a localhost webpage, use the built-in capture tool:
<python> scripts/render_cards.py capture <url-or-html> --out <png-path> --viewport 1440x900 --scale 2

To capture a specific module, add --selector "<css>"; to capture a full-page screenshot, add --full-page.

Step 3: Choose the theme, layout, and write the specification

Read the Design System & Spec Reference, determine the following four items according to the narrative goal, and write them into a UTF-8 JSON file (e.g., cards.spec.json):

Layout layoutSuitable narrative
layered-hero2–3 layered cards + main image
layered-bentoLeft split layers + right Bento
section-assemblyCenter column sliced with dashed lines linking full page
module-bento2–6 business module grid
gallery-wallMulti-page exhibition or tiled wall
window-calloutSingle window stage / 1-point magnifier / multi-point or blueprint annotation
before-afterLeft-right or top-bottom redesign/timeline comparison
workflow-steps3–4 steps horizontal or 3D layered stage
split-comparePixel-aligned split-screen comparison on a single canvas
device-pairDesktop + dark titanium phone same-screen display
changelog-cardLarge version number + highlights + flagship image
  • Theme theme: Choose from warm-paper (warm paper texture, serif by default), dark-studio (dark anodized matte, sans-serif), cool-gallery (cool gray architectural matte, sans-serif), wallpaper-stage (code-only twilight atmosphere gradient grid + frosted glass outer frame, supports stagePalette: twilight/ocean/sunset/emerald), or blueprint-grid (light gray #F3F5F8 architectural drafting grid with crosshair registration marks). Use displayStyle to override the title font style individually.
  • Select the canvas aspect ratio (16:9, 4:3, 3:4, 9:16, 1:1, or custom WxH) and the product accent color accent. For dark or irregular screenshots, make good use of fit, position, and bg.
  • Language follows conversation: All card titles, subtitles, steps, magnifier annotations, comparison labels (before/after), and legends follow the user’s current conversation language by default (Chinese conversation → Chinese, English conversation → English). Switch only when the user explicitly requests it.
  • Code-only lighting and sculptural numbering: Do not use framed capsule labels. Place large BEFORE/AFTER (automatically 对比前/对比后 in Chinese) and 01/02/03 behind the card, partially obscured by 18–25% to create depth. Cards on the same row should use either uniform full bleed or uniform white-space stage; do not mix exposed floating cards with colored wallpapers.
  • Default horizontal/vertical alignment for sharpness: Layouts (split-compare, device-pair, changelog-card, before-after, window-callout, workflow-steps row, module-bento, section-assembly, gallery-wall) default to 0deg upright alignment to prevent text blur (can be explicitly set to tilt: true). Only layered-hero and workflow-steps staged default to a slight tilt (can be set to tilt: false).
  • Single text anchor, no scattered text: Each card retains only one text anchor in the upper-left corner: "brand logo + one short main title" (followed by a single short description line if necessary). Do not add decorative tags in the upper-right corner or scatter small text across multiple locations. Secondary caption font size should not fall below the readable threshold (14–21px). When the title and image already tell the story clearly, omit subtitle, caption, and footer entirely.
  • If the requirement clearly exceeds the 11 built-in layouts, you may follow the reference document tokens to write custom HTML, then export it using shoot.

Step 4: Render and auto-validate

Use the specification file to batch-generate high-resolution PNGs, standalone HTML files, and an offline preview page:

<python> scripts/render_cards.py render <spec.json> --out-dir <out-dir> --scale 2
  • To fine-tune a single card, add --only <card-id>. The script will preserve the complete index.html for other cards already in the same directory.
  • To export a single custom HTML card, use: <python> scripts/render_cards.py shoot <card.html> --out <card.png> --ratio 16:9 --scale 2.

The script will automatically check image paths, font availability, image decoding, and text overflow. If errors or warnings appear, prioritize shortening copy or adjusting slot parameters before re-rendering.

Step 5: Visual spot-check and delivery

If the current host supports image viewing, check each card in <out-dir>/png/*.png: confirm sufficient title white space, clear layering, that the core screenshot content is not unintentionally cropped, and that guide lines and anchor points are clearly readable. If there are issues, adjust the spec and re-render using --only.

Upon delivery, inform the user of the PNG paths, the offline overview page path (<out-dir>/index.html), and whether there are any unresolved warnings. Do not overwrite the user’s original images without authorization.

Next steps after delivery

After the main workflow is complete and the user has not specified a follow-up action, recommend up to 3 options from the table below based on the current state:

Candidate actionResultAdditional cost
Switch canvas theme (warm-paper / dark-studio / cool-gallery / wallpaper-stage / blueprint-grid)Generate another atmosphere version from the same assets and layouts for comparisonNew export directory, a few seconds of re-rendering
Adapt to vertical 3:4 / 9:16 or square 1:1Automatically rearrange the same assets for mobile portrait, short video cover, or square cardNew files, a few seconds of re-rendering
Fine-tune single card composition or guide line coordinatesUse --only to locally fine-tune a single card while keeping the overview page intactRe-render only the single card, very fast

相关技能