---
name: firebase-cloud-functions-boilerplate
description: "Generate the starting code for a Firebase Cloud Function (HTTP or Trigger). Use when the user wants help with Firebase Cloud Functions Boilerplate. Related topics: firebase, coding, cloud."
---

# Firebase Cloud Functions Boilerplate

Generate the starting code for a Firebase Cloud Function (HTTP or Trigger).

## How to use this skill

1. Ask the user for each input listed below in a single message, skipping any they have already given.
2. Where options are listed, offer them, but accept other answers too.
3. Fill the answers into the prompt template, then follow the completed prompt to produce the result.

## Inputs

- **Function Name** (free text, e.g. "")
- **Trigger Type** (choose one: HTTPS Callable, HTTP Request (REST), Firestore Trigger (onCreate/Update), Auth Trigger, Pub/Sub Scheduled)
- **Language** (choose one: JavaScript, TypeScript)
- **Describe the function's logic** (longer free text)
- **Firebase SDK version** (choose one: v2 (Modular), v1 (Legacy))
- **Include error handling (try/catch)?** (choose one: Yes, No)

## Prompt template

## Introduction
Quickly scaffold a Firebase Cloud Function in Node.js.

## Function Details
- Function Name: {{Function Name}}
- Trigger Type: {{Trigger Type}}
- Language: {{Language}}

## Implementation
- Describe the function's logic: {{Describe the function's logic}}
- Firebase SDK version: {{Firebase SDK version}}
- Include error handling (try/catch)? {{Include error handling (try/catch)?}}

---
**Goal**: Output the ready-to-deploy Cloud Function code with comments.

---

Source: [Firebase Cloud Functions Boilerplate on PromptBuild](https://promptbuild.io/prompt/25sRfjgeC7ibp4ytYWhf/firebase-cloud-functions-boilerplate)
