firestorelisted
Install: claude install-skill Timonwa/engineering-skills
# Firestore
The API is the only thing that reads or writes Firestore, through the Admin SDK in its data layer. Clients are denied everything, so the security rules are a second wall rather than the gate, and every rule about the data — shape, ownership, atomicity — lives in code that can be read, tested and reviewed.
## Project specifics first
Before applying this skill, read the project's root `AGENTS.md`, the `AGENTS.md` closest to the files in question, and any doc they link for this skill's topic. Names, values and choices — budgets, tiers, tokens, voice, paths — come from those files, never from this skill.
- A rule here that the project records a deviation from, with its reason, gives way to the project's version there.
- A rule here that the project contradicts without a recorded reason: ask before following either. An audit reports it as a finding instead.
## The access boundary
- **Clients are denied every read and write.** The web config ships to every browser, so only the rules stop a client from querying the database directly; with every path through the API, they deny everything.
- **A feature that must read from the client** — a live listener, an offline cache — opens exactly that path in the rules, read-only, with the same ownership and membership checks the API's guard makes (`access-control`), and unsubscribes its listener on unmount.
- **Only the data layer calls Firestore.** Services call data functions; routes, actions and components never see a `col