Community编程与开发github.com

miketropi/nextora-ecosystem

Nextora 区块主题生态系统的入口点——子主题、Gutenberg 区块、设计预设、访客颜色/字体切换器,以及模板/部分/模式组合。当请求涉及 Nextora 或 Nextora 子主题,任务跨越多个领域,或需要源代码映射和生态系统生产质量门控时使用。同时用于判断需要哪个专业技能的请求。

nextora-ecosystem 是什么?

该技能是 Nextora 区块主题生态系统的路由入口,协调五个共享单一事实来源和生产质量门控的专业技能。它不包含实现规则,而是通过解析目标主题、判断请求所需的具体专业技能,并移交给相应的专家技能来完成工作。其核心工作流程包括:解析目标主题及其父主题(通过 style.css、theme.json 等真实文件验证)、读取本地证据(如 functions.php、block.json、patterns/ 等)以决定重用现有资源而非重新发明、根据请求意图分派到子主题、Gutenberg 区块、设计系统或站点组合等专业技能,并强制性地加载配对技能(如新子主题+设计系统、新/重制区块+设计系统)。该技能支持 Claude Code、Cursor、Codex 等 AI 代理平台,通过加载专用的 `references/source-map.md` 和 `references/quality-gates.md` 确保代码质量和来源可追溯。同时,它明确了三个边界:不包含运行时脚本、生成器、starter 主题树或包管理器;所有下游构建和浏览器验证命令属于目标主题;工作成果不依赖于该路由器自身的文件布局。

兼容平台✓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. 解析目标主题及其父主题

基于实际安装或提供的代码库进行工作。切勿发明路径,也切勿在输出或笔记中硬编码机器路径。

在 WordPress 安装中,两个根目录是模板目录(父主题)和样式表目录(激活的主题,若是子主题则为子主题):

get_template_directory();      // 父主题根目录
get_stylesheet_directory();    // 激活的主题根目录(有子主题时则为子主题)
get_stylesheet_directory_uri();

在安装环境之外,通过带有 Theme Name 头部(以及子主题的 Template: 头部,标识其父主题)的 style.css 文件定位主题。如果提供的路径缺失,则重新发现真实路径;切勿编造来源证据、默默选择不同的主题,或在 Nextora 源代码不可用时声称兼容 Nextora——说明缺少先决条件并完成不依赖于它的工作。

2. 提议代码前先读取本地证据

从目标主题中按以下顺序读取这些文件,优先使用它们的实时值而非技能中引用的值:

文件解决的问题
style.css主题名称、版本、Template:(子主题的父主题)、Requires at least、Requires PHP、Tested up to、Text Domain、License。
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 指令和基于源代码的参考组成。它不包含运行时脚本、生成器、starter 主题树、包管理器或安装程序。下游的构建和浏览器验证命令属于目标主题,并列出在 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.

相关技能