Skip to content
Back to skills

Firebase

ASecurity

Firebase Admin SDK allows privileged server environments to interact with Firestore, Auth, and Cloud Messaging.

  • 13 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
ai-agentsgobashsqlapidatabasesecurity

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add ashish7802/awesome-api-skills --skill firebase --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Firebase?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Firebase
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-firebase/badge)](https://www.skillsdirectory.com/skills/ashish7802-firebase)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Firebase Admin API Skill

## Overview
Firebase Admin SDK allows privileged server environments to interact with Firestore, Auth, and Cloud Messaging.

## Installation
```bash
npm install firebase-admin
pip install firebase-admin
```

## Authentication
Authenticate using a Google Cloud Service Account key JSON file or Application Default Credentials (ADC).

## Core Concepts
- **Firestore**: NoSQL document database.
- **Custom Tokens**: JWTs minted on the server to log users into the client SDK.
- **FCM**: Firebase Cloud Messaging for push notifications.

## Common Workflows
1. Initialize `initializeApp({ credential: cert(serviceAccount) })`.
2. Access Firestore: `getFirestore()`.
3. Perform operations bypassing security rules.

## Error Handling
Catch `FirebaseError`. Error codes match RPC statuses (e.g., `not-found`, `already-exists`).

## Security
Service accounts have absolute God-mode access. Never deploy an Admin SDK service account key to a client application.

## Rate Limits
Firestore allows 10,000 writes per second per database. Batch operations are limited to 500 documents per batch.

## Best Practices
Use `batch()` for multiple writes to ensure atomicity. Use `runTransaction()` when a write depends on the current value of a document.

## Troubleshooting
If initialized multiple times, the SDK throws a 'default app already exists' error. Check `getApps().length` before initializing.

## References
- [API Reference](https://firebase.google.com/docs/admin/setup)

## Why use this skill
Use this when your agent works with **firebase** — structured patterns beat pasted docs and prevent common hallucinations.

## AI pitfalls
- Inventing column names or schema fields
- Using deprecated driver methods or wrong connection strings
- Omitting connection pooling or transaction boundaries

## Production checklist
- [ ] Migrations version-controlled and applied via CI
- [ ] Connection limits and pooling configured
- [ ] Backups and restore procedure documented

## Related skills
- No graph relationships yet — see the knowledge graph in the docs site.

---
> **Last Verified:** 2026-07-02

Files in this skill

  • SKILL.md2.1 KB
  • examples/example.py139 B
  • examples/example.ts174 B
  • prompts/firestore-batch.md155 B
  • tests/skill.test.ts31 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.