better-firebase-functions

Automate discovery and export of Firebase Cloud Functions for Gen 1 and Gen 2 projects.

183|17|Updated Dec 8, 2019
One-click install
npx skills add https://github.com/george43g/better-firebase-functions --skill better-firebase-functions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-firebase-functions
Source: https://github.com/george43g/better-firebase-functions/tree/main/skill
Command: npx skills add https://github.com/george43g/better-firebase-functions --skill better-firebase-functions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Replaces manual imports of Firebase Cloud Functions with automatic discovery and export, dramatically reducing boilerplate and overcoming cold-start penalties by loading only the function module that is invoked at runtime.

Core Features & Use Cases

  • Automatic function discovery and export for Gen 1, Gen 2, CJS and ESM entry points.
  • Optional per-function bundling with esbuild, webpack, or rollup to minimize cold-start times.
  • Supports deployment and build-discovery modes, with a simple entry-point API to orchestrate triggers.

Quick Start

Install the core library, configure exportFunctions in your entry file, and optionally enable a bundler plugin to maximize cold-start savings.

Frequently Asked Questions about better-firebase-functions

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

FAQPage Schema
How do I reduce Firebase Cloud Functions cold-start times?

To reduce Firebase Cloud Functions cold-start times, use automatic discovery to load only the invoked function module at runtime, and apply per-function bundling with esbuild, webpack, or rollup to minimize initialization overhead.

What is automatic discovery for Firebase Cloud Functions?

Automatic discovery for Firebase Cloud Functions is a mechanism that replaces manual imports by dynamically identifying and registering function entry points at runtime or build time, eliminating boilerplate across Gen 1 and Gen 2 projects.

Can I use automatic function export with ESM and Gen 2 Firebase projects?

Yes, automatic function export supports both Gen 1 and Gen 2 Firebase projects using either CommonJS or ES Modules, allowing you to orchestrate triggers across different module systems without manual entry-point configuration.

How do I set up per-function bundling for Firebase Cloud Functions?

You set up per-function bundling by installing the core library, configuring the exportFunctions entry point, and enabling an optional bundler plugin like esbuild, webpack, or rollup to generate isolated bundles.

Does Firebase Cloud Functions automatic discovery work with TypeScript?

Yes, Firebase Cloud Functions automatic discovery works with TypeScript by supporting build-time discovery logic through entry-point configuration, searchGlob, functionDirectoryPath, and bundler plugins to resolve compiled modules.

Why does my Firebase Cloud Functions deployment have high cold-start latency?

Your Firebase Cloud Functions deployment has high cold-start latency because all functions load during initialization, which you can resolve by implementing per-function bundling and runtime discovery to load only the invoked module.