Communitygithub.com

open-artifact-design-quality

Open Artifact 的设计门禁:做 design 画布 / slides / page / data 看板 / motion 之前定方向与字阶,避开 AI slop,交付前用一次 snapshot 自检并只修一轮。Use before creating or restyling any Open Artifact visual artifact (design canvas, mockup, UI 原型, landing page, slide deck, dashboard, animated film), and whenever an artifact looks generic, converged, or needs another iteration.

open-artifact-design-quality 是什么?

open-artifact-design-quality is a Claude Code agent skill that open Artifact 的设计门禁:做 design 画布 / slides / page / data 看板 / motion 之前定方向与字阶,避开 AI slop,交付前用一次 snapshot 自检并只修一轮。Use before creating or restyling any Open Artifact visual artifact (design canvas, mockup, UI 原型, landing page, slide deck, dashboard, animated film), and whenever an artifact looks generic, converged, or needs another iteration.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/gythialy/alma-open-artifact-skills/tree/HEAD/skills/open-artifact-design-quality

在你喜欢的 AI 中提问

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

文档

Open Artifact Design Gate

This skill fills two steps missing in built-in types: defining direction before starting and checking before delivery. It does not repeat format specifications (those are in each type's SKILL.md), only adds judgment and self-inspection.

Hard Rule: Designs Only Go Through Open Artifact

The user explicitly stated on 2026-11-28: from now on, all design presentations must be displayed via Open Artifact.

  • Applicable to: design canvas, mockup, UI prototype, slides, page visual drafts, data dashboard, motion film.
  • Not applicable to: code preview, HTML/React/Mermaid/SVG/Code snippets, Compose/AVD screenshots. These can use Alma built-in Preview or real device tools but must not be passed off as design deliverables.
  • Temporary HTML, directly rendered canvases in chat, DOM measurement results are only drafts or supplementary evidence. They cannot be called Open Artifact snapshots, nor can they serve as the final presentation of a design.
  • OA is installed and enabled. The absence of Artifact from the MCP tool list does not mean it cannot be used; the CLI is a valid channel:
node ~/.agents/skills/open-artifact/scripts/open-artifact.mjs artifact '{"action":"list","scope":"types"}'
node ~/.agents/skills/open-artifact/scripts/open-artifact.mjs artifact '<json>'

Only stop and explain if the CLI also fails; do not silently degrade just because Artifact is not in the tool list.

App Style Rendering Boundaries

OA design can render app-style artboards, not a native app runtime.

  • Android app draft: fixed 390×844 artboard, M3 role/component expressed in HTML/CSS, clickable links/events, OA snapshot.
  • iOS app draft: fixed 390×844 artboard, HIG/SwiftUI component semantics, clickable links/events, OA snapshot.
  • Do not draw fake status bars or fake keyboards; leave space for system chrome but do not forge it. Device rounded corners are acceptable, fake 9:41 is not.
  • Real native rendering evidence only comes from Compose Preview / AVD / Xcode Simulator, labeled as implementation verification, not called a design draft.
  • Platform style and reference sources follow platform-design-reference: Android uses M3 + official examples, iOS uses HIG; reference sources are open but must cite the source and the borrowing point.
  • When reference cases include light/dark modes, key screens must be delivered in pairs (light/dark artboards or a switchable prototype); shared layout/components/state, colors mapped separately, no inversion. Each artboard still takes only one OA snapshot, evidence reported by theme separately.

When to Use

  • Any creation or visual redesign of open-artifact://type/{design|slides|page|data|motion}.
  • When the user says "another version", "not good looking", "looks AI-generated", "too generic".
  • When the user asks for "preview / design draft / show the effect" and the deliverable is a visual design.

1. Before Starting: Five-Grid Brief

Write it out first (in the reply, just a few sentences), then touch files. If only 3 out of 5 grids come from others' information, you are designing out of thin air.

  1. Subject: Who is viewing, in what context, and what specific problem is being solved.
  2. Direction: A nameable look-and-feel ("warm editorial tone" / "dense data priority" / "austere industrial" / "playful toy-like"), plus a sentence on what it is not.
  3. Type Scale: 3–5 levels, write px values; which typeface families for Display and Text.
  4. Colors: One ground + 0–2 accent (oklch same chroma same lightness, vary hue), or reference an installed design system.
  5. Memory Point: One thing the reader will remember (a number, a contrast, a typographic decision).

Changing these five lines is an order of magnitude cheaper than changing HTML, so provide them first.

2. Get Context First, Then Start

Fixed order: user's original words → installed design systems → real repository styles → permitted reference cases → previous artboard → only then your own assumption.

  • If a design system exists: open-artifact list to check; if found, install it (for design/slides, "install design system" is a MUST, otherwise color/text style panels will be empty hex).
  • If real styles exist (ui/*.css, docs/design/tokens.json, etc.): copy them over, use only class names and var(--…), do not redraw an approximate set. An approximate set = needing to sync again next time.
  • On the third version: first read the previous version's project/canvas.json and artboards, do not rebuild from memory.
  • Reference sources are open: brand screenshots, Dribbble complete drafts, official illustrations/icons, Material official examples, Apple HIG examples can all be borrowed. Record the source and the borrowing point, convert the borrowed structure/proportion/style DNA into project tokens and component semantics; do not treat reference images as verification evidence.
  • Fallback when there is no context: choose typeface and color scheme based on the "subject's world" (materials, terminology, units, writing conventions), not "generally good-looking".

3. Anti-Slop Checklist

If any item is hit, record it in the 6th item of the self-assessment card and explain why it is retained.

  1. Three identical cards under a title; everything put into cards.
  2. Cream background + serif title + terracotta orange (unless the brief itself is for food/publishing/crafts).
  3. Every block has same rounded corners + same soft shadow; a colored vertical stripe on the left of each card.
  4. Emoji used as icons or section markers.
  5. Full-screen gradients, glow halos, mesh grids (unless the reference case is centered on it and the user explicitly requests it).
  6. Small uppercase label above every title; a different color on one word in the title.
  7. Everything centered.
  8. Large number blocks no one asked for; numbering items that are not sequential.
  9. Each paragraph fades in on scroll.
  10. Fake UI decorations: drawing a 9:41 status bar inside a phone shell, drawing a fake keyboard.
  11. Filler charts and statistics (especially for the data type).

Typeface: Inter + Space Grotesk is a "safe but not bonus" fallback, not a recommendation—the design-system spec lists Inter as an overused typeface; the two specs conflict here, so rule by brief: real brand/repository typeface > personalityful Google font pair > Inter fallback. On the second version of the same project, at least change the typeface or change the ground.

4. Hard Metrics

If not met, it is a bug, not a matter of aesthetic preference:

  • Type scale ≤5 levels; body text canvas ≥14px, mobile ≥15px, print body text ≥12pt.
  • Line length 45–75 characters (Chinese 25–40); line height 1.45–1.6.
  • Body text contrast ≥4.5:1; large text above 24px and control borders ≥3:1. Light gray caption text most commonly fails; check both themes, not just light.
  • Touch targets ≥44px (mobile) / ≥40px (web); icon buttons must have aria-label.
  • Overflow is preferred over truncation: better tall than cropped; mobile width must be readable, no horizontal scroll.
  • Dark mode is "design a separate set", not invert the light mode.

5. Before Delivery: One Snapshot, One Round of Fixes

Built-in design/slides say "NEVER VERIFY… render, screenshot". The essence of that rule is do not fall into an infinite verification loop, not "do not look at it". This skill tightens it into an actionable boundary:

  • After check passes, take one Open Artifact snapshot for each artboard/page/full page: Artifact {"action":"call","url":"<url>","name":"snapshot"} CLI also works: artifact '{"action":"call","url":"<url>","name":"snapshot"}' For design, pass width/height; for page, also support scheme (one each for light/dark is most efficient); for motion, use its stills rhythm.
  • Look for only three things: anything compressed or cropped, any unexplained white space above the fold, any color disappearance.
  • Fix one round if found, then stop. Take a second snapshot only if the user explicitly requests it.
  • If the snapshot is unavailable (no Chrome/Chromium installed), skip and mention it in one sentence; do not install a browser for it. But you cannot say "snapshot passed" when skipping.
  • If the snapshot is garbled, missing fonts, missing theme variables, or not rendered at all, explicitly mark it as "snapshot failed/invalid"; do not treat it as evidence, and do not take a second snapshot to make up for it. DOM measurements and scripted contrast checks can only serve as supplementary numbers.
  • Do not read back your own written files to "check"—that is neither verification nor informative.

6. Self-Assessment Card

Before delivery, write 6 lines in the reply; for any failing item, write "unresolved" along with the reason:

  1. Hierarchy: Can you tell within 3 seconds what this is and where to look first?
  2. Rhythm: Are all spacing values from the same step? Is there any sign of "equal distribution" (every space is about the same = no rhythm)?
  3. Type Scale: ≤5 levels? Are there any "undecided" sizes like 13px or 17px?
  4. Contrast: For the weakest text against its background color, write a computed value, not an "estimate".
  5. Bounds: Any overflow, truncation, horizontal scroll? Does it still hold at 390px width?
  6. Difference: Compared to the previous version, which dimension changed? If you cannot tell, it means you are still converging.

Delivery language must indicate the evidence type: Open Artifact snapshot / supplementary numbers / no valid snapshot.

7. Integration with Other Skills

  • App UI / Android look-and-feel: first use material-design-3-ui for spec mapping, then m3-platform-adapt and platform-design-reference, finally return to this card for look-and-feel and self-assessment.
  • Architecture diagrams, flowcharts, sequence diagrams, ER diagrams: use diagram-design, do not manually draw arrows and lines in an artboard.
  • Container queries, dark mode, forms, scroll behavior, etc.: first use modern-web-guidance.
  • PDF / print deliverables: read the reference/print.md in the design type.

8. Retain the Direction

Each version writes the five-grid brief from section 1 into a DIRECTION.md placed at the artifact root (for artboards, project/DIRECTION.md), with a line marking the date and version. The next version reads it first.

The built-in rule says "NEVER converge on the same look across generations", but an agent has no cross-session memory—without this file, that rule is unenforceable, and the default combination will keep reproducing.

Delivery Language

One sentence saying what was drawn + one assumption + evidence type + sources/borrowing points + self-assessment card 6 lines. Do not post coordinates, file lists, or repeat type specifications.

相关技能