Communitygithub.com

BIGboss248/nextjs-wordpress

始終活躍的程式碼智能、搜尋和導航技能,利用 codebase-memory MCP 伺服器。強制執行索引優先協議(在搜尋前驗證並更新知識圖譜),接著進行圖譜優先探索(search_graph、trace_path、get_code_snippet 等),取代單純的文字 grep 或完整檔案讀取。在搜尋程式碼基底、檢查未知架構、尋找符號或追蹤呼叫者/被呼叫者前務必啟用。

nextjs-wordpress 是什麼?

此技能定義了使用 **codebase-memory MCP 知識圖譜** 來探索、搜尋和理解程式碼的工程標準、操作程序及工具使用合約。其核心不變規則是**索引優先協定**:由於背景監控(auto_watch)已永久停用以防止磁碟震顫和系統卡頓,AI 代理在執行任何搜尋之前,必須先驗證索引的新鮮度或觸發按需重新索引(index_repository)。之後,代理應嚴格遵循**圖譜優先、grep 其次**的工具層級:使用 search_graph 進行結構化搜尋、trace_path 進行呼叫鏈追溯、get_code_snippet 進行精確的原始碼檢索,並使用 detect_changes 評估變更的影響範圍。唯有在處理純文字、設定檔或索引狀態中標記為 parse_partial 的檔案時,才將 grep 作為備用方案。此技能支援所有主要的 AI 編碼代理平台(如 Claude Code、Cursor、Codex),並透過標準的 MCP 工具介面提供服務,確保開發流程高效、精確且上下文友善。

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

在你喜歡的 AI 中提問

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

說明文件

程式碼記憶體與圖譜智能(codebase-memory)

此技能定義了使用 codebase-memory MCP 知識圖譜 來探索、搜尋和理解程式碼的工程標準、操作程序及工具使用合約。


核心不變規則:索引優先協定

[!CRITICAL] 索引優先不變性: 背景監控重新索引在此工作區中已永久停用(auto_watch = false),以防止在主動編輯檔案時發生磁碟震顫、zstd 序列化開銷和系統卡頓。

因此,代理在對程式碼知識圖譜執行搜尋之前,必須始終驗證索引的新鮮度,或觸發按需重新索引(index_repository)。

每當你需要尋找符號、理解模組、調查錯誤或準備重構時,請在進行搜尋呼叫之前執行索引優先閘門。


工具層級:圖譜優先,Grep 其次

在發現、導航或審查程式碼時,嚴格遵守此優先順序層級:

flowchart TD
    Task[程式碼發現 / 調查任務] --> Freshness{索引新鮮嗎?}
    Freshness -->|否 / 未知 / 編輯後| Sync[index_repository 模式: 'fast' 或 'moderate']
    Freshness -->|是| Strategy{查詢類型}
    Sync --> Strategy

    Strategy -->|符號 / 函式 / 介面| SearchGraph[search_graph BM25 或 semantic_query]
    Strategy -->|呼叫者 / 被呼叫者 / 依賴項| TracePath[trace_path 呼叫者 / 被呼叫者]
    Strategy -->|變更的影響範圍| DetectChanges[detect_changes diff 到影響集合]
    Strategy -->|確切原始碼| GetSnippet[get_code_snippet 精確行數]
    Strategy -->|系統層級與樞紐模組| GetArch[get_architecture 高中心性節點]
    Strategy -->|文字字串 / 非程式碼 / 靜態資源| GrepFallback[search_code 或 run_command grep]
  1. search_graph > 文字 grep:BM25 排名結構化搜尋,支援駝峰式拆分、標籤加權(函式 +10,路由 +8,介面 +5)和向量嵌入。
  2. trace_path > 手動檔案跳躍:即時多跳呼叫者和被呼叫者圖譜解析。
  3. get_code_snippet > 在大型檔案上使用 view_file:使用開始/結束行和呼叫者計數檢索符號的確切宣告和主體,而不會膨脹代理上下文。
  4. detect_changes > 手動 diff 檢查:將 git diff(since: "HEAD~1"、base_branch: "main")直接映射到其傳遞影響範圍。
  5. Grep 備用方案:僅在以下情況使用 search_code 或 run_command(git grep、rg):
    • 在 Markdown(.md)、設定檔(.json)或樣式表(.css)中的文字文字。
    • 在 index_status 中明確標記為 parse_partial 下的行範圍。
    • 透過設計經由 .cbmignore 排除的檔案。

標準操作工作流程

步驟 1:索引同步閘門(強制第一步操作)

在發出搜尋查詢之前,請確定專案名稱並確保圖譜反映最近的檔案系統編輯。

  1. 識別專案名稱: 如果專案識別碼未知,請呼叫 list_projects:

    {
      "ServerName": "codebase-memory",
      "ToolName": "list_projects",
      "Arguments": {}
    }
    

    (在此工作區中,衍生的專案名稱是 "D-Scripts-aminwebsite")。

  2. 檢查狀態或重新整理索引: 如果在工作階段期間建立或修改了檔案,請呼叫 index_repository:

    {
      "ServerName": "codebase-memory",
      "ToolName": "index_repository",
      "Arguments": {
        "repo_path": "d:/Scripts/aminwebsite",
        "mode": "fast"
      }
    }
    
    • 模式選擇:
      • mode: "fast":增量解析、過濾檔案、無語意向量嵌入。適用於進行中開發,快速且輕量。
      • mode: "moderate":增量解析 + 向量相似性嵌入,用於自然語言概念橋接。
    • 涵蓋範圍檢查:檢查回應中的:
      • parse_partial:某些行範圍發生解析錯誤的檔案。
      • skipped:完全跳過的檔案(例如二進位或過大檔案)。

步驟 2:符號與結構發現(search_graph)

尋找函式、介面、型別、元件和路由定義。

{
  "ServerName": "codebase-memory",
  "ToolName": "search_graph",
  "Arguments": {
    "project": "D-Scripts-aminwebsite",
    "query": "LocaleSwitcher"
  }
}
  • 自然語言發現: 使用 query 進行關鍵字 / BM25 搜尋(例如 "theme toggle transition"、"locale routing")。
  • 確切名稱模式: 使用 name_pattern 進行正則表達式過濾(例如 ".*Provider.*"、".*Skeleton.*")。
  • 語意概念搜尋: 使用 semantic_query: ["i18n", "language", "switch"](需要字串陣列)來橋接詞彙落差。
  • 處理截斷(has_more): 如果回應傳回 "has_more": true,請透過新增 "offset": <current_offset + limit> 來進行分頁。

步驟 3:關係追蹤與影響範圍

在未檢查其依賴項目之前,絕不修改函式或介面。

  1. 追蹤呼叫者與被呼叫者(trace_path):

    {
      "ServerName": "codebase-memory",
      "ToolName": "trace_path",
      "Arguments": {
        "project": "D-Scripts-aminwebsite",
        "function_name": "D-Scripts-aminwebsite.app.components.LocaleSwitcher.handleSelectLocale",
        "direction": "both",
        "depth": 3
      }
    }
    
    • direction: "inbound":識別所有依賴此函式的呼叫者(影響範圍)。
    • direction: "outbound":識別由此符號呼叫的下游函式。
    • direction: "both":完整的雙向呼叫鏈。
  2. 映射 Git Diff 影響集合(detect_changes): 在提交或完成變更之前,評估影響範圍:

    {
      "ServerName": "codebase-memory",
      "ToolName": "detect_changes",
      "Arguments": {
        "project": "D-Scripts-aminwebsite",
        "base_branch": "main",
        "scope": "impact"
      }
    }
    

步驟 4:精準程式碼檢索(get_code_snippet)

與其透過 view_file 檢視整個檔案來消耗上下文,不如檢索確切的符號實作:

{
  "ServerName": "codebase-memory",
  "ToolName": "get_code_snippet",
  "Arguments": {
    "project": "D-Scripts-aminwebsite",
    "qualified_name": "D-Scripts-aminwebsite.app.components.LocaleSwitcher.LocaleSwitcher"
  }
}

回應包括:

  • 確切的 start_line 和 end_line
  • 符號的乾淨原始碼
  • 直接呼叫者和被呼叫者計數

步驟 5:高階架構探索(get_architecture)

在熟悉新的子系統或了解系統拓撲時:

{
  "ServerName": "codebase-memory",
  "ToolName": "get_architecture",
  "Arguments": {
    "project": "D-Scripts-aminwebsite",
    "aspects": ["layers", "hub_nodes"]
  }
}

識別頂層架構樞紐元件、中央依賴項和層級階層。


MCP 便捷工具參考矩陣

能力工具名稱必要參數關鍵可選參數
驗證狀態index_statusproject無
觸發索引index_repositoryrepo_pathmode("fast"、"moderate"、"full")、persistence
列出專案list_projects無無
搜尋符號search_graphprojectquery、name_pattern、semantic_query、limit、offset
追蹤呼叫鏈trace_pathproject、function_namedirection("inbound"、"outbound"、"both")、depth、mode
檢索原始碼get_code_snippetproject、qualified_nameinclude_neighbors
影響範圍detect_changesprojectbase_branch、since、scope("impact"、"files")、depth
架構get_architectureprojectaspects(["hub_nodes"]、["layers"]、["all"])
文字搜尋search_codeproject、queryfile_pattern、case_sensitive、limit

護欄與常見反模式

反模式正確操作標準
未檢查索引新鮮度就進行搜尋由於背景自動監控已停用,請始終先呼叫 index_repository(mode: "fast") 或透過 index_status 驗證。
使用 grep 尋找函式定義呼叫 search_graph 並傳入符號名稱;它會傳回完整名稱、確切檔案路徑、行範圍和呼叫者計數。
讀取 1000 行檔案只為了看 1 個函式使用符號的 qualified_name 呼叫 get_code_snippet。
手動讀取每個檔案以尋找呼叫者使用 direction: "inbound" 呼叫 trace_path。
假設圖譜 100% 完整圖譜是盡力而為。如果 index_status 在 parse_partial 下列出檔案,請對那些特定標記的行範圍使用文字 grep。
啟用 auto_watch絕不啟用 auto_watch;保持其為 false 以維持尖峰互動式開發效能。

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

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

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

相關技能