All skills
firebase avatar

/firebase-basics

@073edf7 official
by firebasefirebase/agent-skills461 stars
102

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/firebase/agent-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

2 warningstoday5 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill provides a comprehensive suite of instructions for initializing and managing Firebase projects across various development environments. It follows standard industry practices for setting up cloud infrastructure, including downloading tools from official sources (npm, Google, GitHub) and configuring local environments. The 'low' verdict is assigned due to the inherent attack surface for indirect prompt injection when processing user-supplied identifiers like Project IDs in shell commands, though no malicious intent was detected.

  • Sockettoday

    1 alert: gptAnomaly

  • Snyktoday

    Risk: LOW · No issues

  • Runlayer6mo

    1/2 files flagged

  • ZeroLeaks5mo

    1 finding · Score: 69/100

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

Last checked against GitHub 2 days ago.

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

README badge

README badge for firebase/agent-skills/firebase-basics