firebase-cloud-functions

Build Firebase 2nd-gen Cloud Functions with idempotency and secret handling.

11|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/meanllbrl/dreamcontext --skill firebase-cloud-functions-meanllbrl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: firebase-cloud-functions
Source: https://github.com/meanllbrl/dreamcontext/tree/main/skill-packs/engineering/firebase-cloud-functions
Command: npx skills add https://github.com/meanllbrl/dreamcontext --skill firebase-cloud-functions-meanllbrl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Cloud Functions developers need a clear, enforceable pattern for building and deploying robust Firebase 2nd-gen functions with idempotency, loop prevention, and secret management.

Core Features & Use Cases

  • Enforces 2nd-gen Firebase Functions usage (firebase-functions/v2) and provides deployment guidelines for HTTP, Firestore, Auth, and Eventarc triggers.
  • Introduces a three-layer idempotency and loop-prevention strategy (event age check, before/after comparison, and an idempotency key/transaction pattern) to prevent duplicate work and runaway billing.
  • Covers scaling, concurrency, min/max instances, secrets via Cloud Secret Manager, and safe configuration for production workloads.

Quick Start

Set up a new Firebase 2nd-gen function project and implement idempotency guards, secrets, and scaling following the guidelines in this skill.

Frequently Asked Questions about firebase-cloud-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent duplicate executions in Firebase Cloud Functions?▼

Prevent duplicate executions in Firebase Cloud Functions by applying a three-layer idempotency strategy: checking event age, comparing before and after states, and using an idempotency key transaction pattern.

What is the best way to build scalable Firebase Cloud Functions with 2nd-gen patterns?▼

Build scalable Firebase Cloud Functions using 2nd-gen patterns by enforcing firebase-functions/v2 imports, configuring concurrency, setting min/max instances, and securing secrets via Cloud Secret Manager for production workloads.

Does this Firebase Cloud Functions pattern support Firestore, Auth, and Eventarc triggers?▼

Yes, this Firebase Cloud Functions pattern supports Firestore, Auth, HTTP, Pub/Sub, Scheduler, and Eventarc triggers, ensuring deployment best practices and secure secret handling across all services.

Why does my Firebase Cloud Function enter an infinite loop?▼

Your Firebase Cloud Function enters an infinite loop due to missing loop-prevention guards. Implement before/after state comparisons and event age checks to stop runaway billing and duplicate work.

How do I securely handle secrets in 2nd-gen Firebase Cloud Functions?▼

Securely handle secrets in 2nd-gen Firebase Cloud Functions by integrating Cloud Secret Manager. This ensures safe configuration for production workloads while maintaining compliance with 2nd-gen deployment best practices.