linktogo/maggie/firestore-data-modeling

Claude Code and agent skill by linktogo/maggie

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Model Firestore data for the queries you actually run, not for normalization

Install

npx vskill@latest install linktogo/maggie/firestore-data-modeling

SKILL.md

The same SKILL.md was published earlier as linktogo/maggie/firestore-data-modeling.

Firestore data modeling

Firestore is a NoSQL document store. Model around the reads your app performs; denormalize on purpose rather than mirroring a relational schema.

Rules

  • Design collections from your query patterns first. There are no joins — if you

need data together, store it together (embed) or duplicate the few fields you render in lists.

  • Keep documents small and bounded. Use subcollections for unbounded growth

(a messages subcollection under a chat) instead of a growing array field.

  • Every query must be backed by an index. Composite queries need a composite

index declared in firestore.indexes.json — add it rather than relying on the console's auto-suggest link in production.

  • Denormalized copies drift: update all copies in a single batched write or a

transaction, and keep the write path that maintains them in one place.

  • Avoid document-level write hotspots (a single counter hammered by everyone);

use distributed counters (sharded) or increment on the server.

  • Paginate with cursors (startAfter(lastDoc)), never large offsets — Firestore

bills and scans every skipped document.

Anti-patterns

  • A relational schema with "foreign key" ids you then N+1 fetch client-side.
  • Unbounded arrays inside a document (they must be read/written whole and hit the

1 MiB document limit).

  • Reading a whole collection to count it — keep a maintained counter instead.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/linktogo/maggie/firestore-data-modeling/badge)](https://verified-skill.com/skills/linktogo/maggie/firestore-data-modeling)

Something wrong with this skill or its page? Tell us.