Claude Code Plugins

Community-maintained marketplace

Feedback

firebase-operations

@jhlee0409/sidedish
0
0

Performs Firebase Firestore operations. Use when querying collections, creating/updating/deleting documents, using batch writes, or working with Timestamps. Includes pagination, transactions, and security rules patterns.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name firebase-operations
description Performs Firebase Firestore operations. Use when querying collections, creating/updating/deleting documents, using batch writes, or working with Timestamps. Includes pagination, transactions, and security rules patterns.

Firebase Operations Skill

Instructions

  1. Import getAdminDb, COLLECTIONS from @/lib/firebase-admin
  2. Use Timestamp.now() for timestamps
  3. Convert to ISO string for API responses: createdAt.toDate().toISOString()
  4. Use batch writes for multiple operations (max 500)
  5. Use transactions for atomic operations

Quick Reference

import { getAdminDb, COLLECTIONS } from '@/lib/firebase-admin'
import { Timestamp, FieldValue } from 'firebase-admin/firestore'

// Get document
const doc = await db.collection(COLLECTIONS.PROJECTS).doc(id).get()

// Create with timestamps
const now = Timestamp.now()
await docRef.set({ ...data, createdAt: now, updatedAt: now })

// Update
await docRef.update({ field: value, updatedAt: Timestamp.now() })

// Increment counter
await docRef.update({ likes: FieldValue.increment(1) })

For complete operations (batch writes, transactions, pagination, queries), see reference.md.