Communitygithub.com

コードベースメモリ & グラフインテリジェンス (codebase-memory)

codebase-memory MCPサーバーを活用した常時アクティブなコードインテリジェンス、検索、ナビゲーションスキルです。インデックスファーストプロトコル(バックグラウンドの自動監視を無効化する代わりに、検索前に知識グラフを検証・更新)に従い、グラフファーストな探索(search_graph、trace_path、get_code_snippet等)を実行することで、依存関係や影響範囲を正確かつ効率的に把握できます。

コードベースメモリ & グラフインテリジェンス (codebase-memory) とは?

このスキルは、`codebase-memory` MCPサーバーのナレッジグラフを用いてコードベースの探索、検索、理解を行います。バックグラウンドの自動監視(auto_watch)が無効化されているため、検索前に必ず`index_repository`または`index_status`でインデックスの鮮度を確認・更新する「インデックスファーストプロトコル」を強制します。検索時は、単純なテキストgrepやファイル全体の読み取りではなく、`search_graph`(BM25またはセマンティック検索)、`trace_path`(呼び出し元・呼び出し先のトレース)、`get_code_snippet`(関数の正確なソース取得)、`detect_changes`(git diffの影響範囲マッピング)といったグラフベースのツールを優先します。これにより、コンテキストウィンドウの消費を抑えながら、依存関係や影響範囲を正確かつ効率的に把握できます。このスキルは、開発エディタのスタッターやシステムのラグを排除し、ピークインタラクティブな開発パフォーマンスを維持するために設計されています。Claude Code、Cursor、Codexなどのcodebase-memory MCPサーバーをサポートするAIエージェントで利用できます。

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

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

コードベースメモリ & グラフインテリジェンス (codebase-memory) は何をしますか?

このスキルは、codebase-memory MCPナレッジグラフを使用してコードの探索、検索、理解を行うためのエンジニアリング標準、運用手順、ツール使用契約を定義します。


コア不変条件: インデックスファーストプロトコル

[!CRITICAL] インデックスファースト不変条件: このワークスペースでは、アクティブなファイル編集中のディスクスラッシング、zstdシリアライゼーションのオーバーヘッド、システムスタッターを防ぐために、バックグラウンド監視による再インデックスは恒久的に無効化されています(auto_watch = false)。

したがって、エージェントはコードナレッジグラフに対する検索を実行する前に、必ずインデックスの鮮度を確認するか、オンデマンド再インデックス(index_repository)をトリガーしなければなりません。

シンボルの検索、モジュールの理解、バグの調査、リファクタリングの準備を任された場合は常に、検索呼び出しを行う前にインデックスファーストゲートを実行してください。


ツール階層: グラフファースト、グレップセカンド

コードの発見、ナビゲーション、レビューを行う際は、以下の優先順位階層に厳密に従ってください:

flowchart TD
    Task[コード発見 / 調査タスク] --> Freshness{インデックスは新鮮か?}
    Freshness -->|いいえ / 不明 / 編集後| Sync[index_repository mode: '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 正確な行]
    Strategy -->|システムレイヤーとハブモジュール| GetArch[get_architecture 高中心性ノード]
    Strategy -->|リテラル文字列 / 非コード / アセット| GrepFallback[search_code または run_command grep]
  1. search_graph > テキストgrep: camelCase分割、ラベルブースト(関数+10、ルート+8、インターフェース+5)、ベクトル埋め込みによるBM25ランク構造検索。
  2. trace_path > 手動ファイルホッピング: 呼び出し元と呼び出し先のグラフを瞬時にマルチホップ解決。
  3. get_code_snippet > 大規模ファイルでのview_file: エージェントコンテキストを肥大化させることなく、シンボルの正確な宣言と本文を開始行/終了行と呼び出し元カウントとともに取得。
  4. detect_changes > 手動差分検査: git diff(since: "HEAD~1"、base_branch: "main")をその推移的な影響範囲に直接マッピング。
  5. grepフォールバック: 以下の場合にのみ search_code または run_command(git grep、rg)を使用:
    • マークダウン(.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"
  }
}
  • 自然言語発見: キーワード/BM25検索には query を使用(例: "theme toggle transition"、"locale routing")。
  • 正確な名前パターン: 正規表現フィルタリングには name_pattern を使用(例: ".*Provider.*"、".*Skeleton.*")。
  • セマンティック概念検索: 語彙のギャップを埋めるには semantic_query: ["i18n", "language", "switch"](文字列の配列が必要)を使用。
  • 切り捨て処理 (has_more): レスポンスが "has_more": true を返した場合は、"offset": <現在のオフセット + 制限> を追加してページネーションします。

ステップ 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差分影響セットをマッピング (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_statusprojectN/A
インデックス起動index_repositoryrepo_pathmode ("fast", "moderate", "full"), persistence
プロジェクト一覧list_projectsなしN/A
シンボル検索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 を呼び出す。修飾名、正確なファイルパス、行範囲、呼び出し元カウントが返される。
1つの関数を見るためにファイルの1000行を読むシンボルの 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...

関連スキル