extension-to-functions-codebase skill: turn a Firebase Extension into your own Cloud Functions code
Makes your coding agent convert a Firebase Extension into a Cloud Functions codebase or a publishable npm package.
- Installs
- 59.7K
- on skills.sh
- Stars
- 497
- on GitHub
- Files
- 3
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
extension-to-functions-codebase is a skill from the Firebase team (author listed as Google LLC). It walks your agent through reading an extension's extension.yaml, turning its parameters, APIs, roles and lifecycle events into Cloud Functions code, and upgrading 1st Gen triggers to 2nd Gen.
You can pick one of two targets: code under functions/src/ with config in .env, or an npm package that exports V2 functions. The skill bundles 3 reference guides (config migration, the destructuring shim, V1 to V2 signature mapping) and no scripts. It tells the agent never to run npm publish.
Good for
- Firebase developers who want to stop depending on an installed extension and own its code
- Authors who want to ship an extension's logic as a reusable npm package
- Teams moving old V1 Cloud Functions triggers to V2
Install extension-to-functions-codebase
Claude Code
- 1
Copy this prompt.
Install the extension-to-functions-codebase skill in Claude Code. Run this command: npx skills add https://github.com/firebase/agent-skills --skill extension-to-functions-codebase Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
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
Sections in SKILL.md
- Overview
- Target Migration Workflows
- Core Rules & Constraints
- 1. Declarative IAM & APIs (Zero-Local-Overhead)
- 2. Global Parameter Access Restriction
- 3. V2 Concurrency & Cost Parity
- Step-by-Step Migration Execution
- Step 1: Inventory Extension Resources
- Step 2: Configure package.json
- Step 3: Upgrade Triggers from V1 to V2
- Step 4: Convert Lifecycle Events
- Step 5: Package README & Export Instructions
Key facts
- Installs on skills.sh
- 59,706 (data from 2026-11-02)
- License
- Apache-2.0
- Last repo commit
- 2026-10-30
What it includes
Writes the migrated code under functions/src/ with config in .env
Output goes into your app's functions folder. The skill names firebase deploy --only functions as the deploy step; it does not say the agent runs it.
Try: “Convert the extension installed in this project into code under functions/src.”
Write ·
Target A: local Functions codebaseBuilds a package that exports V2 functions
Sets package.json with an exports map, Node 22 or newer and firebase-functions 6 or newer as a peer dependency. Consumers re-export the functions in their index.ts.
Write ·
Target B: publishable npm packageMaps params, apis, roles, lifecycle events and resources
Params become defineString, defineInt, defineBoolean or defineSecret. APIs become requiresAPI and roles become requiresRole. Resources are upgraded from 1st Gen to 2nd Gen triggers.
Read ·
Step 1: inventory extension.yamlSets name, engines, peerDependencies and exports
Keeps your devDependencies, test framework and test scripts.
Write ·
Step 2: configure package.jsonSwitches to onDocumentWritten, onTaskDispatched, onRequest
Uses the destructuring shim so old handlers that expect (change, context) keep working without a rewrite.
Write ·
Step 3: upgrade triggers to V2onInstall becomes afterFirstDeploy, onUpdate becomes afterRedeploy
Maps extension lifecycle events to SDK lifecycle hooks in src/index.ts.
Write ·
Step 4: convert lifecycle eventsGenerates a README with install, re-export and .env table
Includes an Extension vs Package comparison table and says NEVER execute npm publish.
Write ·
Step 5: package README3 guides: configuration migration, destructuring shim, signature mapping
Deep dives the agent reads when it needs them, such as runWith to V2 options and the V1 to V2 trigger table.
Read ·
references/ guides
From the official docs
Permissions
Low risk
This skill makes your agent edit code in your project, and a bad conversion could change how your functions behave once you deploy. Work on a branch and read the diff before you deploy.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It rewrites your Functions code
The skill creates and edits code, package.json and a README in your project. Use a git branch and review the diff.
Deploying is a separate step
The skill lists firebase deploy --only functions as the deploy step and says never run npm publish. Run those yourself after review.
Technical details
| Scopes |
|
|---|
Questions
What does the extension-to-functions-codebase skill do?
It guides your agent to turn a Firebase Extension into plain Cloud Functions code in your project, or into an npm package. It also upgrades 1st Gen triggers to 2nd Gen and moves config into Parameterized Config.
How do I install it in Claude Code?
Use the install box at the top of this page. The Firebase README also documents a Claude plugin, a Codex plugin, a Gemini CLI extension and a Kimi plugin that install the whole Firebase set, not only this skill. The repo's .mcp.json registers a Firebase MCP server that runs npx -y firebase-tools@15.32.1 mcp, so check what a plugin route adds before you use it.
Does it work in the Claude app, Codex or Cursor?
The Firebase README documents the skills CLI, a Claude Code plugin, a Codex plugin, a Gemini CLI extension and a Kimi plugin. It lists Cursor, Windsurf and GitHub Copilot only as manual copy locations.
Does it need an API key?
SKILL.md names none. It asks for no key and bundles no scripts.
Will it publish or deploy for me?
The skill says NEVER execute npm publish. It lists firebase deploy --only functions as the deployment step for the local codebase target, so review the code before you run that yourself.
Is it safe?
It edits files in your project, so work on a branch and read the diff before you deploy. It bundles no scripts, and SKILL.md tells the agent never to run npm publish.
When should I not use it?
If you want to keep using the extension and its automatic updates, do not convert it. A converted codebase is yours to maintain and update.
Information
updated Nov 2, 2026
- Repository
- firebase/agent-skills
- Folder
skills/extension-to-functions-codebase
Sources
Docs, issue trackers and discussions this page is built from.
Show all 3Hide
- extension-to-functions-codebase SKILL.md · github.com
- firebase/agent-skills .mcp.json · github.com
- firebase/agent-skills README · github.com