[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75NDH2R6VF2JMP2VSHSTWSM":3,"skill-same:01M75NDH2R6VF2JMP2VSHSTWSM":50},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M75NDH2R6VF2JMP2VSHSTWSM","firebase-firestore-data-modeling",null,"Model Firestore data for the queries you actually run, not for normalization","linktogo\u002Fmaggie","linktogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F29751338?v=4","01M75NBAKP44KV5ND0WEE3H87P","Fabien Brunet","01M75NBAMC2TEQQ8FMTBA23MET",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Ffirebase\u002Ffirestore-data-modeling\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: firebase-firestore-data-modeling\ndescription: Model Firestore data for the queries you actually run, not for normalization\nglobs: [\"**\u002F*.ts\", \"**\u002F*.js\", \"firestore.indexes.json\"]\n---\n\n# Firestore data modeling\n\nFirestore is a NoSQL document store. Model around the reads your app performs;\ndenormalize on purpose rather than mirroring a relational schema.\n\n## Rules\n\n- Design collections from your query patterns first. There are no joins — if you\n  need data together, store it together (embed) or duplicate the few fields you\n  render in lists.\n- Keep documents small and bounded. Use subcollections for unbounded growth\n  (a `messages` subcollection under a `chat`) instead of a growing array field.\n- Every query must be backed by an index. Composite queries need a composite\n  index declared in `firestore.indexes.json` — add it rather than relying on the\n  console's auto-suggest link in production.\n- Denormalized copies drift: update all copies in a single batched write or a\n  transaction, and keep the write path that maintains them in one place.\n- Avoid document-level write hotspots (a single counter hammered by everyone);\n  use distributed counters (sharded) or increment on the server.\n- Paginate with cursors (`startAfter(lastDoc)`), never large `offset`s — Firestore\n  bills and scans every skipped document.\n\n## Anti-patterns\n\n- A relational schema with \"foreign key\" ids you then N+1 fetch client-side.\n- Unbounded arrays inside a document (they must be read\u002Fwritten whole and hit the\n  1 MiB document limit).\n- Reading a whole collection to count it — keep a maintained counter instead.\n","# Firestore data modeling\n\nFirestore is a NoSQL document store. Model around the reads your app performs;\ndenormalize on purpose rather than mirroring a relational schema.\n\n## Rules\n\n- Design collections from your query patterns first. There are no joins — if you\n  need data together, store it together (embed) or duplicate the few fields you\n  render in lists.\n- Keep documents small and bounded. Use subcollections for unbounded growth\n  (a `messages` subcollection under a `chat`) instead of a growing array field.\n- Every query must be backed by an index. Composite queries need a composite\n  index declared in `firestore.indexes.json` — add it rather than relying on the\n  console's auto-suggest link in production.\n- Denormalized copies drift: update all copies in a single batched write or a\n  transaction, and keep the write path that maintains them in one place.\n- Avoid document-level write hotspots (a single counter hammered by everyone);\n  use distributed counters (sharded) or increment on the server.\n- Paginate with cursors (`startAfter(lastDoc)`), never large `offset`s — Firestore\n  bills and scans every skipped document.\n\n## Anti-patterns\n\n- A relational schema with \"foreign key\" ids you then N+1 fetch client-side.\n- Unbounded arrays inside a document (they must be read\u002Fwritten whole and hit the\n  1 MiB document limit).\n- Reading a whole collection to count it — keep a maintained counter instead.\n",{"name":5,"globs":24,"description":7},[25,26,27],"**\u002F*.ts","**\u002F*.js","firestore.indexes.json","main","d884e3c730aa8243273458fa6d7de64bfd3b8bba","skills\u002Ffirebase\u002Ffirestore-data-modeling","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie","https:\u002F\u002Fgithub.com\u002Flinktogo","http:\u002F\u002Ffabien-brunet.fr\u002F","Software Architect @Capgemini","2026-11-14 21:45:09",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add linktogo\u002Fmaggie --skill firebase-firestore-data-modeling",{"tool":42,"command":43},"bunx","bunx skills add linktogo\u002Fmaggie --skill firebase-firestore-data-modeling",{"tool":45,"command":46},"pnpm","pnpm dlx skills add linktogo\u002Fmaggie --skill firebase-firestore-data-modeling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Ffirebase\u002Ffirestore-data-modeling\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M75NEGXZPJFCHAE5P31CQX94","vuejs-state-management","Manage Vue application state with Pinia and the right state locality","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs\u002Fstate-management\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M75NEEHT92D2SPZFEWBMSVX9","vuejs-composition-api","Write Vue 3 components with the Composition API, script setup, and composables","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs\u002Fcomposition-api\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M75NEBQJKWVJG8CYZQQB4BFQ","reactjs-hooks","Use React hooks correctly — dependencies, effects, and custom hooks","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Freactjs\u002Fhooks\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M75NE9V7AYPA9QF9H21TKC08","reactjs-component-design","Write small, composable React components with clean props and no needless state","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Freactjs\u002Fcomponent-design\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M75NE64WGJTNTKW3RYVC7394","postgres-query-performance","Diagnose and fix slow PostgreSQL queries with indexes and EXPLAIN","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fpostgres\u002Fquery-performance\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M75NE3KGES659BWDAZDM6YQ5","postgres-migrations","Write safe, reversible, zero-downtime PostgreSQL schema migrations","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fpostgres\u002Fmigrations\u002FSKILL.md",[],[]]