firebase-ai-logic-basi…
Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers…
Skill for converting an installed Firebase Extension (or extension source) into a standalone Cloud Functions for Firebase codebase or publishable npm package, including V1 to V2 trigger upgrades, lifecycle hooks, and declarative security
$ npx -y skills add firebase/agent-skills --skill extension-to-functions-codebase --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/extension-to-functions-codebaseContext preview
The summary Claude sees to decide when to auto-load this skill.
Skill for converting an installed Firebase Extension (or extension source) into a standalone Cloud Functions for Firebase codebase or publishable npm package, including V1 to V2 trigger upgrades, lifecycle hooks, and declarative security
name: extension-to-functions-codebase description: Skill for converting an installed Firebase Extension (or extension source) into a standalone Cloud Functions for Firebase codebase or publishable npm package, including V1 to V2 trigger upgrades, lifecycle hooks, and declarative security metadata: category: Serverless
Migrates a Firebase Extension into either:
1. **A local Cloud Functions codebase** (`functions/src/` for app integration). 1. **A publishable npm package** (reusable open-source package exporting V2 functions).
Leverages native Cloud Functions features (declarative IAM, Parameterized Config, SDK Lifecycle Hooks) and modernizes 1st Gen triggers to 2nd Gen using the Destructuring Compatibility Shim.
______________________________________________________________________
`engines: { "node": ">=22" }`, and `peerDependencies: { "firebase-functions": ">=6.0.0" }`.
(`export * from "<package-name>"`).
______________________________________________________________________
Use native SDK declarations instead of manual `gcloud` scripts or console instructions:
import { defineString } from "firebase-functions/params";
import { onInit } from "firebase-functions/v2";
const dataset = defineString("DATASET_ID");
let client: BigQuery;
onInit(() => {
client = new BigQuery({ datasetId: dataset.value() });
});V2 enables concurrency (up to 80 requests). To preserve V1 single-concurrency pricing, set `cpu: "gcf_gen1"`.
______________________________________________________________________
1. **`extension.yaml`**:
`onTaskDispatched`, `onRequest`). 1. **Files & Scripts**: Preserve devDependencies, test framework (`jest`), and test scripts.
"peerDependencies": {
"firebase-admin": "^11.0.0 || ^12.0.0",
"firebase-functions": ">=6.0.0"
}(`lib/index.js`, `lib/index.d.ts`).
`EXT_INSTANCE_ID` when enqueueing tasks.
`{ snapshot, context }`) where legacy 1st Gen handlers expect `(change, context)`.
Map extension lifecycle events to SDK lifecycle hooks in `src/index.ts`:
`afterRedeploy({ task: { function: "setupTask" } })`
Generate `README.md` containing:
1. Installation instructions (`npm install`). 1. Re-export snippet (`export * from "<package-name>"`). 1. Parameterized Configuration `.env` reference table. 1. What Changed (Extension vs Package) comparison table.
_Reminder: NEVER execute `npm publish`._
Repo: firebase/skills
Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers…
Deploys and manages full-stack web applications (Next.js, Angular) with Server-Side Rendering…
Guide for setting up and using Firebase Authentication. Use this skill when the user's app…
Provides foundational Firebase CLI setup, CLI installation, version checks…
Comprehensive guide for Firebase Crashlytics, including provisioning and SDK usage. Use this…
Builds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL…