[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EB87Z7VT8HXY650JW5937Z":3,"skill-same:01M6EB87Z7VT8HXY650JW5937Z":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6EB87Z7VT8HXY650JW5937Z","database-mongodb",null,"Expert rules for schema design, indexing, and performance in MongoDB. Use when designing MongoDB schemas, creating indexes, or optimizing NoSQL query performance. (triggers: **\u002F*.ts, **\u002F*.js, **\u002F*.json, mongo, mongoose, objectid, schema, model)","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FHoangNguyen0403\u002Fagent-skills-standard\u002Fdatabase-mongodb\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"database mongodb","database","mongodb","use","triggers","indexing","query","expert","indexes","schema design","schema","design","Rules","model","json","js","nosql","performance","2026-11-10 10:12:30",false,"---\nname: database-mongodb\ndescription: \"Expert rules for schema design, indexing, and performance in MongoDB. Use when designing MongoDB schemas, creating indexes, or optimizing NoSQL query performance. (triggers: **\u002F*.ts, **\u002F*.js, **\u002F*.json, mongo, mongoose, objectid, schema, model)\"\n---\n\n# MongoDB Best Practices\n\n## **Priority: P0 (CRITICAL)**\n\n## Guidelines\n\n- **Schema Design**:\n  - **Embed vs Reference**:\n    - **Embed** (1:Few): Addresses, Phone Numbers. Optimization: Read locality.\n    - **Reference** (1:Many\u002FInfinity): Logs, Activity History. Optimization: Document size limits (16MB).\n  - **Bucket Pattern**: For time-series or high-cardinality \"One-to-Many\", bucket items into documents (e.g., `DailyLog`).\n- **Indexing**:\n  - **ESR Rule**: Equality, Sort, Range. Order your index keys `(status, date, price)` if you query `status='A'`, sort by `date`, filter `price > 10`.\n  - **Text Search**: Use `$text` search instead of `$regex` for keywords. `$regex` is slow (linear scan) unless anchored (`^prefix`).\n  - **Covered Queries**: Project only indexed fields to avoid fetching the document (`PROJECTION` is key).\n  - **Explain Plan**: Target `nReturned` \u002F `keysExamined` ratio of ~1. If `docsExamined` >> `nReturned`, index is inefficient.\n\n- **Sharding (Horizontal Scale)**:\n  - **Shard Key**: Avoid monotonically increasing keys (e.g., `Timestamp`, `ObjectId`) for high-write workloads (creates \"Hot Shards\"). Use Hashed Sharding or high-cardinality natural keys.\n- **Performance**:\n  - **Avoid `skip()`**: Use `_id` or sort-key based pagination (`bucket_id > last_id`). `skip(10000)` scans 10000 docs.\n  - **Aggregation**: Prefer Aggregation Framework (`$match`, `$group`) over bringing data to client (JS).\n- **Operations**:\n  - **Write Concern**: Understand `w:1` (Ack) vs `w:majority` (Safe).\n  - **Transactions**: Use only when ACID across multiple documents is stricter than performance needs.\n\n## Anti-Patterns\n\n- **No unbounded arrays**: Use `$push` with `$slice` or redesign using the Bucket Pattern.\n- **No client-side filtering**: Project only needed fields; never fetch full docs to filter in memory.\n- **No deep nesting**: Keep nesting ≤4 levels; flatten paths that are frequently queried.\n\n## References\n\n- [Best Practices Guide](references\u002Fbest-practices.md)\n- [Anti-Patterns](references\u002Fanti-patterns.md)\n- [Postgres vs Mongo Comparison](references\u002Fpostgres-comparison.md)\n\n","# MongoDB Best Practices\n\n## **Priority: P0 (CRITICAL)**\n\n## Guidelines\n\n- **Schema Design**:\n  - **Embed vs Reference**:\n    - **Embed** (1:Few): Addresses, Phone Numbers. Optimization: Read locality.\n    - **Reference** (1:Many\u002FInfinity): Logs, Activity History. Optimization: Document size limits (16MB).\n  - **Bucket Pattern**: For time-series or high-cardinality \"One-to-Many\", bucket items into documents (e.g., `DailyLog`).\n- **Indexing**:\n  - **ESR Rule**: Equality, Sort, Range. Order your index keys `(status, date, price)` if you query `status='A'`, sort by `date`, filter `price > 10`.\n  - **Text Search**: Use `$text` search instead of `$regex` for keywords. `$regex` is slow (linear scan) unless anchored (`^prefix`).\n  - **Covered Queries**: Project only indexed fields to avoid fetching the document (`PROJECTION` is key).\n  - **Explain Plan**: Target `nReturned` \u002F `keysExamined` ratio of ~1. If `docsExamined` >> `nReturned`, index is inefficient.\n\n- **Sharding (Horizontal Scale)**:\n  - **Shard Key**: Avoid monotonically increasing keys (e.g., `Timestamp`, `ObjectId`) for high-write workloads (creates \"Hot Shards\"). Use Hashed Sharding or high-cardinality natural keys.\n- **Performance**:\n  - **Avoid `skip()`**: Use `_id` or sort-key based pagination (`bucket_id > last_id`). `skip(10000)` scans 10000 docs.\n  - **Aggregation**: Prefer Aggregation Framework (`$match`, `$group`) over bringing data to client (JS).\n- **Operations**:\n  - **Write Concern**: Understand `w:1` (Ack) vs `w:majority` (Safe).\n  - **Transactions**: Use only when ACID across multiple documents is stricter than performance needs.\n\n## Anti-Patterns\n\n- **No unbounded arrays**: Use `$push` with `$slice` or redesign using the Bucket Pattern.\n- **No client-side filtering**: Project only needed fields; never fetch full docs to filter in memory.\n- **No deep nesting**: Keep nesting ≤4 levels; flatten paths that are frequently queried.\n\n## References\n\n- [Best Practices Guide](references\u002Fbest-practices.md)\n- [Anti-Patterns](references\u002Fanti-patterns.md)\n- [Postgres vs Mongo Comparison](references\u002Fpostgres-comparison.md)\n\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FHoangNguyen0403\u002Fagent-skills-standard\u002Fdatabase-mongodb",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill database-mongodb",{"tool":62,"command":63},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill database-mongodb",{"tool":65,"command":66},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill database-mongodb","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FHoangNguyen0403\u002Fagent-skills-standard\u002Fdatabase-mongodb\u002FSKILL.md",true,[70,76,80,84],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fevals.json","REFERENCE","参考文档",12825,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fgolang-uber-fx\u002Fevals\u002Fevals.json",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fadvanced.md",5011,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fgolang-uber-fx\u002Freferences\u002Fadvanced.md",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Frecipes.md",8118,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fgolang-uber-fx\u002Freferences\u002Frecipes.md",{"path":85,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Ftesting.md",4240,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fgolang-uber-fx\u002Freferences\u002Ftesting.md",[89,100,110,119,125,132],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":97,"publishedAt":42},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[94],{"categoryNo":95,"categoryName":96,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[37,98,99],"model hierarchy","model hierarchy skill",{"skillNo":101,"name":102,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":106,"publishedAt":42},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[105],{"categoryNo":95,"categoryName":96,"taxonomyType":21,"taxonomyTypeDesc":22},[107,108,109],"MCP","zoom","zoom mcp",{"skillNo":111,"name":112,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":42},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[116,117,118,108],"sdk","zoom apps sdk","apps",{"skillNo":120,"name":121,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":42},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[121],{"skillNo":126,"name":127,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":131,"publishedAt":42},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[130],{"categoryNo":95,"categoryName":96,"taxonomyType":21,"taxonomyTypeDesc":22},[127],{"skillNo":133,"name":134,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":42},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[134]]