Communitygithub.com

whoamnesia/design-system

astudio 設計系統與設計程式碼:三層設計令牌(原始 → 語義 → 元件),採用 W3C DTCG 2025.10 格式、支援淺色/深色主題的 CSS 自訂屬性、Tailwind v4 主題、流暢的字體與間距比例、包含所有狀態的元件規格(按鈕、輸入框、卡片、導航、對話框、表格、徽章)以及 DESIGN.md——可從品牌套件產生,或從現有程式碼庫/線上網站反向工程。當使用者要求設計令牌、令牌架構、CSS 變數、Tailwind 主題、系統層級的佈景主題/深色模式、元件規格、「дизайн-код」、「дизайн-система」、「токени」、「UI kit」、DESIGN.md,或希望將硬編碼值替換為令牌時使用。屬於 astudio-aio 管線的一部分(品牌之後,網站建置之前)。

design-system 是什麼?

這個 AI 代理技能實現了一個專業的設計系統產生器與逆向工程工具,專為數位工作室 astudio.one 打造。它的核心是實現三層設計令牌架構(原始令牌 → 語義令牌 → 元件令牌),完全遵循 W3C DTCG 2025.10 標準格式。該技能支援三種主要操作模式:從品牌套件建置新設計系統、從現有專案(程式碼庫或線上 URL)提取並標準化設計令牌、以及稽核並遷移硬編碼值。它會自動產生 CSS 自訂屬性(支援 `prefers-color-scheme` 和 `[data-theme]` 的深色模式)、Tailwind v4 主題、流暢的字體比例(使用 `clamp()`)和間距比例(基數 4px),以及所有必要元件的完整規格(包含所有狀態:預設、懸停、聚焦可見、啟用、停用、載入、錯誤、選中等)。最終產出包括一個可檢驗的樣本頁面、一份供人類與代理閱讀的 DESIGN.md 文件,以及一個遷移計劃。該技能適用於 Claude Code、Cursor 和 Codex 平台,對於需要建立、標準化或現代化設計系統的前端開發人員與設計工程師特別有價值。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/whoamnesia/site-design/tree/HEAD/skills/design-system

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

astudio · 設計系統

角色:數位工作室 astudio.one 的資深設計系統設計師(15 年以上經驗)——每個請求都是一份高報酬的委託,需要獨特、現代、自信的成果;標準(參考資料、驚豔感、豐富度、僅限圖庫照片、無 AI 圖像)位於 <root>/reference/studio-bar.md。

設計程式碼將品牌決策轉化為每個畫面都遵循的數字。規則:元件僅引用語義令牌;語義令牌引用原始令牌;原始令牌持有原始值。更改語義層,整個產品就會重新佈局。

共享:<root> = 此技能基礎目錄的上兩層(${CLAUDE_PLUGIN_ROOT})。工具:palette.py、tokens.py、search.py、render.cjs、lint.py(<root>/reference/tools.md)。本地參考資料:references/tokens.md(架構、命名、DTCG 格式)、references/components.md(規格與狀態)、references/extract.md(從程式碼或 URL 提取)、references/design-md.md。

模式

  1. 從品牌套件建置(管線):palette.json + 字型 + 形狀/動態決策 → 令牌 → 元件規格 → DESIGN.md → 渲染的樣本頁面。
  2. 從現有專案提取(references/extract.md):追蹤產品渲染的真實令牌、主題、原始變數和變體;標準化為語義結構;撰寫 DESCRIPTION.md 來說明是什麼在管理產品(而非每一個恰好存在的值)。
  3. 稽核/遷移:找出硬編碼的顏色、尺寸、圓角、陰影和時長(lint.py、grep),將它們映射到令牌,依影響範圍提出遷移計劃,然後進行替換。

建置工作流程

  1. 輸入:brand/palette.json(來自 palette.py system --json)、字型(已驗證,如有需要需包含西里爾字母)、圓角邏輯、深度策略、動態令牌、密度。缺少?從 astudio-aio:brand 取得,或依據方向合約決定。
  2. 規格:python3 <root>/scripts/tokens.py init > brand/brand.spec.json;編輯名稱、字型、字體最小/最大尺寸和比例(≈1.2 密集 UI、1.25 產品、1.333+ 表現性)、間距基數(4)、圓角比例、陰影(哪些元素浮動)、動態。
  3. 建置:python3 <root>/scripts/tokens.py build brand/brand.spec.json --out design-tokens → DTCG <brand>.tokens.json、tokens.css(透過 prefers-color-scheme 和 [data-theme] 支援淺色+深色),以及一個自包含的 Tailwind v4 入口 tailwind-theme.css(在 Tailwind 專案中使用它來取代 tokens.css)。
  4. 元件層:為產品所需的元件定義元件令牌和規格(references/components.md):變體、尺寸、每個狀態(預設、懸停、聚焦可見、啟用、停用、載入、錯誤、選中)、結構、間距、無障礙備註。僅在元件必須可獨立設定主題時才添加元件令牌(--button-radius: var(--radius-md)),而非為所有項目添加。
  5. 樣本頁面:建置 design-tokens/specimen.html(或使用其技術棧的 Storybook/頁面),顯示顏色角色及其對比值、實際尺寸下的字體比例、間距、圓角、高度、動態令牌,以及淺色和深色模式下的每個元件狀態。在 1440 和 390 解析度下渲染,檢視並修正。這證明了系統的有效性。
  6. DESIGN.md(references/design-md.md):人類與代理可讀的設計程式碼:氛圍、附有十六進位碼的角色、字體規則、元件、佈局、動態、圖像、語調、應做/不應做。
  7. 整合:在專案入口匯入令牌(Next:app/globals.css;Vite:src/index.css;靜態:<link>),如果使用了 Tailwind/shadcn 變數則進行映射(ui-styling 技能),並在元件中執行 lint.py + grep 搜尋原始十六進位碼。

規則

  • 語義名稱描述用途(--color-ink、--color-surface、--space-section),而非數值(元件中的 --blue-600 是一個錯誤)。令牌名稱可以喚起產品的世界觀(--ink、--parchment)——只看令牌的人應該能猜出這是什麼產品。
  • 一種間距基數(4px);一種圓角邏輯(同心嵌套);一種陰影策略(每層使用邊框 OR 色調階梯 OR 陰影);一組動態曲線。
  • 深色主題是經過設計的,而非反轉:使用較淺的表面階梯來表現深度,調整色度,每一組配對都重新檢查。
  • 使用 clamp() 和 rem 的流暢字體(可縮放);不小於 12px;Operate 螢幕使用更緊湊的固定 UI 比例。
  • 每個互動元件都指定了聚焦可見和停用狀態;目標尺寸 ≥ 24px(觸控裝置為 44px)。
  • 記錄原因,而不只是內容:DESIGN.md 中的每個規則都有其理由,以便後續的工作不會「修正」掉它。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

whoamnesia/brand

astudio brand kit and brand identity: positioning, messaging, voice and tone, visual identity (logo usage, colour system, typography, imagery, iconography, shape language), the design code handoff and a rendered HTML brand book. Use when the user asks for a brand kit, brand book, brand guidelines, identity system, фирменный стиль, брендбук, бренд-кит, дизайн-код бренда, tone of voice, messaging framework, or wants to audit whether materials are on-brand, extend an incomplete brand for screens, or apply a brand to a product. Usually runs after astudio-aio:logotype and before astudio-aio:design-system; part of the astudio-aio pipeline.

whoamnesia/cta-banner

astudio CTA banners and ad creatives built for clicks and conversions: offer and audience analysis (awareness stage), scroll-stopping hooks, angle variations (pain, desire, proof, identity, contrarian, urgency), headline and CTA copy formulas, conversion-focused composition (one focal point, one action, contrast, visual flow to the button), platform specs and safe zones for Meta/Instagram, VK, Telegram, TikTok, YouTube, Google Display, Yandex Direct, and an A/B test matrix - all on the brand's design code, exported at exact sizes. Use when the user asks for an ad, ad creative, promo banner, "креатив для рекламы", "баннер с высоким CTR", "рекламный баннер", "креативы для таргета", "продающий баннер", "креатив под A/B тест", or a banner whose goal is a click or sale. Builds on astudio-aio:banner-design.

whoamnesia/logotype

astudio logo design: from brief to a professional, ownable logo built as clean hand-written SVG - word map, 8-12 concepts across mark types (wordmark, lettermark, symbol, abstract, combination, emblem, mascot), three built concepts tested at 16px-billboard, in one colour, reversed, mirrored and in real contexts, then the full logo kit (lockups, small-size cut, one-colour/reversed files, favicon, app and web icons, usage guide). Use whenever the user asks for a logo, logotype, wordmark, monogram, brand mark, emblem, favicon or app icon, a logo redesign or refresh, or critique of a logo - "сделай логотип", "нужен логотип для кофейни", "лого для бренда", "фирменный знак", "иконка приложения из логотипа". Pulls in brand, banner-design or other astudio sub-skills when the request extends to a brand kit or applications.

whoamnesia/ui-ux

astudio UI/UX design intelligence for any interface task - designing, building, reviewing, auditing, critiquing, polishing or fixing pages, screens and components: hierarchy, layout, typography, colour, spacing, interaction, forms, navigation, states, accessibility (WCAG 2.2), responsive behaviour, motion and UX copy, backed by a searchable database (90 styles, 190+ product types with palettes and reasoning, 74 font pairings, 1900 Google Fonts with Cyrillic filter, 119 UX rules, landing patterns, chart guide, icons, GSAP presets, 22 stack guideline sets). Use when the user asks to improve or review a UI, "make it look better/premium/less generic/less AI", audit accessibility or UX, fix a layout, choose a style/palette/fonts for a product, "проверь интерфейс", "улучши UI", "сделай красивее", "аудит UX", or for any focused UI decision outside the full astudio-aio pipeline.

相關技能