Communitygithub.com

mongodb/mongodb-schema-design

MongoDB のスキーマデザインパターンとアンチパターン。データモデルの設計、スキーマのレビュー、SQLからの移行、スキーマ問題によるパフォーマンストラブルの解決に使用します。

mongodb-schema-design とは?

このスキルは、MongoDB のデータモデリングとスキーマ設計に関するベストプラクティスを提供します。具体的な設計パターン(埋め込み vs 参照、ツリー構造、時系列データなど)やアンチパターン(無制限配列、16MB制限超過、不要なインデックスなど)をカバーします。SQL からの移行時にリレーショナルモデルをドキュメントモデルに変換する方法、JSON Schema によるスキーマ検証、TTL やポリモーフィックパターンによるデータライフサイクル管理についても説明します。このスキルは、Claude Code、Cursor、Codex など主要な AI エージェントプラットフォームで動作し、スキーマレビューやパフォーマンスチューニングの際に、具体的なコード例と設計判断基準を提示します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mongodb/agent-skills/tree/main/skills/mongodb-schema-design

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

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

ドキュメント

mongodb-schema-design は何をしますか?

MongoDB のスキーマデザインパターンとアンチパターン。データモデルの設計、スキーマのレビュー、SQLからの移行、スキーマ問題によるパフォーマンストラブルの解決に使用します。以下のキーワードで起動します: 「スキーマ設計」、「埋め込み vs 参照」、「MongoDB データモデル」、「スキーマレビュー」、「無制限配列」、「1対多」、「ツリー構造」、「16MB制限」、「スキーマバリデーション」、「JSON Schema」、「時系列データ」、「スキーママイグレーション」、「ポリモーフィック」、「TTL」、「データライフサイクル」、「アーカイブ」、「インデックス爆発」、「不要なインデックス」、「近似パターン」、「ドキュメントバージョニング」。

Individual skills in this repo

This repo contains 5 individual skills — each has its own dedicated page.

mongodb/mongodb-connection

Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling `connect()`), configuring connection pools, troubleshooting connection errors (ECONNREFUSED, timeouts, pool exhaustion), optimizing performance issues related to connections. This includes scenarios like building serverless functions with MongoDB, creating API endpoints that use MongoDB, optimizing high-traffic MongoDB applications, creating long-running tasks and concurrency, or debugging connection-related failures.

mongodb/mongodb-mcp-setup

Guide users through configuring key MongoDB MCP server options. Use this skill when a user has the MongoDB MCP server installed but hasn't configured the required environment variables, or when they ask about connecting to MongoDB/Atlas and don't have the credentials set up.

mongodb/mongodb-natural-language-querying

Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with query syntax, or discusses finding/filtering/grouping MongoDB documents. Also use for translating SQL-like requests to MongoDB syntax. Does NOT handle Atlas Search ($search operator), vector/semantic search ($vectorSearch operator), fuzzy matching, autocomplete indexes, or relevance scoring - use search-and-ai for those. Does NOT analyze or optimize existing queries - use mongodb-query-optimizer for that. Does NOT handle aggregation pipelines that involve write operations. Requires MongoDB MCP server.

mongodb/mongodb-query-optimizer

Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I index this?", "Why is this query slow?", "Can you fix my slow queries?", "What are the slow queries on my cluster?", etc. Do not invoke for general MongoDB query writing unless user asks for performance or index help. Prefer indexing as optimization strategy. Use MongoDB MCP when available.

mongodb/mongodb-search-and-ai

Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions. Use this skill when users need to build search functionality for text-based queries (autocomplete, fuzzy matching, faceted search), semantic similarity (embeddings, RAG applications), or combined approaches. Also use when users need text containment, substring matching ('contains', 'includes', 'appears in'), case-insensitive or multi-field text search, or filtering across many fields with variable combinations. Provides workflows for selecting the right search type, creating indexes, constructing queries, and optimizing performance using the MongoDB MCP server.

関連スキル