agentient/vibekit/firebase-nextjs-integration-strategies
Claude Code and agent skill by agentient/vibekit
- community
Checking that the SKILL.md file is still in the repository.
Next.js 14+ App Router integration with Firebase including server/client SDK separation and data fetching patterns. PROACTIVELY activate for: (1) setting up dual SDK architecture for client/server, (2) fetching data in Server Components with Admin SDK, (3) implementing real-time listeners in Client Components. Triggers: "nextjs firebase", "app router", "server client sdk"
Install
npx vskill@latest install agentient/vibekit/firebase-nextjs-integration-strategiesSKILL.md
The same SKILL.md was published earlier as agentient/vibekit/firebase-nextjs-integration-strategies.
Firebase Next.js Integration Strategies
Overview
Next.js 14+ App Router has a clear server/client boundary. This skill provides patterns for integrating Firebase's dual SDK model (Client SDK + Admin SDK) with Next.js execution environments.
Dual SDK Architecture
Client SDK (Client Components, Browser)
Use For:
- Client-side authentication (sign-in, sign-up, sign-out)
- Real-time listeners (
onSnapshot) - Client-side mutations with optimistic updates
- File uploads to Storage
Location: src/lib/firebase/client.ts
Admin SDK (Server Components, API Routes, Server Actions)
Use For:
- Privileged data access in Server Components
- Token verification in middleware
- Server-side mutations
- Bypassing security rules
Location: src/lib/firebase/admin.ts
Data Fetching Patterns
Pattern 1: Server Component (Recommended for Initial Load)
Advantages:
- Fast (no client-side fetch)
- SEO-friendly (pre-rendered)
- Secure (uses Admin SDK)
- Cached by Next.js
Pattern 2: Client Component with Real-Time Listener
Use When:
- Need real-time updates
- User-specific data (respects security rules)
- Interactive UI
Pattern 3: Server Action (Mutations)
Use For:
- Form submissions
- User-initiated mutations
- Progressive enhancement
Decision Tree
When to use Server Components:
- Initial page load
- SEO-critical content
- Privileged data access
- Static or slow-changing data
When to use Client Components:
- Real-time updates
- User interactions
- Client-side state
- Animations
When to use Server Actions:
- Form submissions
- Mutations
- Progressive enhancement
When to use API Routes:
- External webhooks
- Complex server logic
- Non-Next.js clients
Best Practices
Do:
- Use Server Components for initial data load (faster, SEO-friendly)
- Use Client Components for real-time updates
- Use Admin SDK in Server Components/Actions (privileged, bypasses rules)
- Use Client SDK in Client Components (respects security rules)
- Verify tokens in middleware
- Store tokens in
HttpOnlycookies (not localStorage) - Use
server-onlypackage for admin files
Don't:
- Import Admin SDK in Client Components
- Use Client SDK in Server Components (wrong execution context)
- Skip token verification
- Fetch data client-side when Server Component would work
- Forget to cleanup real-time listeners (
onSnapshot)
Related Skills: firebase-admin-sdk-server-integration, firestore-data-modeling-patterns
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/frontend-tools/skills/firebase-nextjs-integration-strategies/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-nextjs-integration-strategies)