Firestore Index Sync Skill
Purpose
Keep FIRESTORE_INDEXES.md and firestore.indexes.json aligned to prevent query errors.
When to Use
- Indexes added or removed
- Query errors indicate missing indexes
- Documentation updates
Inputs
FIRESTORE_INDEXES.md
firestore.indexes.json
Outputs
- Drift report under
.agent/artifacts/{conversation-id}/firestore_index_sync.md
- Minimal patch to align docs and JSON
Prerequisites
- Awareness of active query patterns
Tools & Availability
- Local editor +
rg for diffing
- Optional JSON formatter (manual if unavailable)
Methodology
- Compare index definitions between MD and JSON.
- Identify mismatches (collection, fields, order, query scope).
- Update the minimal source of truth (prefer JSON for actual indexes).
- Sync documentation to match exact definitions.
Verification
Pass/Fail: Pass only if all checks above are satisfied.
Risks & Mitigations
- Updating docs only → ensure JSON is authoritative
- Formatting churn → keep minimal line changes