Community程式設計與開發github.com

Nextora 生態系統路由器

Nextora 區塊主題生態系統的進入點:協調子主題、Gutenberg 區塊、設計系統與站台組合等五項專業技能。當請求涉及 Nextora 或其子主題、任務跨越上述多個領域、或在撰寫程式碼前需要源頭映射與品質門檻時使用。

Nextora 生態系統路由器 是什麼?

這個技能是 Nextora 生態系統的中央路由器,負責協調五個專門技能:子主題建立、Gutenberg 區塊開發、設計系統(調色板/字型預設、訪客切換器)、站台組合(模板、部件、樣式)。它的核心作用是根據使用者請求解析目標主題,判斷需要調用哪些專業技能,並確保所有技能共用同一份來源真相與生產品質門檻。支援平台為任何使用 Nextora 區塊主題的 WordPress 安裝。工作原理是:首先從 live install 或 repository 中找出目標主題及其父主題,然後讀取本地證據(style.css、functions.php、theme.json 等),再根據意圖分派任務(例如建立子主題 → 調用 nextora-child-themes,新增區塊 → 調用 nextora-gutenberg-blocks)。最後載入專業技能並套用品質門檻才能宣告完成。強制配對包括「新子主題 + 任何外觀需求」與「新建或重設樣式區塊」,且設計系統技能在外觀問題上擁有最終決定權。

相容平台✓Claude Code~Codex CLI~Cursor✓OpenCode
npx skills add https://github.com/miketropi/nextora-skills/tree/main/skills/nextora-ecosystem

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

Nextora 生態系統 — 路由器

協調五項共享同一份來源真相與同一組生產門檻的技能。此進入點解析目標主題、判斷請求需要哪些專業技能,然後進行移交。它不包含實作規則:那些規則位於專業技能以及此技能的兩個參考文件中。

本套件中的技能

技能負責範圍
../nextora-child-themes/SKILL.md建立或初始化 Nextora 子主題:標頭檔、引導程序、資產管線、區塊註冊器。
../nextora-gutenberg-blocks/SKILL.md區塊元資料、編輯器 UI、動態渲染、重複器、設定面板、檢視腳本。
../nextora-design-system/SKILL.md調色板/排版預設、樣式變化、可選的訪客顏色/字型切換器、代號與 CSS 表面。
../nextora-site-composition/SKILL.md模板、模板部件、樣式、查詢/彙整組合。

所有專業技能共用的證據與門檻:

  • references/source-map.md — 規則的來源,附有出處。
  • references/quality-gates.md — 在接受工作前必須滿足的條件。

有序工作流程

1. 解析目標主題及其父主題

從 live install 或你被提供的 repository 開始。絕不發明路徑,也絕不在輸出或註記中硬編碼機器路徑。

在 WordPress 安裝中,兩個根目錄是模板目錄(父主題)和樣式表目錄(已啟用的主題,父主題或子主題):

get_template_directory();      // 父主題根目錄
get_stylesheet_directory();    // 啟用中的主題根目錄(若有子主題啟用則為子主題)
get_stylesheet_directory_uri();

在安裝之外,透過帶有 Theme Name 標頭的 style.css 來定位主題;若是子主題,則透過 Template: 標頭指定其父主題。如果提供的路徑遺失,請重新發現真實路徑;絕不捏造來源證據,絕不默默地選擇不同的主題,也絕不在 Nextora 原始碼不可用時聲稱 Nextora 相容性——請說明必要條件缺失,然後完成不依賴該條件的工作。

2. 在提出程式碼前先讀取本地證據

從目標主題依序讀取以下檔案,並偏好其實際值而非技能中引用的任何值:

檔案決定的內容
style.css主題名稱、版本、Template:(子主題的父主題)、最低要求 WordPress 版本、最低要求 PHP 版本、已測試至、Text Domain、授權。
functions.php載入順序、主題在檔案範圍內要求的內容、引入了哪些功能檔案。
theme.json調色板、漸層、字型系列、字型大小、間距代號;自訂模板和模板部件;version。
package.json實際存在哪些建置/驗證指令,以及哪些函式庫已是相依項目。
theme.js/.nvmrc、建置腳本Node 版本和真實的建置進入點。
AGENTS.md、README.md、docs/、.opencode/專案說明。將它們視為需驗證的主張,而非權威。

然後找出已存在的內容,再提出任何新內容:

  • blocks/*/block.json — 已註冊的區塊、其名稱、類別、支援項目。
  • parts/*.html、templates/*.html — 組合表面及其層級結構。
  • patterns/*.php — 可重複使用的區段標記。
  • resources/css/ + assets/css/ — 實際發佈的樣式表及其建置方式。
  • resources/ts/editor/ 或同等內容 — 可重複使用而非重寫的共享編輯器輔助工具(預覽外殼、豐富文字、媒體、重複器)。
  • inc/ — 查詢、導覽、模板的輔助工具。

重複使用勝過發明:能夠勝任工作的現有區塊、樣式、輔助工具或代號就是正確答案,只有當請求的行為或編輯結構無法以其他方式表達時,才需要建立新區塊。

3. 根據意圖分派

請求需載入的專業技能
建立、架設或初始化子主題;子主題資產管線;子主題區塊註冊nextora-child-themes
新增/修改區塊:block.json、屬性、編輯器 UI、render.php、檢視腳本、重複器、設定面板nextora-gutenberg-blocks
顏色、字型、間距代號、樣式變化、訪客切換器、「必須遵循調色板」nextora-design-system
模板、模板部件、樣式、頁面佈局、彙整、文章查詢nextora-site-composition

組合請求會載入所有適用的專業技能。有兩個組合是必須的:

  • 新子主題 + 任何外觀需求 → nextora-child-themes 和 nextora-design-system。一個必須遵循預設值或訪客切換器的子主題無法僅由子主題技能完成。
  • 新建或重設樣式區塊 → nextora-gutenberg-blocks 和 nextora-design-system。區塊外觀由設計系統負責。

由於專業技能必須達成一致,請在同一個工作階段載入它們,並讓設計系統技能在其涵蓋的任何外觀問題上擁有最終決定權。

4. 逐步載入參考文件

每個專業技能都可以直接調用;執行此路由器並非必要前提。當你載入一個專業技能時,開啟其 SKILL.md,然後僅閱讀其工作流程中按相對路徑命名的參考檔案。上述兩個共享參考文件已從每個專業技能連結,因此跨技能的相對連結(../nextora-ecosystem/references/...)必須保持可解析——請勿移動或重新命名它們。

5. 移交

載入專業技能,遵循它們的有序工作流程,並在宣告任何事項完成前套用 references/quality-gates.md。如果請求純粹是關於規則來源的問題,請從 references/source-map.md 回答並停止。

完成檢查

  • 目標主題和父主題是從它們自己的 style.css/theme.json 識別出來的,而非假設。
  • 只引用真實存在的檔案;任何引用為來源的內容必須是在本次工作階段中讀取的。
  • 每個適用的專業技能都已載入,包括上述強制配對。
  • 新的程式碼重複使用現有的區塊、樣式、輔助工具和代號(如果存在)。
  • references/quality-gates.md 已套用於結果。
  • 除了上述相對連結外,工作內容不依賴於此路由器自己的檔案佈局。

邊界

此套件是 Markdown 指令和原始碼支持的參考文件。它不包含任何執行時期腳本、產生器、起始主題樹、套件管理器或安裝程式。下游的建置和瀏覽器驗證指令屬於目標主題,並列在 references/quality-gates.md 中。

Individual skills in this repo

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

miketropi/nextora-child-themes

Create, bootstrap or audit a child theme of the Nextora parent block theme — the style.css header with Template nextora, the functions.php load order, the single version constant kept in sync with the header, the front-end and editor-canvas asset pipeline with its parent handle dependencies, the child block registrar and inserter category, PHP/i18n conventions, and the optional feature-file layout. Use when a request names a Nextora child, a new child theme name or slug, a child theme header or version bump, child CSS/JS enqueueing, editor canvas styles, a child block folder or block category, porting Nextsaas conventions into a new child, or asks why child code cannot call the parent at file scope. Pair with nextora-design-system for any child that must follow palette or visitor font/colour switching.

miketropi/nextora-site-composition

Compose the surfaces of a Nextora or Nextora child block theme — HTML templates and template parts, PHP block patterns and their categories, page templates and the template hierarchy, front-page versus posts-index, filesystem patterns referenced from thin templates, core query/archive/search loops and explicit query context, header and footer ownership, and filesystem-versus-Site-Editor customisation. Use when a request asks for a landing page layout, a page template, an archive or search composition, a reusable pattern or section, a header/footer part, a query loop, or asks why a template file edit shows no change on the front end.

nextora-design-system

Own colours, typography, spacing tokens, style variations and the optional visitor colour/font switcher for the Nextora parent theme and its child themes. Use when a request mentions a palette, colour role, preset slug, font family or font preset, theme.json settings, Tailwind @theme aliases, CSS custom properties, a style variation, "follow the palette", "must switch with the visitor's choice", scoped block colours, or appearance for a new child theme.

nextora-gutenberg-blocks

Build or change Gutenberg blocks in the Nextora parent theme or a Nextora child theme — block.json registration, typed attributes, native visual editing with RichText and media, InspectorControls settings panels, repeatable list editors with modal item editing, render.php output, view scripts, block style variations, and the esbuild block pipeline. Use when a request mentions a block, block.json, edit.tsx, index.tsx, render.php, ServerSideRender, InnerBlocks, a repeater or list editor, a modal item form, an inspector panel, a block category, or "add/restyle a section block" for Nextora.

相關技能