- name
SKILL.md
Tệp skill vẫn nằm trong kho mã của nhà phát hành.
Dán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add zanwei/design-dna -a cursor -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add zanwei/design-dna -a claude-code -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add zanwei/design-dna -a codex -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add zanwei/design-dna -a grok -yGửi tin nhắn đã sao chép trong cuộc trò chuyện Grok Bot. Bot sẽ lấy tệp SKILL.md này từ GitHub và thêm vào bộ skill mà mọi Bot của bạn dùng chung.
Install this skill: https://github.com/zanwei/design-dnaTừ nhà phát hành
A 3-phase workflow for extracting, structuring, and applying design identity across three dimensions:
When the user asks for the structural dimensions or schema:
When the user provides images, screenshots, or links representing a target design style:
Analysis approach per dimension:
SKILL_ROOT to the absolute directory containing this SKILL.md; never assume the current project directory contains the skill's scripts/ folder. Use absolute paths for the reference and output, and keep one uniquely named measurement file per reference:
npm install --prefix "$SKILL_ROOT/scripts" --silent
node "$SKILL_ROOT/scripts/measure-colors.mjs" "$REFERENCE_IMAGE" > "$MEASUREMENT_JSON"
Use the measured hexes verbatim in the DNA JSON: map the background role to surface.background; map text to the end of neutral.scale that contrasts with the measured background and document that foreground use in neutral.usage; and map accent to accent.hex. Keep both the measured palette and its measurement configuration in design_system.color.measured_palette and design_system.color.measurement so verification can reuse the same clustering configuration. Coverage values are fractions from 0 to 1. Only fall back to visual sampling when measurement is impossible (for example, a URL-only reference that cannot be screenshotted). Choose primary and secondary colors by semantic role, use accent for CTA emphasis, and order the neutral scale from lightest to darkest regardless of theme.<canvas>, WebGL contexts, Three.js/Pixi.js imports, GSAP/Lottie usage, custom shaders, IntersectionObserver scroll triggers, SVG <animate> elementscomposite_notes when exact implementation can't be determined.enabled: false for any effect category not present in the referenceoverview.effect_intensity and overview.performance_tier based on what's observedWhen the user provides DNA JSON + content to design:
design_system valuesdesign_style qualitative fields to guide subjective design decisionsvisual_effects using appropriate technologies:
SKILL_ROOT from this SKILL.md and use absolute paths; do not assume a temporary file named measured-colors.json exists:
node "$SKILL_ROOT/scripts/verify.mjs" "$IMPLEMENTATION_SCREENSHOT" "$DESIGN_DNA_JSON"
A standalone measurement JSON may be used instead of the DNA file when that is the only persisted artifact. For multiple image references, verify against each reference's measurement separately. The report gives per-color ΔE and coverage drift with PASS/FAIL thresholds. If it fails, fix the offending colors and re-verify instead of asking the user to judge fidelity by eye.If the user provides only content without DNA JSON, ask whether to:
Users may invoke any combination:
Detect which phase(s) are needed from context and execute accordingly.
>-
---name: design-dnadescription: >----# SKILL.mdCâu hỏi thường gặp
Tải SKILL.md từ nhà phát hành, hoặc sao chép đường dẫn và mở kho mã. PlugMCP chỉ liệt kê skill và không lưu trữ tệp này.
Nhà phát hành duy trì nó tại https://github.com/zanwei/design-dna.
Claude, Cursor, Codex và Grok Build có thể đọc tệp SKILL.md mà bạn thêm từ kho mã của nhà phát hành. Grok Bot cài đặt skill khi bạn gửi liên kết thư mục GitHub của skill trong cuộc trò chuyện.