Communitygithub.com

BIGboss248/nextjs-wordpress

始终活跃的代码智能、搜索和导航技能,利用 codebase-memory MCP 服务器。强制执行索引优先协议(在搜索前验证并通过 index_repository 或 index_status 刷新知识图谱,因为后台 auto_watch 已禁用以防止编辑器卡顿和系统延迟),然后进行图谱优先探索(search_graph、trace_path、get_code_snippet、query_graph、get_architecture、detect_changes),而不是使用朴素的文本 grep 或全文文件读取。在搜索代码库、检查未知架构、查找符号或追踪调用者/被调用者之前始终激活。

nextjs-wordpress 是什么?

该技能为 AI 编码代理定义了一套严格的操作协议,用于与**codebase-memory MCP 知识图谱**进行交互,以实现代码库探索、搜索和理解。其核心机制是**索引优先协议**:由于后台自动监视(auto_watch)已永久禁用,以避免编辑器卡顿,代理在执行任何搜索查询之前,必须首先通过 `index_repository` 或 `index_status` 验证或刷新索引。在此之后,代理必须采用**图谱优先**的探索策略,使用 BM25 结构搜索(`search_graph`)、多跳调用链追踪(`trace_path`)、精确符号代码片段检索(`get_code_snippet`)和变更影响分析(`detect_changes`)等专用工具,代替低效的文本搜索和文件读取。该技能明确禁止了诸如在不检查索引新鲜度时进行搜索、使用 `grep` 查找函数定义或读取整个文件来理解单个符号等常见反模式。它支持任何可以利用 codebase-memory MCP 服务器的编码环境,例如 Claude Code、Cursor 或 Codex。

兼容平台~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 知识图谱 探索、搜索和理解代码的工程标准、操作流程和工具使用契约。


核心不变项:索引优先协议

[!重要] 索引优先不变项: 后台监视重新索引在此工作区已永久禁用(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 callers / callees]
    Strategy -->|变更影响范围| DetectChanges[detect_changes diff to impact set]
    Strategy -->|精确源码| GetSnippet[get_code_snippet precise lines]
    Strategy -->|系统层与中心模块| GetArch[get_architecture high centrality nodes]
    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...

相关技能