skills/firestore_patterns/SKILL.md
--- name: firestore_patterns router_kit: FullStackKit description: Firebase Firestore NoSQL patterns, real-time sync ve security rules rehberi. metadata: skillport: category: database tags: [architecture, automation, best practices, clean code, coding, collaboration, compliance, debugging, design patterns, development, documentation, efficiency, firestore patterns, git, optimization, productivity, programming, project management, quality assurance, refactoring, software engineering, st
npx skillsauth add vuralserhat86/antigravity-agentic-skills skills/firestore_patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Firebase Firestore NoSQL patterns rehberi.
import {
collection, doc, getDoc, setDoc,
addDoc, updateDoc, deleteDoc, query, where
} from 'firebase/firestore';
// Read
const docRef = doc(db, 'users', 'userId');
const docSnap = await getDoc(docRef);
// Create
await setDoc(doc(db, 'users', 'userId'), { name: 'John' });
await addDoc(collection(db, 'users'), { name: 'John' }); // Auto ID
// Update
await updateDoc(doc(db, 'users', 'userId'), { name: 'Jane' });
// Delete
await deleteDoc(doc(db, 'users', 'userId'));
import { onSnapshot } from 'firebase/firestore';
const unsubscribe = onSnapshot(
doc(db, 'users', 'userId'),
(doc) => {
console.log('Data:', doc.data());
}
);
// Cleanup
unsubscribe();
const q = query(
collection(db, 'users'),
where('age', '>=', 18),
where('status', '==', 'active'),
orderBy('createdAt', 'desc'),
limit(10)
);
const querySnapshot = await getDocs(q);
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read: if request.auth != null;
allow write: if request.auth.uid == userId;
}
}
}
Firestore Patterns v1.1 - Enhanced
Kaynak: Firebase Security Rules Guide
request.auth != null kontrolünü her kurala ekle.| Aşama | Doğrulama |
|-------|-----------|
| 1 | Bir dökümanı okumak için 100 başka döküman okumak gerekiyor mu? (Kötü) |
| 2 | Herkesin yazabildiği (allow write: if true) bir yer kaldı mı? (Kritik) |
| 3 | Sorgular index hatası veriyor mu? |
tools
Production-tested setup for Zustand state management in React. Includes patterns for persistence, devtools, and TypeScript patterns. Prevents hydration mismatches and render loops.
development
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
development
--- name: websocket_engineer router_kit: FullStackKit description: WebSocket specialist for real-time communication systems. Invoke for Socket.IO, WebSocket servers, bidirectional messaging, presence systems. Keywords: WebSocket, Socket.IO, real-time, pub/sub, Redis. triggers: - WebSocket - Socket.IO - real-time communication - bidirectional messaging - pub/sub - server push - live updates - chat systems - presence tracking role: specialist scope: implementation output-format:
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.