SkillsReviewed · firebase

Firebase Extension to Functions Codebase

Firebase Extension to Functions Codebase is a coding-assistant skill for developers moving a Firebase Extension into their own functions or npm package, but its recipes require SDK compatibility and behavior verification. It covers V1-to-V2 triggers, configuration, permissions, lifecycle tasks and package exports.

Researched 15 Nov 2026

In short.

Firebase Extension to Functions Codebase is a coding-assistant skill for Firebase developers taking ownership of an Extension's implementation, but the supplied recipes do not establish SDK compatibility or equivalent runtime behavior. Its four documents explain two output paths, parameter migration, trigger signatures and deployment lifecycle hooks. Several SDK helpers lack exact supporting-version information, and the claimed pricing parity has no measurements. Nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Covers all supplied files in skills/extension-to-functions-codebase: SKILL.md and the configuration-migration, destructuring-shim and signature-mapping references, plus the repository-level LICENSE above the folder. Excludes other repository skills, SDK and CLI implementation, any particular Extension and external service terms. No code was executed; compilation, deployment, runtime behavior, cost parity and version compatibility remain unverified.

The overview

Identity

The resource is the extension-to-functions-codebase skill in Firebase's agent-skills repository. Its metadata names Google LLC as author. It provides instructions and reference examples for a coding assistant to transform Extension source into a local Cloud Functions codebase or a reusable npm package.

The original source location is [https://github.com/firebase/agent-skills/tree/main/skills/extension-to-functions-codebase]. The supplied scope contains SKILL.md and three reference documents, with the repository's LICENSE supplied separately.

Assessment

The skill offers a useful migration checklist when a developer wants to preserve an Extension's business logic while managing its source, configuration and deployment directly. Its strongest detail is the connection between extension.yaml resources, typed parameters, runtime options and provider-specific handler signatures.

Treat its examples as migration proposals requiring verification. The documents name SDK helpers and compatibility behavior without establishing exact supporting releases, and they provide no completed migration or runtime results.

Users

The local-code route suits Firebase application developers who want an Extension's functions under functions/src/. The package route suits maintainers who want consumers to install a reusable module and re-export its functions.

Beginners will need familiarity with TypeScript, Firebase triggers, environment configuration and npm package files. Experienced developers get more value from the signature mappings and parameter rules, especially when migrating handlers with substantial existing logic.

Capabilities

The instructions cover inventorying extension.yaml, translating parameters, declaring required roles and APIs, upgrading triggers, converting lifecycle events, preserving development dependencies and test scripts, and writing package documentation.

The references add runtime-option translations, secret binding, deferred client initialization and trigger mappings for Firestore, Pub/Sub, Realtime Database, Storage, HTTP, callables, blocking authentication and tasks. These are documented migration patterns; their successful operation is not demonstrated.

Using it

Requirements

A migration needs access to the Extension's source and metadata. The package recipe specifies Node.js >=22, firebase-functions >=6.0.0, and firebase-admin ^11.0.0 || ^12.0.0, plus exports for JavaScript and TypeScript declarations. These are prescribed package settings, not a verified compatibility matrix.

The files do not identify a minimum Firebase CLI version or the first SDK releases supporting requiresRole, requiresAPI, afterFirstDeploy, afterRedeploy and the described event compatibility properties. They also do not name supported coding assistants or their installation requirements.

Mechanism

The skill directs an assistant to turn Extension metadata into function declarations: parameters become typed configuration, roles and APIs become SDK declarations, and lifecycle events become deployment hooks. Runtime-dependent clients are initialized inside onInit or lazy getters instead of reading parameter values during module loading.

Its central compatibility technique destructures legacy-shaped inputs such as change and context from a V2 event. The reference attributes this behavior to SDK addV1Compat lazy getters. Callables use request properties such as data and auth; scheduled, task and blocking-authentication handlers are mapped to direct event access.

Setup

Start with the complete skill folder and the Extension source, then choose the local-code or package destination. The documented inventory includes parameters, APIs, roles, lifecycle events, resources, development dependencies and test scripts. Assistant-specific skill installation is not documented.

The local route places code in functions/src/ and configuration in .env, with firebase deploy --only functions shown as the deployment command. The package route adds package metadata, exports, configuration documentation and consumer re-export instructions. The workflow explicitly excludes executing npm publish.

Example

For an Extension responding to Firestore writes, the mapping replaces firestore.document().onWrite() with onDocumentWritten(). Its proposed handler destructures ({ change, context }) so existing references to those names can remain. A client needing a parameter value would be declared globally and initialized inside onInit.

This illustrates the documented approach, not a completed migration. The chosen SDK must support the proposed event properties, and the resulting project still needs type checking and behavior verification.

Assessment & evidence

Limitations

The captured folder contains instructions and examples, with no executable migration utility or complete migrated application. Nothing was built, type-checked, deployed or run. Compatibility with a particular Extension, SDK release or cloud project remains unverified.

The secret-detection rule relies partly on parameter names containing terms such as KEY or TOKEN; that alone cannot establish that every sensitive value is found. Likewise, mapping update and configuration events to afterRedeploy does not demonstrate equivalent lifecycle behavior. The documentation provides no project-specific assessment of permissions, retries, task routing or concurrency effects.

Reasoning

The design favors small changes to existing handlers: configuration becomes explicit declarations, runtime initialization moves into hooks, and the compatibility shim aims to preserve familiar inputs. The intended benefit is less rewriting of business logic.

The reasonable inference is that this approach can reduce the amount of changed code. It cannot, by itself, establish preserved behavior: the proposed SDK features, event shapes and lifecycle transitions remain dependencies that must be verified.

Alternatives

The skill offers two destinations. Local functions source keeps the implementation within one application's codebase. A reusable npm package adds a consumer-facing interface, export configuration and documentation for installation and re-exporting.

For handler conversion, the shim reference also discusses rewriting simple handlers to native V2 event properties. The choice is between retaining legacy-shaped handler inputs and explicitly adapting the function body. No measured comparison of these approaches is supplied.

Evidence

The available source comprises SKILL.md, references/configuration-migration.md, references/destructuring-shim.md and references/signature-mapping.md, together with the repository-level LICENSE. These support the resource's purpose, proposed migration steps, examples and licence terms.

Firebase SDK implementation, CLI documentation, actual Extension source and migration results were not supplied. Statements about helper availability, compatibility behavior and pricing parity therefore remain documentation claims rather than independently established outcomes.

Access & freshness

Costs

The supplied licence grants rights without a licence charge. Coding-assistant charges, migration effort, deployment costs and ongoing cloud-service costs are unknown.

The skill recommends cpu: "gcf_gen1" to preserve V1 pricing characteristics. It supplies no billing comparison, workload assumptions or measurements, so equivalent cost is unverified. The described reduction in local setup work does not establish zero operating cost.

Rights

The supplied repository licence is Apache License 2.0. It permits reproduction, modification and redistribution under its conditions. Redistribution requires providing the licence, marking changed files, retaining applicable source notices and preserving relevant NOTICE attributions if such a file is included.

The licence provides no general trademark permission and disclaims warranties. It does not establish the rights to a separately migrated Extension or its dependencies; those licences would need their own assessment.

Freshness

The supplied source snapshot was captured on 15 November 2026 at commit 99954a30898bb5ddc8152ee10e124dc3b4106bf7. The fixed-revision folder is [https://github.com/firebase/agent-skills/tree/99954a30898bb5ddc8152ee10e124dc3b4106bf7/skills/extension-to-functions-codebase].

The skill metadata supplies no skill version. The commit's authoring date, subsequent repository changes and compatibility with current SDK and CLI releases are unknown.

Actions

Before adopting the recipes, establish exact SDK and CLI versions and verify their exported helpers and event types. Choose the output route, inventory the Extension's resources, and preserve its existing tests and development dependencies.

Type-check the migrated project and run its tests, then verify trigger inputs, secret bindings, lifecycle tasks and task routing before deployment. Assess costs using the intended runtime settings and workload. For a shared package, verify compiled exports and declarations and retain the applicable licence notices.

Evidence for this report

LICENSEnotice · checked 2026-11-15