Community生产力与协作github.com

BIGboss248/nextjs-wordpress

编排 Next.js App Router 项目的端到端规划,生成规范文档、设计系统和分 7 阶段的模块化实施路线图,并存放于 docs/plan/ 目录下。可通过 "/nextjs-plan"、"plan a nextjs project" 等指令触发。

nextjs-wordpress 是什么?

该技能是一个结构化编排工具,专为规划 Next.js App Router 应用而设计。当被触发时,它会自动扫描工作区文件以提取项目依赖、路由结构、UI 库等技术细节,然后通过一系列有目标性的“拷问式”访谈收集用户需求,最终输出一套完整的项目规划文档。输出内容涵盖规范化的项目配置文件 (`docs/project.json`)、类型安全的代码注册表 (`lib/routes.ts` 和 `lib/site-config.ts`)、设计策略与 UI 设计令牌文档 (`docs/design/` 文件夹),以及一个清晰的 7 阶段模块化实施路线图 (`docs/plan/` 文件夹)。该技能适用于 Claude Code、Cursor 等 AI 编码助手,旨在将每个项目从启动到交付的整个规划流程标准化,避免遗漏关键步骤(如健康检查端点、页面级 SEO 文件)。其核心优势在于“先检查后提问”的理念,强制用户从页面到组件逐层细化需求,并确保所有规划产物都是一致的、可追溯的单一事实来源。

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

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Next.js 项目规划技能 (nextjs-plan)

一个用于规划 Next.js App Router 应用的结构化编排技能。当被调用时,它会从现有工作区文件中提取技术规格,针对用户需求进行有目标性的拷问式访谈,并输出规范的 docs/project.json、类型安全的 lib/ 代码注册表、docs/design/ 中的设计概要以及 docs/plan/ 中的 7 阶段模块化实施路线图。


工作流程概览

flowchart TD
    Invoke["调用 /nextjs-plan"] --> Step1["1. 自动化工作区检查<br/>(提取依赖、目录结构、样式、配置、路由)"]
    Step1 --> Step2["2. 对页面和需求进行拷问式访谈<br/>(页面 ➔ 区块 ➔ 组件)"]
    Step2 --> Step3["3. 生成规范文档<br/>(docs/project.json & lib/ 注册表)"]
    Step3 --> Step4["4. 文档化策略与设计系统<br/>(docs/design/ 01-strategy, 02-sitemap, 03-tokens)"]
    Step4 --> Step5["5. 生成 7 阶段模块化实施计划<br/>(docs/plan/ README.md & 01-07 阶段文件)"]
    Step5 --> Step6["6. 完成与收尾<br/>(展示总结面板;不要调用下游技能)"]

标准化项目目录结构

├── lib/                             # 类型安全的 Next.js 代码唯一事实来源
│   ├── routes.ts                    # 集中式路由注册表与路径构建器
│   ├── site-config.ts               # 集中式站点元数据、作者简介、社交链接
│   └── utils.ts                     # Tailwind cn 辅助函数
├── docs/                            # 架构、规划与设计依据
│   ├── project.json                 # 规范的机器可读规格
│   ├── plan/                        # 7 阶段模块化实施路线图
│   │   ├── README.md                # 主面板:进度追踪与阶段索引
│   │   ├── 01-discovery-and-architecture.md
│   │   ├── 02-environment-and-cicd.md
│   │   ├── 03-system-health-probe.md
│   │   ├── 04-core-foundations.md
│   │   ├── 05-pages-and-components.md
│   │   ├── 06-server-functions-and-metadata.md
│   │   └── 07-integrations-and-release.md
│   ├── design/                      # UX、UI 与屏幕规格
│   │   ├── 01-strategy-brief.md     # 目的、用户画像、目标、KPI、基准
│   │   ├── 02-sitemap-and-routes.md # 页面清单、区块层级、渲染矩阵
│   │   ├── 03-ui-design-tokens.md   # 语义化 CSS 令牌、排版、组件原语
│   │   └── components/              # 组件设计规格与拼合截图
│   └── adr/                         # 架构决策记录

逐步执行手册

1. 自动化工作区检查(零中断)

[!IMPORTANT] 先检查,再提问。 永远不要询问用户可以直接从工作区文件中推断出的事实。

  • 扫描工作区上下文:检查 package.json、锁文件(pnpm-lock.yaml、bun.lockb)、路由结构(app/ vs src/app/)、组件目录、app/globals.css、UI 库(shadcn/ui、lucide-react、动画)、next-intl 配置(根 messages/ 文件夹)、现有路由(page.tsx、route.ts)以及测试/Docker 配置。
  • 完整检查清单,请参阅 workspace-inspection.md。

2. 用户拷问式访谈(页面 ➔ 区块 ➔ 组件)

  • 进行适应性拷问式访谈:使用拷问前沿方法论,以结构化轮次与用户互动。为每个问题编号并提供推荐答案。
  • 强制拷问顺序:
    1. 页面拷问:列举所有必需的网页及其目标 URL 路由。
    2. 区块拷问:针对每个页面,从上到下识别所有内容区块。
    3. 组件拷问:针对每个区块,定义所有必需的 UI 组件。
  • 核心询问点:问题陈述、目标用户画像、认证方式、数据层/ORM、i18n 区域设置与 RTL、视觉美学基调以及部署目标。
  • 访谈模板与决策树规则,请参阅 grilling-interview.md。

3. 生成规范文档与类型安全代码

  • 创建 docs/project.json:填入技术元数据(包管理器、组件目录、样式、UI/动画/测试库、支持的语言、字典路径)。请参阅 project-schema.md 并使用 project.json.template。
  • 创建 lib/routes.ts:根据 routes.ts.template 生成类型安全的路由注册表。
  • 创建 lib/site-config.ts:根据 site-config.ts.template 生成集中式站点配置和元数据。

4. 在 docs/design/ 中记录设计策略

5. 生成 7 阶段模块化实施路线图(docs/plan/)

  • 搭建 docs/plan/ 目录:使用 resources/templates/plan/ 中的模板部署模块化计划文件:
    1. docs/plan/README.md(主进度面板)
    2. docs/plan/01-discovery-and-architecture.md(阶段 1)
    3. docs/plan/02-environment-and-cicd.md(阶段 2)
    4. docs/plan/03-system-health-probe.md(阶段 3:/api/health 存活探针)
    5. docs/plan/04-core-foundations.md(阶段 4:环境变量、i18n、主题令牌、布局、OTel)
    6. docs/plan/05-pages-and-components.md(阶段 5:带 SEO 和支持文件的规范页面与组件检查清单)
    7. docs/plan/06-server-functions-and-metadata.md(阶段 6:服务端 Actions、API 路由、全局 SEO)
    8. docs/plan/07-integrations-and-release.md(阶段 7:集成与生产发布)
  • 具有强制页面级文件的唯一事实来源:阶段 5(05-pages-and-components.md)是页面和组件的唯一规范检查清单。对于每个页面,强制要求包含 page.tsx、loading.tsx、error.tsx、generateMetadata、JSON-LD Schema 和 generateStaticParams()(针对动态路由)的子清单任务。
  • 页面完成规则:在阶段 5 中,仅当页面的所有组件子清单项以及页面级 SEO/支持任务都完成时,才将该页面标记为 - [x]。
  • 完整的阶段指南请参阅 plan-checklist-structure.md。

6. 收尾与完成门禁

  • 向用户展示简洁的总结报告,详细说明工作区发现、docs/project.json 中的规格以及 docs/plan/README.md 中的路线图。
  • 不要自动调用下游 Next.js 技能。 结束执行,让用户审阅计划。

边界情况与已知 AI 陷阱

[!WARNING]

  • 命令链:永远不要在一行中使用 &&、|| 或 ; 执行复合命令。始终单独执行终端命令。
  • 未经检查即发问:不要询问用户可以直接从 package.json 或目录列表中读取的基本事实。
  • 里程碑顺序颠倒:健康检查探针(/api/health)应属于阶段 3,接着是阶段 4 的核心基础(i18n、主题、布局、OTel),然后才是页面/组件实现。
  • 遗漏页面级文件:编写阶段 5 检查清单时,不要遗漏任何页面的 loading.tsx、error.tsx、generateMetadata 或 JSON-LD schema 任务。
  • 页面列表重复:所有页面和组件的追踪严格保持在 docs/plan/05-pages-and-components.md 中。
  • 过早标记页面完成:阶段 5 中的页面必须保持 - [ ],直到每个子组件和页面级支持文件都完成。
  • 字典位置错误:在 Next.js i18n 配置中,字典位于根 messages/(例如 messages/en.json),绝不在 app/dictionaries 中。
  • 衍生下游技能:完成计划后不要自动触发实现或样式技能;停止并等待用户指示。

输出总结模板

规划阶段结束后,按以下格式呈现总结:

### Next.js 项目计划已完成

- **规范文档**: `[docs/project.json](file:///...)`
- **类型安全注册表**: `[lib/routes.ts](file:///...)` | `[lib/site-config.ts](file:///...)`
- **设计与策略规格**: `[docs/design/01-strategy-brief.md](file:///...)`, `[docs/design/02-sitemap-and-routes.md](file:///...)`, `[docs/design/03-ui-design-tokens.md](file:///...)`
- **模块化路线图面板**: `[docs/plan/README.md](file:///...)`
  - **已识别页面**: 共 X 个路由已映射
  - **已识别组件**: 共 Y 个组件已编目,分布于 Z 个区块
  - **已完成阶段**: N / 7 个阶段已验证

_规划完成。请查阅 `docs/plan/README.md` 以继续组件设计或实现。_

参考指南与模板

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

>- Discover, interview, and craft comprehensive UX/UI design specifications (design-spec.md) and design tokens for web components. Triggers on "/component-design", "design component", "design section", "design UI", "wireframe component", or "create design spec".

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

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...

相关技能