agentleFS
GDvegaGDvega/super-android-kotlin-firebase-skill/skills/firestore/SKILL.md

firestore

Skill2 starsChanged 5 months agoMITView on GitHub

Use for Firestore and Realtime Database data modeling, collections/documents/paths, queries, indexes, transactions, batch writes, offline persistence, Security Rules and cost-aware access patterns.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    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
  1. Distinctive:

    Add repository code and emulator allow/deny tests.

    line 31
  2. Distinctive:

    Do not trust client-provided owner fields alone.

    line 36
  3. Distinctive:

    Use transactions for invariants.

    line 38
  4. Distinctive:

    Do not assume these companion skills are installed.

    line 53
  5. Distinctive:

    Use $super-android-kotlin-firebase to design Firestore for patients and caregivers.

    line 92
  6. Distinctive:

    Use $super-android-kotlin-firebase to audit these Firestore rules.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Design Firebase databases around access patterns, rules, sync and cost.

When to use

  • Modeling Firestore collections or Realtime Database paths.
  • Adding queries, listeners, transactions or batch writes.
  • Writing or auditing Security Rules.
  • Designing caregiver/patient, team, role or ownership access.

Inputs to inspect

  • Entities and access patterns.
  • Readers, writers and roles.
  • Queries, indexes and listener frequency.
  • Current firestore.rules/database.rules.json.
  • Expected data volume and offline needs.

Required workflow

  1. List access patterns before schema.
  2. Choose paths/collections and denormalization intentionally.
  3. Design rules with schema and roles.
  4. Identify indexes and cost-sensitive listeners.
  5. Add repository code and emulator allow/deny tests.

Rules

  • Rules are part of the feature, not an afterthought.
  • Do not trust client-provided owner fields alone.
  • Validate required fields, types and immutable fields.
  • Use transactions for invariants.
  • Mention cost risks for broad listeners.

Related existing skills

Local skills to invoke

  • firebase-core
  • firestore-costs-quotas
  • security-privacy
  • firebase-emulator-ci
  • testing

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

  • firestore.rules
  • database.rules.json
  • indexes config
  • repository/data source files
  • Firebase emulator tests

Commands to validate

firebase emulators:start
firebase emulators:exec "npm test"
./gradlew test
./gradlew assembleDebug

Common mistakes to avoid

  • Open rules.
  • Queries that rules cannot authorize.
  • Missing indexes.
  • Unbounded realtime listeners.
  • Denormalization without write strategy.

Checklist

  • Access patterns documented.
  • Rules least-privilege.
  • Indexes considered.
  • Offline behavior defined.
  • Cost risks mentioned.

Example prompts

  • Use $super-android-kotlin-firebase to design Firestore for patients and caregivers.
  • Use $super-android-kotlin-firebase to audit these Firestore rules.

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-data-modeling.md
  • references/security-rules-patterns.md
  • templates/firestore-rules-template.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.