firestore-costs-quotas
Skill2 starsChanged 5 months agoMITView on GitHub
Use for Firestore data modeling, query design, listener usage, pagination, indexes, quotas and cost-aware architecture reviews.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- super-android-kotlin-firebaseSkill
- accessibilitySkill
- agp9-kotlin-migrationSkill
- android-architectureSkill
- android-coreSkill
- android-navigation-3Skill
- code-review-refactorSkill
- compose-contextual-design-systemSkill
- compose-performanceSkill
- context-aware-ui-designSkill
- debuggingSkill
- dependency-injectionSkill
- dependency-upgrade-safetySkill
- design-test-gateSkill
- edge-to-edge-adaptive-uiSkill
- firebase-ai-logicSkill
- firebase-authSkill
- firebase-cloud-functionsSkill
- firebase-coreSkill
- firebase-crashlytics-analyticsSkill
- firebase-emulator-ciSkill
- firebase-messagingSkill
- firestoreSkill
- gradle-buildSkill
- jetpack-composeSkill
- kotlin-coreSkill
- macrobenchmark-baseline-profilesSkill
- networking-retrofit-ktorSkill
- play-store-releaseSkill
- r8-proguard-optimizationSkill
- room-datastoreSkill
- screen-ux-auditSkill
- security-privacySkill
- testingSkill
- ui-state-designSkill
- workmanager-background-syncSkill
- xml-to-compose-migrationSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Start from user journeys and query requirements.
- Distinctive: line 35
Do not store images or base64 blobs in Firestore.
- Distinctive: line 36
Do not read full collections when pagination works.
- Distinctive: line 37
Do not attach broad global listeners by default.
- Distinctive: line 38
Avoid huge arrays for complex relationships.
- Distinctive: line 52
Do not assume these companion skills are installed.
- Distinctive: line 89
Use $super-android-kotlin-firebase to review this Firestore model for cost risks.
- Distinctive: line 90
Use $super-android-kotlin-firebase to design paginated Firestore queries.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Design Firestore access patterns that are secure, queryable and cost-aware before the app scales.
When to use
- Designing collections and documents.
- Optimizing Firestore queries or listeners.
- Estimating Firestore cost risk.
- Reviewing indexes, pagination or real-time updates.
Inputs to inspect
- Data model diagrams or repository code
- Collections, documents and subcollections
- Queries, listeners and pagination
- Indexes and Security Rules
- Offline persistence and sync behavior
Required workflow
- Start from user journeys and query requirements.
- Model documents around reads and authorization boundaries.
- Estimate read/write/listener behavior.
- Design pagination and indexes from real queries.
- Name cost, quota and security risks.
Rules
- Do not store images or base64 blobs in Firestore.
- Do not read full collections when pagination works.
- Do not attach broad global listeners by default.
- Avoid huge arrays for complex relationships.
- Design rules and indexes with the data model.
Related existing skills
Local skills to invoke
- firestore
- firebase-core
- android-architecture
- workmanager-background-sync
External companion skills to use when installed
Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.
- firebase/agent-skills — use for deeper Firebase product, Firestore, Security Rules or emulator workflow guidance when installed.
Files commonly touched
- Repository Firestore code
firestore.rulesfirestore.indexes.json- DTO/domain models
- Sync managers
- Pagination UI state
Commands to validate
./gradlew test
firebase emulators:exec --only firestore "npm test"Common mistakes to avoid
- Counting writes but ignoring listener re-reads.
- Using document IDs that leak sensitive relationships.
- Designing indexes after shipping slow queries.
- Ignoring offline cache invalidation.
Checklist
- Queries listed.
- Indexes considered.
- Pagination planned.
- Listener scope bounded.
- Cost and quota risks documented.
Example prompts
- Use $super-android-kotlin-firebase to review this Firestore model for cost risks.
- Use $super-android-kotlin-firebase to design paginated Firestore queries.
Expected response style
Respond with: brief diagnosis, change plan, affected files, code or diff summary, validation commands, tests added or recommended, risks, and next step. For review tasks, lead with findings ordered by severity.
References
- ../../docs/audits/FUENTES_LOCALES.md
- references/firestore-cost-model.md
- references/query-and-index-design.md
- references/listeners-and-pagination.md
- references/anti-patterns.md
- templates/firestore-data-model-review-template.md
- templates/pagination-query-template.md
- templates/cost-risk-report-template.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

