Communitygithub.com

BIGboss248/nextjs-wordpress

發現、訪談並製作全面的 UX/UI 設計規格書 (design-spec.md) 與設計記號,適用於網頁元件。觸發關鍵字為「/component-design」、「design component」、「design section」、「design UI」、「wireframe component」或「create design spec」。

nextjs-wordpress 是什麼?

此技能提供一套結構化的 UX/UI 探索與規格制訂工作流程,專為設計網頁與應用程式的元件、區塊及頁面而設計。它能產出可直接用於視覺原型工具(如 stitch-design)和後續程式碼實作流程的設計規格書 (design-spec.md)。 技能核心包含五大執行步驟:第一步為動態內容探索與設計記號驗證,確保 docs/project.json 中的設計記號完整;第二步為多輪漸進式元件訪談,透過三回合的問答深入了解元件意圖、空間層次與互動細節;第三步則主動為使用者準備圖片生成提示,避免直接呼叫圖片生成功能;第四步按照標準九段模板在 docs/design/components/[page]/[component]/ 路徑下產出 design-spec.md;最後一步由獨立子代理進行品質稽核,自動修復發現的問題。 此技能特別強調「零編碼原則」(不產出任何 React 或 Next.js 程式碼)、「記號優先原則」(缺少設計記號無法進行設計),以及「記號節省原則」(不直接呼叫 generate_image)。支援 Cursor、Claude Code、Codex 等平台,適合需要從設計討論到產出完整規格書的團隊使用。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BIGboss248/nextjs-wordpress/tree/HEAD/.agents/skills/component-design

在你喜歡的 AI 中提問

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

說明文件

元件與 UI 設計技能 (component-design)

一套結構化的 UX/UI 探索與規格制訂工作流程,適用於設計網頁與應用程式的元件、區塊及頁面。產出可被視覺原型工具(如 stitch-design)及程式碼實作工作流程消耗的生產級設計規格書 (design-spec.md)。


守則與核心原則

[!IMPORTANT] 1. 零編碼守則(純設計範疇):此技能嚴格專注於 UX、UI、佈局架構、字體排版與視覺記號。絕不產出 React 元件、Next.js 指令、TypeScript prop 介面或套件安裝指令(無 shadcn/Radix CLI 指令)。程式碼實作由下游開發流程處理。

[!CAUTION] 2. 設計記號前置閘門(記號優先規則):在未驗證 docs/project.json 中有正規的設計記號之前,無法設計任何元件。遺漏的記號必須先透過訪談補齊並持久化,然後才能起草元件設計。請參閱 token-verification-matrix.md。

[!TIP] 3. 記號節省規則(禁止在技能內直接產生圖片):絕不直接呼叫 generate_image。應為使用者制定結構化的圖片生成提示,讓使用者自行產生並放入專案目錄中。

[!NOTE] 4. 選擇性模式查閱(記號節省):檢查 references/component-design-patterns.md 中的路由表,僅載入 references/patterns/ 下相符的元件檔案(例如 hero.md)。若相符,在適應性訪談中明確詢問使用者是否希望實作該模式。


工作流程概述

flowchart TD
    Start["觸發 /component-design<br/>(頁面 + 元件名稱)"] --> Step1["步驟 1:動態內容與記號閘門<br/>(掃描 docs/**、CONTEXT.md、記號與目標模式)"]
    Step1 --> CheckTokens{"設計記號在<br/>docs/project.json 中是否完整?"}
    CheckTokens -- "缺少記號" --> GrillTokens["訪談缺少的記號<br/>(提供 3 個與情境相關的選項)"]
    GrillTokens --> SaveTokens["持久化至 docs/project.json"]
    SaveTokens --> Step2
    CheckTokens -- "已驗證" --> Step2["步驟 2:多輪適應性訪談<br/>(第 1–3 輪 + 目標模式訪談)"]
    Step2 --> Step3["步驟 3:視覺資產提示制訂<br/>(提供可直接使用的圖片提示)"]
    Step3 --> Step4["步驟 4:建立並撰寫 design-spec.md<br/>(docs/design/components/[page]/[component]/)"]
    Step4 --> Step5["步驟 5:子代理稽核與自動修復<br/>(invoke_subagent 檢查守則與記號)"]
    Step5 --> Finish["規格書準備就緒,可交付下游<br/>(視覺原型 / 實作)"]

執行手冊

步驟 1:動態內容探索與設計記號驗證閘門

  1. 掃描專案內容:動態檢查 docs/ 目錄下所有檔案以及根目錄的 CONTEXT.md,以提取目標角色、商業目標與現有設計書籤。
  2. 掃描支援的地區設定:讀取 docs/project.json 中的 project_context_and_metadata.supported_languages。
  3. 驗證設計記號:根據 token-verification-matrix.md 稽核 docs/project.json 中的 "design_system"。
  4. 訪談缺少的記號:若記號遺失,制定 3 個針對專案的選項(標記一個為 (推薦)),詢問使用者後將結果持久化至 "design_system" 下。
  5. 目標設計模式查閱:掃描 references/component-design-patterns.md 中的路由表,僅查看 references/patterns/ 下與正在設計的元件相符的特定元件模式檔案。

步驟 2:漸進式多輪元件訪談

使用 ask_question(或互動式聊天)執行適應性的三回合訪談,在回合之間暫停以吸收使用者回答。請參閱 adaptive-grilling-rounds.md 以了解完整的問題格式:

  • 若在 references/patterns/ 中找到相符的模式,將其問卷整合到第 1 輪或第 2 輪,明確詢問使用者是否希望實作該模式。
  • 第 1 輪(意圖與故事):釐清元件目的、使用者待辦工作與情感基調。
  • 第 2 輪(空間層次與網格):根據第 1 輪的回應,調整多欄佈局、密度規模與焦點視線流。
  • 第 3 輪(互動與強調色):根據第 1 輪與第 2 輪的結果,建立懸停/焦點狀態動態、媒體資產與 BiDi / RTL 細微差別。

步驟 3:主動式視覺資產提示制訂

若元件需要客製圖形、背景或圖示,為使用者制定結構化的生成提示,而非直接呼叫 generate_image。請參閱 adaptive-grilling-rounds.md 中的提示區塊格式。

步驟 4:建立元件資料夾與 design-spec.md

  1. 建立目錄:docs/design/components/[page name]/[component name]/
  2. 使用 design-spec.template.md 中的標準九段佈局建立 design-spec.md:
    • §1 執行摘要與故事
    • §2 視覺層次與空間流程
    • §3 佈局網格與回應式中斷點(手機、平板、桌面)
    • §4 設計記號與色彩對應(淺色與深色)
    • §5 字體排版比例(每個支援的地區設定)
    • §6 互動狀態矩陣(預設、懸停、啟用、焦點、停用、骨架載入)
    • §7 雙向(RTL)適應
    • §8 無障礙與人體工學(WCAG AA/AAA、$\ge 44\text{px}$ 觸控目標)
    • §9 建議的視覺資產與提示

步驟 5:獨立子代理品質稽核 (invoke_subagent)

為確保無偏差的品質,在將結果呈現給使用者之前,呼叫一個獨立的審查子代理:

  1. 啟動稽核子代理(TypeName: "self"、Role: "Independent Design & UX Auditor"、Model: "inherit")。
  2. 使用 subagent-audit-protocol.md 中的結構化稽核提示。
  3. 若發現 ISSUES_FOUND,在結束前立即解決 design-spec.md 中所有被標記的問題。

下游交付

一旦 design-spec.md 獲得批准並驗證:

  1. 視覺原型:觸發 stitch-design 以在 Google Stitch 中產出 UI 畫面與佈局變體。
  2. 程式碼實作:將 design-spec.md 提供給元件實作技能(例如 nextjs-component-dev / nextjs-create-component)。

執行驗證檢查清單

在完成執行前,請確認:

  • 交付物中不含任何程式碼或函式庫安裝指令(無 React、Next.js、shadcn CLI)。
  • docs/project.json 中的正規設計記號已驗證且完整。
  • 輸出目錄結構為 docs/design/components/[page]/[component]/。
  • 訪談選項是動態合成的,沒有任何硬編碼的儲存庫假設。
  • 元件訪談遵循漸進式適應性回合。
  • 未直接呼叫 generate_image;已向使用者提供資產提示。
  • design-spec.md 包含所有 9 個必要章節。
  • 已透過 invoke_subagent 呼叫獨立子代理稽核,且所有問題均已解決。

Individual skills in this repo

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

BIGboss248/nextjs-wordpress

Create, configure, manage, and validate Google Antigravity customizations including skills, rules, MCP servers, lifecycle hooks, plugins, and custom JSON configs. Use when adding new capabilities to Antigravity, configuring MCP servers, writing rules, creating skills, setting up hooks, or modernizing legacy workflows.

BIGboss248/nextjs-wordpress

Spawn multiple agents into a shared conversation where they debate, disagree, and converge on a solution via a shared chat.json file. Use for architecture decisions, code review debates, design trade-offs, or any problem that benefits from adversarial reasoning. Triggers on "chatroom", "agent debate", "have agents discuss", "agent chatroom", "debate this", or /agent-chatrooms. Also triggers on phrases like "have 3 agents argue about", "multi-agent discussion", or "let them debate".

BIGboss248/nextjs-wordpress

Always-active code intelligence, search, and navigation skill utilizing the codebase-memory MCP server. Enforces an index-first protocol (verifying and refreshing the knowledge graph via index_repository or index_status before searching, required because background auto_watch is disabled to eliminate editor stutter and system lag), followed by graph-first exploration (search_graph, trace_path, get_code_snippet, query_graph, get_architecture, detect_changes) instead of naive text grep or full-file reads. Always activate before searching the codebase, inspecting unknown architecture, finding symbols, or tracing callers/callees.

BIGboss248/nextjs-wordpress

>- Configure and query WooCommerce APIs including WPGraphQL, WooGraphQL, and JWT auth for headless frontends. Use when connecting Next.js to WooCommerce or fetching store catalog data.

BIGboss248/nextjs-wordpress

Orchestrate parallel browser automation using multiple Chrome DevTools MCP instances. Use when a task requires doing the same browser action across many targets simultaneously (e.g., submitting contact forms, filling applications, scraping pages that need JS rendering). Spin up 1-5 parallel Chrome agents.

BIGboss248/nextjs-wordpress

Workflow for spawning an independent subagent to conduct unbiased code reviews and inject adversarial edge-case tests ([ComponentName].edge.test.tsx).

BIGboss248/nextjs-wordpress

>- Build Next.js App Router React components with Suspense skeletons, semantic OKLCH tokens, Jest + RTL unit tests, Playwright visual/hydration checks, and Tailwind logical styling. Triggers on "/nextjs-component-dev", "create component", "new component", "build component", or "develop component".

BIGboss248/nextjs-wordpress

>- Bootstrap, configure, and verify the complete Next.js App Router development environment, developer tooling, testing suites, MCP servers, Docker containerization, and CI/CD. Triggers on "/nextjs-dev-setup", "setup nextjs dev environment", "start a nextjs project", or "containerize nextjs app".

BIGboss248/nextjs-wordpress

>- Configure production health monitoring endpoints (/api/health), Docker Compose probes, and runtime metrics in Next.js App Router applications. Use when asked to "setup health check", "add health endpoint", "docker compose healthcheck nextjs", "configure health monitor", or "/nextjs-healthcheck".

BIGboss248/nextjs-wordpress

Bootstrap, configure, and verify next-intl App Router internationalization (proxy.ts/middleware.ts, next/root-params, [locale] layout, routing). Triggers on "/nextjs-i18n-setup", "setup i18n", "install next-intl", "configure next-intl", "add internationalization", "setup locale routing", "migrate to [locale]".

BIGboss248/nextjs-wordpress

Read/write translation dictionaries (messages/[locale].json), next-intl hooks (getTranslations/useTranslations), providers (Storybook/tests/subtrees), and BiDi styling. Triggers on "/nextjs-i18n-usage", "i18n dictionary", "use translations", "read dictionary", "i18n provider", "next-intl hooks", "storybook i18n", "test i18n", "add translation keys", "localize component", "create a component", "update a component".

BIGboss248/nextjs-wordpress

>- Configure, test, and verify OpenTelemetry (OTel) observability in Next.js App Router applications. Triggers on "/nextjs-otel", "setup otel", "configure opentelemetry", "test otel", or "verify opentelemetry".

BIGboss248/nextjs-wordpress

Step-by-step workflow for designing and building Next.js App Router pages (RSC page.tsx, loading skeleton, metadata, JSON-LD schema, and dynamic static params). Triggers on "/nextjs-page-dev", "create page", "new page", "develop page", "build route", or "implement page".

BIGboss248/nextjs-wordpress

>- Orchestrate end-to-end planning for Next.js App Router projects, generating canonical specifications, design systems, and a 7-phase modular implementation roadmap in docs/plan/. Triggers on "/nextjs-plan", "plan a nextjs project", "plan nextjs app", "create nextjs project plan", "outline nextjs architecture", or "generate plan".

BIGboss248/nextjs-wordpress

Workflow and engineering standards for crafting co-located Storybook CSF3 stories ([ComponentName].stories.tsx) with interactive controls, action spies, and 4 canonical theme variants.

BIGboss248/nextjs-wordpress

>- Build Next.js e-commerce frontends backed by WooCommerce APIs, handling ISR catalogs, cart sessions, and JWT authentication. Use when building or querying Next.js stores with WooCommerce.

BIGboss248/nextjs-wordpress

Self-correcting rules engine and feedback loop that learns from user corrections, mistakes, and project-specific constraints by maintaining a persistent autofix ruleset. Scans learned rules before starting any task, resolves conflicts, and automatically appends new rules upon corrections. Triggers on user corrections ("no, do it this way", "never do X", "always use Y"), /learn, "self repair", "add rule", "update rules", or when diagnosing assumptions and bugs. CRITICAL ALWAYS-ACTIVE LIFECYCLE SKILL. Must always be kept in context, loaded at session start, and consulted before starting ANY task to read and apply active constraints from autofix.json. MUST ALWAYS be triggered immediately whenever the user provides ANY correction, preference, criticism, rejection of an approach, or adjustment ("no", "don't do X", "use Y", "remember", "prefer"), or when any mistake/bug is identified. Automatically and immediately formulates and appends the new imperative rule to the project's autofix.json ruleset file.

BIGboss248/nextjs-wordpress

Setup, automate, and execute SEO audits, CI/CD pre-push/pre-deploy checks, and ranking optimizations using the seo CLI and MCP server.

BIGboss248/nextjs-wordpress

End-to-end repository onboarding and development environment setup skill. Scans repository structure, configures project metadata (docs/project.json), sets up the codebase-memory-mcp code intelligence knowledge graph server (in workspace mcp.json and globally for AGY only), configures git hooks with Husky and Commitlint, establishes multi-stage production Docker containerization, and automates credit-optimized Release Please CI/CD with multi-arch (AMD64 & ARM64) GHCR package deployment. Triggers on "/setup-repository", "setup repository", "setup repo", "initialize repository", "new repo setup", or when preparing any repository for development and AI agent workflows.

BIGboss248/nextjs-wordpress

AI screen scaffolding, layout generation, and variant exploration workflow powered by Google Stitch (StitchMCP). Consumes a component design specification (docs/design/components/[page name]/[component name]/design-spec.md), verifies and reuses the central Stitch project in docs/project.json (or creates/persists one if absent), seeds the project's design system into Stitch, synthesizes layout prompts to generate a screen and create one variant of the given design spec file, downloads and saves Stitch JPG screenshots and HTML code files directly into docs/design/components/[page name]/[component name]/stitch/ using binary-safe PowerShell Invoke-WebRequest, outputs image prompts to the user if visual assets are needed (without calling generate_image to conserve tokens), updates design-spec.md with Stitch layout benchmarks, and audits asset download integrity with an independent subagent. Triggers on "/stitch-design", "generate stitch screen", "create stitch variant", "scaffold screen with stitch", or "stitch...

相關技能