[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6P3G2F3V5JXYYMXG7ZXDXGM":3,"skill-same:01M6P3G2F3V5JXYYMXG7ZXDXGM":46},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":12,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M6P3G2F3V5JXYYMXG7ZXDXGM","flutter-firestore-repository",null,"dexter-cnx\u002Fagent-engineering-toolkit","dexter-cnx","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F73522389?v=4","01M6K09WYAAXJXMR26H00WJ2AT","01M6P370Z0XCZ7NC67MJ2MRW94",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Foverlays\u002Fmobile-flutter\u002Fskills\u002Ffirebase\u002Fflutter-firestore-repository\u002FSKILL.md",[],[17,18,19,20],"repository","flutter","firestore","flutter firestore repository","2026-11-10 10:12:30",false,"# flutter-firestore-repository\n\n## Purpose\n\nBuild a Firestore-backed repository with explicit DTO mapping, query boundaries, and clean domain output.\n\n## Use when\n\n- A feature needs document or collection persistence\n- You need query logic isolated from UI and domain\n- The feature needs mapping between Firestore data and domain entities\n\n## Do NOT use when\n\n- The feature only needs in-memory state\n- There is no Firestore dependency in the project\n- You want to return `Map\u003CString, dynamic>` directly to the presentation layer\n\n## Inputs required\n\n- Collection path\n- Entity shape\n- Query and pagination rules\n- Offline or cache expectations\n\n## Constraints\n\n- Keep Firestore SDK calls in the data layer\n- Map raw documents into typed DTOs before domain use\n- Keep query rules explicit and documented\n- Handle null and missing-field cases deliberately\n\n## Step-by-step workflow\n\n1. Define the repository contract in the domain layer.\n2. Define DTOs and mappers in the data layer.\n3. Implement Firestore queries in the datasource or repository adapter.\n4. Convert raw documents into typed domain entities.\n5. Add tests for mapping and query edge cases.\n6. Document collection paths and indexing assumptions.\n\n## Output contract\n\n- Domain repository contract\n- DTO and mapper files\n- Firestore repository implementation\n- Query or mapping tests\n\n## Validation checklist\n\n- Firestore documents are never exposed raw to UI\n- Missing fields are handled safely\n- Query scope is narrow and documented\n- Mapper tests cover schema drift\n\n## Related skills\n\n- `flutter-firebase-auth-adapter`\n- `flutter-riverpod-state-skeleton`\n- `flutter-clean-architecture-audit`\n\n## References\n\n- [`..\u002F..\u002F..\u002Ftemplates\u002Frepository-template.md`](..\u002F..\u002F..\u002Ftemplates\u002Frepository-template.md)\n- [`..\u002F..\u002F..\u002Fexamples\u002Ffirebase-integration-example.md`](..\u002F..\u002F..\u002Fexamples\u002Ffirebase-integration-example.md)\n\n## Real example\n\n`profiles` collection documents map to a `Profile` entity via `ProfileDto.fromJson` and never leak `DocumentSnapshot` objects into presentation.\n\n## Real file output sample\n\n```text\nlib\u002Ffeatures\u002Fprofile\u002Fdata\u002Fdatasources\u002Fprofile_firestore_data_source.dart\nlib\u002Ffeatures\u002Fprofile\u002Fdata\u002Frepositories\u002Fprofile_repository_impl.dart\nlib\u002Ffeatures\u002Fprofile\u002Fdata\u002Fdtos\u002Fprofile_dto.dart\n```\n",{},"main","3035171e2986d5fdb445e694b9013fbdf58b3ff6","overlays\u002Fmobile-flutter\u002Fskills\u002Ffirebase\u002Fflutter-firestore-repository","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit","https:\u002F\u002Fgithub.com\u002Fdexter-cnx","https:\u002F\u002Fdexter-cnx.github.io\u002Fportfolio\u002F","2026-05-26 14:24:27",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add dexter-cnx\u002Fagent-engineering-toolkit --skill flutter-firestore-repository",{"tool":38,"command":39},"bunx","bunx skills add dexter-cnx\u002Fagent-engineering-toolkit --skill flutter-firestore-repository",{"tool":41,"command":42},"pnpm","pnpm dlx skills add dexter-cnx\u002Fagent-engineering-toolkit --skill flutter-firestore-repository","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Foverlays\u002Fmobile-flutter\u002Fskills\u002Ffirebase\u002Fflutter-firestore-repository\u002FSKILL.md",true,[],[47,73,92,101,113,125],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":21},"01M6P4P9S9017DTSFMRKGA7XW2","toolkit-i18n-operator","Use the toolkit-i18n CLI for repeated Flutter localization workflows with compact outputs, CSV validation, key coverage reporting, generated JSON exports, and safe non-mutating behavior.","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Ftools\u002Ftoolkit-i18n\u002Fskills\u002Ftoolkit-i18n-operator\u002FSKILL.md",[],[54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,18,69,70,71,72],"toolkit i18n operator","i18n","operator","toolkit","flutter localization","cli","safe","workflows","for","validation","with","csv","compact","reporting","json","behavior","coverage","generated","use",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":89,"publishedAt":21},"01M6P4NREKE3P0XYV3RBBWC987","toolkit-design-operator","Use the toolkit-design CLI for repeated repository workflows.","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Ftools\u002Ftoolkit-design\u002Fskills\u002Ftoolkit-design-operator\u002FSKILL.md",[79,84],{"categoryNo":80,"categoryName":81,"taxonomyType":82,"taxonomyTypeDesc":83},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":85,"categoryName":86,"taxonomyType":87,"taxonomyTypeDesc":88},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[90,56,57,91,62,59,61,17,72],"toolkit design operator","design",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":21},"01M6P4NNSQ09QFPYG2PMPWEA94","toolkit-ci-operator","Use the toolkit-ci CLI for repeated repository workflows.","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Ftools\u002Ftoolkit-ci\u002Fskills\u002Ftoolkit-ci-operator\u002FSKILL.md",[],[99,100,56,57,17,59,61,72,62],"toolkit ci operator","ci",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":21},"01M6P4NK636991P6WWQ6X8HDYX","toolkit-arch-operator","Use the toolkit-arch CLI for repeated repository workflows, including Flutter i18n usage scans, layer checks, and localization coverage.","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Ftools\u002Ftoolkit-arch\u002Fskills\u002Ftoolkit-arch-operator\u002FSKILL.md",[],[108,109,57,56,55,110,111,62,72,70,18,112,17,61,59],"toolkit arch operator","arch","usage","layer","localization",{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":121,"publishedAt":21},"01M6P4NF18XGVSG2NR01E1DX0R","web-testing","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Foverlays\u002Fweb-frontend\u002Fskills\u002Fweb-testing\u002Fskill.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":82,"taxonomyTypeDesc":83},"01JBSEEDCAT000000000000008","测试与质量",[122,123,124],"web testing","web","testing",{"skillNo":126,"name":127,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":21},"01M6P4MVK07EJ75FQTFN54AGPM","web-state","https:\u002F\u002Fgithub.com\u002Fdexter-cnx\u002Fagent-engineering-toolkit\u002Fblob\u002Fmain\u002Foverlays\u002Fweb-frontend\u002Fskills\u002Fweb-state\u002Fskill.md",[],[123,131,132],"state","web state"]