LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

extension-to-functions-codebase

Skill for converting an installed Firebase Extension (or extension source) to a standalone Cloud Functions for Firebase codebase or publishable npm package, including upgrading triggers from V1 to V2 and configuring lifecycle hooks and declarative security

392stars79forksUpdated 7/30/2026
Web DevelopmentCloud Infrastructure#migration#npm#firebase#cloud-functions#serverless#typescript

Security Assessment

Safe(93/100)
Security Score93/100

About extension-to-functions-codebase

This Firebase skill guides an agent through migrating an installed Firebase Extension (or extension source) into either a standalone Cloud Functions for Firebase codebase for end-user app integration, or a publishable/open-source npm package for extension publishers. It solves the problem of moving off the Extensions packaging model onto native Cloud Functions GA capabilities — handling permissions, dependencies, and lifecycle hooks declaratively in code — while modernizing legacy V1 triggers to V2.

The skill defines two target workflows (local functions/src codebase versus reusable npm package with an exports map), enforces git safety by requiring a clean working tree and committing in-place copies before rewriting, and lays out rules such as never calling a parameter's .value() at global scope (initialize inside onInit instead) and preserving V1 fractional CPU pricing via cpu: "gcf_gen1" when disabling V2 concurrency. It provides a step-by-step execution plan: inventory the extension (extension.yaml params, apis, roles, lifecycleEvents, resources plus docs and scripts), create or update package.json with firebase-functions declared in dependencies or peerDependencies, and move function code so deployable functions can be re-exported from a consumer entrypoint. Reference files cover configuration migration, a destructuring compatibility shim for V1-to-V2 signatures, and signature mapping. Notably, it assumes Workload Identities, Declarative Security, and SDK Lifecycle Hooks are fully GA and instructs the agent to use requiresAPI/requiresRole imports rather than emitting manual gcloud IAM commands or console steps.

It targets Firebase extension developers and app teams converting extensions into maintainable functions codebases or shareable packages, and anyone upgrading extension triggers from 1st gen to 2nd gen.

FAQ

What are the two migration targets?

Target A is a local Cloud Functions codebase placed in the project's functions/src/ folder, configured via defineString/defineSecret in .env and deployed with firebase deploy --only functions. Target B is a publishable npm package with an exports map and firebase-functions in dependencies or peerDependencies, which end users install and re-export.

How does it handle V1-to-V2 trigger upgrades?

It converts 1st gen triggers (firebase-functions/v1) to 2nd gen (firebase-functions/v2) using a Destructuring Compatibility Shim, and maps signatures via reference files. To keep V1 fractional CPU pricing and disable V2 concurrency, it sets cpu: "gcf_gen1".

Does it run gcloud IAM commands or change cloud config?

No. It assumes Workload Identities, Declarative Security, and Lifecycle Hooks are GA and instructs the agent to use declarative requiresAPI and requiresRole SDK imports instead of telling users to run manual gcloud commands or enable APIs in the console.

What safety steps does it take with source code?

It verifies a clean git status before starting and, when copying an extension's source into a new subdirectory, copies and commits immediately with a descriptive message before rewriting.

What's the first migration step?

A complete inventory of the extension — extension.yaml params, apis, roles, lifecycleEvents, and resources, plus source files, README/PREINSTALL/POSTINSTALL docs, and any backfill or helper scripts — so nothing is lost.

All Files

4 files
SKILL.md14.5 KB
View
references/configuration-migration.md6.4 KB
View
references/destructuring-shim.md4.4 KB
View
references/signature-mapping.md4.2 KB
View

Install extension-to-functions-codebase

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

firebase/agent-skills

Related Skills

dbt-sf-to-bq-translator

21,076

build-models

102

html-prototype

3,588

doc

448