Community生產力與協作github.com

BIGboss248/nextjs-wordpress

為 Next.js App Router 專案提供端到端的規劃流程,自動產生標準規格、設計系統與 7 階段模組化實施藍圖至 docs/plan/ 目錄。可透過「/nextjs-plan」、「規劃 Next.js 專案」等指令觸發。

nextjs-wordpress 是什麼?

此技能專為 Next.js App Router 專案設計,提供一個結構化且可重複的規劃流程。當被觸發時,它會自動檢查工作區檔案以提取技術規格,然後對使用者進行有針對性的詢問,最後產出完整的專案規劃產出物。這些產出物包括一個標準化的 `docs/project.json` 檔案、類型安全的 `lib/` 目錄工具,以及一份詳細的設計策略文件和一份 7 階段的模組化實施路線圖。此技能特別強調「先檢查,後提問」的原則,避免詢問可直接從程式碼倉庫推斷出的資訊,例如 `package.json` 或目錄結構。它支援在 Cursor、Claude Code 或 Codex 等 AI 編碼代理程式中使用,透過標準化規劃階段來顯著減少架構設計上的不確定性,並確保團隊或 AI 助理能遵循一致的實施路徑。執行完成後,它會提供一個摘要儀表板,並明確指示不會自動觸發後續的技能,讓使用者審閱計畫。

相容平台~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/                      # 使用者體驗、使用者介面與畫面規格
│   │   ├── 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:伺服器動作、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 條已對應路由
  - **已識別元件**:跨 Z 個區段編錄共 Y 個元件
  - **已完成階段**: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...

相關技能