agentient/vibekit/firebase-admin-sdk-server-integration
Claude Code and agent skill by agentient/vibekit
- community
Checking that the SKILL.md file is still in the repository.
Server-side Firebase Admin SDK patterns for Next.js 14+ with secure initialization and token verification. PROACTIVELY activate for: (1) setting up Admin SDK with server-only protection, (2) implementing custom claims for RBAC, (3) verifying tokens in middleware. Triggers: "admin sdk", "server-only", "custom claims"
Install
npx vskill@latest install agentient/vibekit/firebase-admin-sdk-server-integrationSKILL.md
The same SKILL.md was published earlier as agentient/vibekit/firebase-admin-sdk-server-integration.
Firebase Admin SDK Server Integration
Overview
The Firebase Admin SDK provides privileged server-side access to Firebase services, bypassing security rules. It must be used exclusively in server environments (Server Components, API Routes, Server Actions).
Critical Security Pattern: server-only Package
MANDATORY: All Admin SDK files MUST import server-only to prevent client-side bundling.
Why: Without server-only, service account credentials could leak into the client bundle, exposing your entire Firebase project.
Secure Admin SDK Initialization
Environment Variables
`.env.local` (Server-only variables):
Get Credentials:
- Firebase Console -> Project Settings -> Service Accounts
- Click "Generate New Private Key"
- Download JSON file
- Extract values into
.env.local
Custom Claims (RBAC)
Set Custom Claims (Server-Side Only)
Read Custom Claims (Client-Side)
IMPORTANT: After setting custom claims, client must force token refresh:
Anti-Patterns
Importing Admin SDK in Client Component:
Use Server Actions Instead:
Best Practices
Do:
- Always import
'server-only'first in admin files - Store credentials in server-side environment variables
- Validate environment variables on startup
- Use middleware for token verification
- Force token refresh after custom claims change
- Use Admin SDK for server-side data fetching
Don't:
- Import Admin SDK in client components
- Commit
.env.localto version control - Share service account keys
- Skip token verification
- Use Admin SDK for client-side operations
Related Skills: firebase-authentication-patterns, firebase-nextjs-integration-strategies
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
- SKILL.md in the repositoryCheckingplugins/frontend-tools/skills/firebase-admin-sdk-server-integration/SKILL.md
Popularity
- Repository stars
- 2
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/agentient/vibekit/firebase-admin-sdk-server-integration)