Skillpedia
الواجهات (UI/UX)8.2k · #12531

design-spec

ما الذي تفعله

تشرح هذه المهارة كيفية كتابة ملف DESIGN.md، وهو دليل واحد لألوان المشروع وخطوطه ومسافاته ومكوّناته. وهي للمصممين والمطورين الذين يريدون مظهرًا متسقًا.

متى تستخدمها

  • ✓عندما تبدأ موقعًا أو تطبيقًا جديدًا وتريد تحديد مظهره قبل بناء الشاشات.
  • ✓عندما يحتاج المشروع إلى مجموعة واحدة مشتركة لقيم التصميم من ألوان وخطوط ومسافات.
  • ✓عندما تريد أن تعطي الذكاء موجزًا بصريًا واضحًا يتبعه.

رابط المهارة

https://github.com/vudovn/ag-kit/blob/main/.agents/skills/design-spec/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/vudovn/ag-kit/blob/main/.agents/skills/design-spec/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“اكتب لي ملف DESIGN.md لموقع مقهاي الجديد، يتضمن قواعد الألوان والخطوط والمسافات قبل أن نبني أي صفحة.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يتكون الملف من كتلة لقيم التصميم بصيغة تقرؤها الآلة في أعلاه، تليها ملاحظات مكتوبة تشرح الاختيارات. يستخدمه الذكاء مرجعًا أساسيًا عند بناء الواجهة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

DESIGN.md Specification

A DESIGN.md is the single source of truth for a project's visual language. Create it BEFORE building UI. Two layers: machine-readable design tokens (YAML front matter) + human-readable rationale (markdown body). Tokens are normative; prose gives context. Prose may use descriptive names ("Midnight Forest Green") that map to systematic token names (primary).

Format adapted from the DESIGN.md spec (Google Labs, Apache-2.0). A linter/exporter exists: npx @google/design.md.

📚 Reference library: collection.md — 70+ real-world DESIGN.md files (Airbnb, Stripe, Linear, Vercel, Apple…) to study or adapt as a starting point.


When to produce a DESIGN.md

This is a hard gate for UI work (see .agents/rules/design-rules.md): before writing components, pages, or styles, a DESIGN.md must exist at the project root. If absent, create it first from the brief; if present, read it and conform.

The token block converts cleanly to/from tokens.json, Figma variables, and Tailwind theme config — so it is the bridge between design intent and code.


1. File structure

---
<YAML token front matter>
---

# Project Name (optional title)

## Overview
## Colors
## Typography
## Layout
## Elevation & Depth
## Shapes
## Components
## Do's and Don'ts

Front matter MUST begin and end with a line containing exactly ---. Sections use ## headings, appear in the order above, and may be omitted if irrelevant. Domain-specific sections may be added.


2. Token schema (YAML front matter)

version: alpha            # optional
name: Daylight Prestige
description: ...          # optional
colors:
  <token-name>: "#RRGGBB"
typography:
  <token-name>:
    fontFamily: Public Sans
    fontSize: 48px
    fontWeight: 600
    lineHeight: 1.1
    letterSpacing: -0.02em
rounded:
  <scale>: 8px
spacing:
  <scale>: 16px           # Dimension or unitless number
components:
  <component-name>:
    backgroundColor: "{colors.primary}"
    rounded: "{rounded.md}"
    padding: 12px

<scale> is a named level: xs sm md lg xl full (any descriptive key is valid).


3. Type system

Type Format Example
Color # + hex (sRGB) "#1A1C1E"
Dimension number + unit (px/em/rem) 48px, -0.02em
Token Reference {path.to.token} {colors.primary}
Typography composite object see §4

Typography properties: fontFamily (string), fontSize (Dimension), fontWeight (number — bare or quoted are equivalent in YAML), lineHeight (Dimension or unitless multiplier — unitless recommended), letterSpacing (Dimension), fontFeature (string), fontVariation (string).

Token references: wrapped in {} pointing to another value in the tree. Most groups must reference a primitive ({colors.primary-60}), not a group. Inside components, references to composite values are allowed ({typography.label-md}).

Component property tokens: backgroundColor, textColor (Color); typography (Typography); rounded, padding, size, height, width (Dimension).

Variants: define UI states as separate entries with a related key — button-primary, button-primary-hover.


4. Sections (canonical order)

# Section Aliases Purpose
1 Overview Brand & Style Brand personality, audience, emotional tone. Fallback context when a token isn't defined.
2 Colors Palettes; at least primary. Common: primary/secondary/tertiary/neutral.
3 Typography 9–15 levels, each a semantic role (headline/body/label) × size.
4 Layout Layout & Spacing Grid model, spacing scale, containment.
5 Elevation & Depth Elevation Shadows, OR for flat designs the alternative (borders, tonal layers, contrast).
6 Shapes Corner radii, edge treatment, shape language.
7 Components Per-atom guidance: Buttons, Inputs, Cards, Chips, Lists, etc.
8 Do's and Don'ts Guardrails during generation.

5. Recommended token names (guidance, not required)

  • Colors: primary secondary tertiary neutral surface on-surface error
  • Typography: headline-display headline-lg headline-md body-lg body-md body-sm label-lg label-md label-sm
  • Rounded: none sm md lg xl full

6. Consumer behavior for unknown content

The

الأسئلة الشائعة

ما الذي يُكتب في ملف DESIGN.md؟

يحتوي على رموز التصميم، مثل الألوان والخطوط والمسافات وزوايا الحواف الدائرية، مع أسباب مكتوبة لها.

هل أبدأ من مثال؟

نعم. تشير المهارة إلى مجموعة من ملفات DESIGN.md حقيقية يمكنك دراستها أو تكييفها.

هل يُحتاج إليه قبل بناء واجهة المستخدم؟

تعامله المهارة كبوابة، فيجب أن يوجد ملف DESIGN.md قبل كتابة المكوّنات أو الصفحات.

التفاصيل

الوصف الأصلي من المؤلف

How to author a DESIGN.md file — the machine-readable design-token + human-rationale format that must exist before any UI is built. YAML front-matter token schema (colors, typography, spacing, rounded, components), type system, token references, and canonical section order.

repo: vudovn/ag-kit

الشعبية

نجوم GitHub
8.2k
الترتيب
#12531
الترخيص
MIT
آخر تحديث
18‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة