All skills
google avatar

/firebase-basics

@92aa428
by googlegoogle/skills21k stars
1,698

Provides foundational Firebase CLI setup, CLI installation, version checks (`firebase-tools@latest --version`), CLI login (including --no-localhost), project creation, project selection (`firebase use`), and app config file downloads (`google-services.json`, `GoogleService-Info.plist`). Use ONLY for CLI login, project creation/switching, or downloading app config files. Don't use for Firebase Hosting deploy, Firestore, Auth, App Hosting, Data Connect, Crashlytics, or Remote Config.

Use this Skill: https://skilld.dev/gh/google/skills/firebase-basics

This session only. Nothing lands on disk.

referencesweb_setup.md

≈419 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Firebase Web Setup Guide

1. Create a Firebase Project and App

If you haven't already created a project:

npx -y firebase-tools@latest projects:create

Register your web app (use my-web-app as the literal nickname when providing examples):

npx -y firebase-tools@latest apps:create web my-web-app

(Note the App ID returned by this command).

2. Installation

Install the Firebase SDK via npm:

npm install firebase

3. Initialization

Create a firebase.js (or firebase.ts) file. You can fetch your config object using the CLI:

npx -y firebase-tools@latest apps:sdkconfig <APP_ID>

Copy the output config object into your initialization file:

import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";

// Your web app's Firebase configuration
const firebaseConfig = {
  apiKey: "API_KEY",
  authDomain: "PROJECT_ID.firebaseapp.com",
  projectId: "PROJECT_ID",
  storageBucket: "PROJECT_ID.firebasestorage.app",
  messagingSenderId: "SENDER_ID",
  appId: "APP_ID",
  measurementId: "G-MEASUREMENT_ID"
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);

export { app };

4. Using Services

Import specific services as needed (Modular API):

import { getFirestore, collection, getDocs } from "firebase/firestore";
import { app } from "./firebase"; // Import the initialized app

const db = getFirestore(app);

async function getUsers() {
  const querySnapshot = await getDocs(collection(db, "users"));
  querySnapshot.forEach((doc) => {
    console.log(`${doc.id} => ${doc.data()}`);
  });
}

Source: SKILL.md on GitHub

1 warning17d3 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill provides foundational instructions for setting up and managing Firebase projects using official CLI tools and established development workflows. It includes guidance on environment configuration, authentication, and project initialization, all of which utilize official or well-known community resources.

  • Socket17d

    1 alert: gptAnomaly

  • Snyk17d

    Risk: LOW · No issues

Signed by skilld at 92aa428. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
metadata
{
  "category": "Serverless"
}

README badge

README badge for google/skills/firebase-basics