Communitygithub.com

umairmsm/wp-design

WordPress 網站設計的第二階段:從設計方向、靜態 HTML/CSS 原型、設計符記、業主簽核截圖、自託管字型,到將核准的外觀移植為可更換的 WordPress 外觀。

wp-design 是什麼?

這項技能專門處理 WordPress 網站建置流程中的「設計」階段(第二階段)。它的核心目標是將業主核准的視覺風格,透過設計符記 (design tokens) 的方式系統化記錄在 `docs/DESIGN_DIRECTION.md` 中,並在 `static/` 目錄下建立純 HTML/CSS 原型,所有元件僅使用這些符記。技能要求從一開始就導入無障礙設計,使用 Axe 工具檢查,並在業主簽核後將字型自託管(只使用 .woff2 格式,無 Google Fonts 請求)。最後,將設計移植為 WordPress 可更換的外觀主題 (skin),本質上複製 `skins/default` 目錄、修改符記,並在管理中預覽切換。支援的開發平台包括 Claude Code、Cursor 等 AI 代理工具。這項技能的主要好處在於將視覺設計與功能邏輯完全分離,確保未來重新設計不會影響既有功能。

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

在你喜歡的 AI 中提問

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

說明文件

第 2 階段:設計

目標:業主已核准在手機和筆電上看到的樣貌。這個樣貌以符記 (tokens) 形式撰寫,因此可以透過複製變成 WordPress 外觀主題,並且日後更換時不影響功能。

步驟

  1. 方向。 填寫專案的 docs/DESIGN_DIRECTION.md:北極星、目標受眾、我們絕對不能看起來像的對象(競爭對手、範本)、以及不可妥協的事項。最多提供兩個或三個方向,以小型的靈感板或首頁模型呈現,而非完整網站。
  2. 在 static/ 中建立原型。 純 HTML 和 CSS。css/tokens.css 使用與主題的 skins/default/tokens.css 相同的名稱。元件僅使用符記。真實的結構(頁首、主視覺、卡片、表單、頁尾)、佔位文字、無價格與政策文字。
  3. 從一開始就納入無障礙設計:
    • 文字對比度 ≥ 4.5:1;
    • 可見的焦點指示;
    • 一個 H1;
    • 跳至內容連結;
    • 鍵盤操作路徑;
    • 尊重 prefers-reduced-motion。 在展示原型之前,先使用 axe(瀏覽器擴充功能)檢查。
  4. 業主審查。 每個頁面在手機寬度 (375 px) 和筆電寬度 (1440 px) 的截圖。在 DESIGN_DIRECTION.md 中記錄核准日期,並將截圖儲存在 docs/design/ 中。
  5. 字型: 自託管 .woff2 檔案,根據所需語言進行子集化、檢查授權,並預載第一畫面所需的一到兩種字型(將其命名為 *-preload.woff2)。任何地方都不能有 Google Fonts 的請求。
  6. 移植到 WordPress (references/design-system.md):
    • 將符記複製到外觀主題中;
    • 將元件 CSS 移至 skin.css;
    • 使用核心函式庫的渲染函式來佈局範本;
    • 僅在標記必須不同的地方新增外觀主題部分覆蓋。 視覺外觀改變了;核心的資料與標記契約不變。
  7. 日後的重新設計都是新的外觀主題:將 skins/default 複製為 skins/<名稱>、更改符記、使用 ?skin=<名稱> 預覽(管理員),並在核准後以選項 <前綴>_skin 進行切換。

閘門(在 SITE_STATUS.md 中打勾)

  • DESIGN_DIRECTION.md 已撰寫;業主核准記錄附有截圖
  • 符記已定義;元件僅使用符記
  • 字型已自託管;0 個對 Google Fonts 的請求

經驗教訓

  • 當合作夥伴寄來他自己的重新設計時,鎖定的設計因此改變了。因為這個外觀是外觀主題,切換時保留了所有功能。將每個設計都建構成外觀主題,即使是第一個也不例外。
  • 不要複製競爭對手的色板、字型搭配或版面配置。業主會注意到,而訪客不會記得你。
  • 僅供測試用的外觀主題 (dev-*) 永遠不會在正式環境顯示。
  • 如果已安裝 frontend-design 或 design-motion-principles 技能,請將其用於方向與動畫設計。

Individual skills in this repo

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

umairmsm/wp-build

Stage 3 of a wp-site-kit WordPress build - local DDEV site, the core must-use plugin (modules), the presentation-only child theme with skins, the content model (custom post types, meta, WP_Query, render functions), and the enquiry pipeline that saves leads before forwarding. Use when building or changing features, templates, content types, forms or plugin modules on a wp-site-kit site.

umairmsm/wp-content

Stage 4 of a wp-site-kit WordPress build - real copy and photos. Content truth (facts only from the owner), AI drafts and owner approval, claims audits, banned words and fake proof, legal pages, the photo pipeline (dedupe, real-only, EXIF strip, WebP sizes, alt text, AI image register), and recorded content changes. Use for "write the copy", "add photos", "the owner sent new photos", "check for duplicates", "update prices or text on the live site", "legal pages".

umairmsm/wp-kickoff

Stage 1 of a wp-site-kit WordPress build. Use when starting a new WordPress website or taking over or rebuilding an existing one - discovery brief, stack decision, creating the project with bin/wp-site-new, locked decisions, private repo and credentials inventory. Triggers - "new WordPress site", "start a client website", "rebuild this site", "take over this WordPress site".

umairmsm/wp-operate

Stage 8 of a wp-site-kit WordPress build and everything after launch - backups with an off-machine copy, restore drills, the disaster-recovery runbook, credentials inventory, update policy, alerts, and working from more than one machine (bridge file, workstation doctor, encrypted state bundle, rescuing unpushed work). Use for "backup", "restore", "move to a new machine/server", "update plugins", "what if the server dies", "work from the cloud box", "set up a second machine".

umairmsm/wp-seo

Stage 5 of a wp-site-kit WordPress build - titles and descriptions, canonical URLs, one schema owner and JSON-LD, sitemaps, robots.txt and llms.txt, AI crawler access, redirects (301 vs 302), legacy URL maps, Search Console, and adding languages one pilot at a time with Polylang (hreflang, .po/.mo strings, native review). Use for "SEO", "schema", "redirect", "old URLs", "translate the site", "add French/Spanish", "hreflang", "canonical".

umairmsm/wp-ship

Stage 7 of a wp-site-kit WordPress build - staging behind Cloudflare Access, server hardening, safe deploys from a commit (scripts/deploy-safe.sh), database content changes, the launch audit, DNS cutover without breaking a running business, and the first week after launch. Use for "deploy", "set up staging", "go live", "launch", "cutover", "move DNS", "harden the server".

umairmsm/wp-site

Start here for any WordPress website built with wp-site-kit, from an empty folder to a live site. Use when someone says "build a WordPress site", "new website for a client", "where are we on the site", "what is next before launch", or asks to continue a site project. Finds the current stage from SITE_STATUS.md, applies the hard rules, and hands over to the right stage skill.

相關技能