better-firebase-functions
Skill by george43g
Guides setup of better-firebase-functions (BFF) in a Firebase Cloud Functions project. It covers automatic function discovery, cold-start optimization and optional bundler plugins for per-function bundles.
Install better-firebase-functions
Built from the published package, never by AI.
git clone --depth 1 https://github.com/george43g/better-firebase-functions /tmp/better-firebase-functions && mkdir -p ~/.claude/skills && cp -r /tmp/better-firebase-functions/skill ~/.claude/skills/better-firebase-functionsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install better-firebase-functions in Claude Code
git clone --depth 1 https://github.com/george43g/better-firebase-functions /tmp/better-firebase-functions && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/better-firebase-functions/skill ~/.gemini/antigravity-cli/skills/better-firebase-functionsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install better-firebase-functions in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant the setup knowledge for better-firebase-functions, a library that replaces manual function imports with automatic discovery. Without BFF, every function module loads on every cold start. With BFF, only the module matching the invoked function loads. The skill explains the entry point call to exportFunctions or exportFunctionsAsync, the naming rules that turn file paths into function names, and the searchGlob setting.
The skill also covers optional bundler plugins for esbuild, webpack and rollup, which produce one bundle per function. It includes a tsconfig example, a configuration options table, a verification checklist and common pitfalls. It is aimed at developers working on Firebase Cloud Functions projects who want faster cold starts or need to troubleshoot BFF configuration. The source says it covers Gen 1, Gen 2, CJS and ESM setups.
Written from the project's SKILL.md and checked against it.
What it can do
- Entry point setupShows how to write the exportFunctions call for CJS and ESM projects.
- Function file structureExplains that each trigger file exports its trigger as the default export.
- Naming rulesMaps file paths to Firebase function names and shows how dashes create function groups.
- Bundler plugin configurationGives setup examples for esbuild, webpack and rollup per-function bundles.
- Custom naming functionsShows how to pass a custom funcNameFromRelPath function consistently at runtime and build time.
- TroubleshootingCovers common errors such as empty functions, Cloud Run name mismatches and the missing __bff_discovery error.
- Verification checklistLists checks to run before deploying a BFF setup.
What you need
- A Firebase Cloud Functions project
- npm
- Node.js
- tsx, if using a bundler plugin with a TypeScript entry point
Try asking
- Set up better-firebase-functions in my Firebase functions project
- Convert my manual function imports to BFF auto-export
- Configure the esbuild bundler plugin for per-function bundles
Good to know
- Bundler plugins need tsx to load the TypeScript entry point at build time, or manual overrides must be passed.
- searchGlob must match compiled .js files at runtime unless TypeScript runs natively.
- Bundler plugins are optional and BFF also works without them.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skill/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to better-firebase-functions
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
better-firebase-functions: common questions
Does better-firebase-functions work with ESM projects?
The source shows an ESM entry point that uses exportFunctionsAsync with import.meta.filename. It states that the skill covers both CJS and ESM setups.
What does BFF do during a cold start?
When FUNCTION_TARGET, FUNCTION_NAME or K_SERVICE is set, BFF loads only the one module that matches the function being invoked. When none of these are set, it loads all modules so the Firebase CLI can discover triggers.
Why are my functions empty after deploying with BFF?
The source says this usually happens when searchGlob targets .ts files but the runtime output is .js. Using **/*.func.js, or the compiled extension, fixes it.
How do I install better-firebase-functions?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is better-firebase-functions free?
The code is published under the MPL-2.0 licence. The service it connects to may have its own pricing.
Is better-firebase-functions safe to use?
It scores 74 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to better-firebase-functions?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
