Communitygithub.com

BIGboss248/nextjs-wordpress

使用 SEO 指令列與 MCP 伺服器來設定、自動化並執行 SEO 審核、CI/CD 推送前/部署前檢查以及排名最佳化。

nextjs-wordpress 是什麼?

這個技能提供了一個完整的自動化工作手冊,用於整合 SEO MCP 伺服器、設定 CI/CD 品質關卡,並執行技術與排名審核。它專為 Next.js 和 WordPress 專案設計,但也能應用於其他技術棧。此技能會自動檢查並安裝必要的 SEO 指令列與 MCP 伺服器,確保零手動設定的開發體驗。啟用後,它會根據使用者的意圖引導至四條主要路徑:設定 CI/CD 推送前鉤子與 GitHub Actions 工作流程;執行網站技術與頁面審核(包括修復中繼資料、結構化資料與內部連結);利用 Google Search Console 發掘成長機會;以及執行環境健康檢查。透過無縫整合 MCP 工具(如 `seo_run_report`),此技能能將審核結果直接轉化為具體的程式碼修改建議,從而顯著提升搜尋引擎排名與網站健康度。

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

在你喜歡的 AI 中提問

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

說明文件

SEO 操作與自動化 (seo-ops)

一個自動化工作手冊,用於引導 seo MCP 伺服器、整合推送前與 CI/CD 品質關卡,以及執行基於證據的技術與排名審核。


階段 0:強制性飛行前檢查與自動安裝

[!IMPORTANT] 零手動設定假設:在進行任何程式碼分析或審核之前,請先確認 seo 指令列與 MCP 伺服器已在當前工作階段中設定完畢並可供使用。

flowchart TD
    Start["叫用 /seo-ops"] --> Check{"是否已設定 SEO MCP / 指令列?"}
    Check -->|否 / 遺失| AutoInstall["1. 執行自動安裝<br/>('npm i -g seo' + 寫入 mcp_config.json)"]
    AutoInstall --> TestDaemon["2. 驗證: 'npx -y seo mcp serve --test'"]
    TestDaemon --> PromptRestart["3. 提示使用者重新啟動 Agent/IDE 並停止"]
    Check -->|是 / 已啟用| RouteIntent["繼續進行使用者意圖路由"]

自行安裝手冊(當 MCP / 指令列遺失時觸發)

  1. 安裝套件:
    npm install -g seo
    
  2. 設定 MCP 伺服器: 確認 .agents/mcp_config.json(以及 ~/.gemini/config/mcp_config.json)包含以下內容:
    {
      "mcpServers": {
        "seo": {
          "command": "npx",
          "args": ["-y", "seo", "mcp", "serve"]
        }
      }
    }
    
  3. 驗證守護行程:
    npx -y seo mcp serve --test
    
  4. 提示重新啟動並停止此回合: 如果在本次工作階段中新增了 MCP 工具,Antigravity 需要重新載入工作階段/視窗才能註冊這些工具。請明確說明:

    "seo 指令列與 MCP 伺服器已安裝並註冊。請重新載入 IDE 視窗或重新啟動 Agent 工作階段,以便載入新的 MCP 工具(seo_list_reports、seo_describe_report、seo_run_report),然後重新叫用 /seo-ops。" 在沒有啟用工具的情況下,請勿繼續進行手動程式碼編輯或胡亂猜測。


活躍意圖路由(當 MCP / 指令列準備就緒時)

當滿足先決條件時,提示使用者或檢查上下文以了解其目標:

flowchart LR
    Route["活躍工作階段"] --> A["1. CI/CD 與推送前設定 (setup-cicd)"]
    Route --> B["2. 技術與頁面審核 (audit-technical)"]
    Route --> C["3. Search Console 與成長審核 (audit-gsc)"]
    Route --> D["4. 環境健康檢查 (check-health)"]

路徑 A:儲存庫 CI/CD 與推送前品質關卡 (setup-cicd)

在開發與部署流程中強制執行零回歸的 SEO 關卡:

  • 1. 驗證 Node 22+:執行 node -v 以確保為 Node 22+ 執行環境。
  • 2. 設定本機推送前掛鉤:
    • 部署推送前執行腳本(scripts/seo-pre-push.ps1 或 scripts/seo-pre-push.sh),並帶有開發伺服器自動探測功能(重複使用現有實例或啟動 cmd.exe /c pnpm run dev 並進行處理序樹清理)。
    • 在 .husky/pre-push 中,執行獨立的步驟:
      pnpm run test:all
      pnpm run seo:pre-push
      
    • 請參閱 cicd-pipeline-guide.md。
  • 3. 安裝 GitHub Actions 工作流程:
  • 4. 驗證管線:
    • Windows:powershell -ExecutionPolicy Bypass -File .agents/skills/seo-ops/scripts/verify-seo-setup.ps1 -Mode cicd
    • Linux/macOS:bash .agents/skills/seo-ops/scripts/verify-seo-setup.sh -m cicd

路徑 B:技術與頁面審核 (audit-technical)

對本機建置或線上 URL 執行基於證據的爬取:

  • 1. 啟動本機建置 / 目標:
    • 在 http://127.0.0.1:3000 上執行 pnpm build && pnpm start。
  • 2. 執行技術審核:
    • 透過 MCP:使用 reportId: "audit-page" 或 "site-crawl" 以及 params: {"url": "http://127.0.0.1:3000"} 呼叫 seo_run_report。
    • 透過指令列:
      npx -y seo report --url http://127.0.0.1:3000 --actions-only --json
      
  • 3. 修復 Next.js 程式碼:
    • 更新 generateMetadata()(標題、描述、OpenGraph、標準網址)。
    • 修正 JSON-LD 結構化資料元件(BreadcrumbList、Article、WebSite)。
    • 修正內部損壞的 <Link> 標籤與 app/sitemap.ts。
    • 請參閱 ranking-optimization-guide.md。
  • 4. 驗證修復:
    • 重新執行 seo audit-page --url <target-url> 以確認零錯誤的乾淨狀態。

路徑 C:Search Console 與成長機會 (audit-gsc)

在線上網域中透過 Search Console 發掘排名機會:

  • 1. 透過 MCP 發現報告:
    • 呼叫 seo_list_reports(類別:"gsc" 或 "pseo")。
    • 針對 reportId: "quick-wins"、"second-page" 或 "pseo-patterns" 呼叫 seo_describe_report。
  • 2. 執行機會審核:
    • 使用目標資源(site: "sc-domain:example.com")呼叫 seo_run_report。
  • 3. 套用增強功能:
    • 快速勝利(第 4–10 名):優化 <title> 與 <meta description> 以提高點擊率。
    • 第二頁(第 10–20 名):從高權重的父頁面加入情境式內部連結,並深化內容。
    • pSEO 模式:使用 generateStaticParams() 構建動態路由。
  • 4. 重新驗證:確認更新的中繼資料與結構化資料已在生產環境的 SSR 建置中正確渲染。

邊緣案例與已知陷阱

  • 處理序重新啟動需求:當 .agents/mcp_config.json 被修改時,Agent 必須等到工作階段/視窗重新載入後才能存取新工具。切勿跳過重新啟動提示。
  • Windows 路徑解析:一律使用 "command": "npx" 搭配 ["-y", "seo", "mcp", "serve"],以避免 Windows 上因 %PATH% 二進位檔查詢而發生的錯誤。
  • 禁止靜態猜測:在未先執行 MCP 工具或指令列報告之前,切勿靜態檢查 SEO 相關程式碼。
  • 證據分離:將觀察到的爬取證據與外部提供者的關鍵字估計值分開處理。

參考指南與資源

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

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

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

相關技能