[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F6DM9BNEJQXE4XA2QK212H":3,"skill-same:01M6F6DM9BNEJQXE4XA2QK212H":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":33,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6F6DM9BNEJQXE4XA2QK212H","firebase-app-platform",null,"Build and operate apps on Firebase using Auth, Firestore, Cloud Functions, and Hosting. Use when building mobile\u002Fweb backends with managed services, real-time data sync, or serverless APIs.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-firebase-app-platform\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"firebase","firebase app platform","platform","app","2026","auth","when","managed","operate","relevant","scripts","apps","critical","os","time","main","community","mobile","only","access","devops-security","data","sync","2026-11-10 10:12:30",false,"---\nname: firebase-app-platform\ndescription: Build and operate apps on Firebase using Auth, Firestore, Cloud Functions,\n  and Hosting. Use when building mobile\u002Fweb backends with managed services, real-time\n  data sync, or serverless APIs.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Firebase App Platform\n\nShip mobile and web backends with Firebase managed services.\n\n## When to Use This Skill\n\nUse this skill when:\n- Building mobile or web apps with real-time data sync\n- Need authentication with minimal backend code\n- Prototyping quickly with managed infrastructure\n- Building serverless APIs with Cloud Functions\n- Hosting static sites or SPAs with CDN\n\n## Prerequisites\n\n- Node.js 18+\n- Firebase CLI (`npm install -g firebase-tools`)\n- Google Cloud account (Firebase is part of GCP)\n- A Firebase project (create at console.firebase.google.com)\n\n## Security and deployment boundaries\n\nTest rules with allowed\u002Fdenied identities in the emulator before authorized deployment to an explicitly selected project. User-editable profile fields must never grant admin permissions; the admin example uses a server-managed custom claim. The message rules are an intentionally public-to-authenticated example, not private-channel membership enforcement. Admin SDK HTTP functions bypass Firestore rules, so authenticate\u002Fauthorize there or expose only explicitly public fields. CORS is not authorization. Firestore triggers may retry\u002Fout-of-order: the counter\u002Ftimestamp illustration needs event-ID deduplication and monotonic timestamp handling before production. Keep secrets in supported secret storage and verify current runtime\u002Fconfig migration guidance; budget alerts do not cap spend. See [rule conditions](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Ffirestore\u002Fsecurity\u002Frules-conditions).\n\n## Quick Start\n\n```bash\n# Install and authenticate\nnpm install -g firebase-tools\nfirebase login\n\n# Initialize in your project directory\nfirebase init\n# Select: Firestore, Functions, Hosting, Emulators\n\n# Start local emulators\nfirebase emulators:start\n\n# Deploy everything\nfirebase deploy\n\n# Deploy specific services\nfirebase deploy --only functions\nfirebase deploy --only hosting\nfirebase deploy --only firestore:rules\n```\n\n## Firestore Database\n\n### Security Rules\n\n```javascript\n\u002F\u002F firestore.rules\nrules_version = '2';\nservice cloud.firestore {\n  match \u002Fdatabases\u002F{database}\u002Fdocuments {\n    \u002F\u002F Users can only read\u002Fwrite their own data\n    match \u002Fusers\u002F{userId} {\n      allow read, write: if request.auth != null && request.auth.uid == userId;\n    }\n\n    \u002F\u002F Messages: authenticated users can read, only owner can write\n    match \u002Fchannels\u002F{channelId}\u002Fmessages\u002F{messageId} {\n      allow read: if request.auth != null;\n      allow create: if request.auth != null\n        && request.resource.data.userId == request.auth.uid\n        && request.resource.data.body is string\n        && request.resource.data.body.size() \u003C= 5000;\n      allow update: if request.auth != null\n        && resource.data.userId == request.auth.uid\n        && request.resource.data.userId == resource.data.userId\n        && request.resource.data.body is string\n        && request.resource.data.body.size() \u003C= 5000;\n      allow delete: if request.auth != null\n        && resource.data.userId == request.auth.uid;\n    }\n\n    \u002F\u002F Admin-only collection\n    match \u002Fadmin\u002F{document=**} {\n      allow read, write: if request.auth != null\n        && request.auth.token.admin == true; \u002F\u002F custom claim set only by trusted server admin\n    }\n\n    \u002F\u002F Default: deny everything\n    match \u002F{document=**} {\n      allow read, write: if false;\n    }\n  }\n}\n```\n\n### Data Operations\n\n```typescript\n\u002F\u002F lib\u002Ffirestore.ts\nimport { getFirestore, collection, doc, setDoc, getDoc,\n         query, where, orderBy, limit, onSnapshot,\n         serverTimestamp, increment } from \"firebase\u002Ffirestore\";\n\nconst db = getFirestore();\n\n\u002F\u002F Create document with auto-ID\nasync function createMessage(channelId: string, body: string, userId: string) {\n  const ref = doc(collection(db, \"channels\", channelId, \"messages\"));\n  await setDoc(ref, {\n    body,\n    userId,\n    createdAt: serverTimestamp(),\n  });\n  return ref.id;\n}\n\n\u002F\u002F Real-time listener\nfunction subscribeToMessages(channelId: string, callback: (msgs: any[]) => void) {\n  const q = query(\n    collection(db, \"channels\", channelId, \"messages\"),\n    orderBy(\"createdAt\", \"desc\"),\n    limit(50)\n  );\n  return onSnapshot(q, (snapshot) => {\n    const messages = snapshot.docs.map(doc => ({ id: doc.id, ...doc.data() }));\n    callback(messages);\n  });\n}\n\n\u002F\u002F Atomic counter\nasync function incrementViews(postId: string) {\n  await setDoc(doc(db, \"posts\", postId), {\n    views: increment(1),\n  }, { merge: true });\n}\n```\n\n### Indexes\n\n```json\n\u002F\u002F firestore.indexes.json\n{\n  \"indexes\": [\n    {\n      \"collectionGroup\": \"messages\",\n      \"queryScope\": \"COLLECTION\",\n      \"fields\": [\n        { \"fieldPath\": \"channelId\", \"order\": \"ASCENDING\" },\n        { \"fieldPath\": \"createdAt\", \"order\": \"DESCENDING\" }\n      ]\n    }\n  ]\n}\n```\n\n## Authentication\n\n```typescript\n\u002F\u002F lib\u002Fauth.ts\nimport { getAuth, signInWithPopup, GoogleAuthProvider,\n         createUserWithEmailAndPassword, signInWithEmailAndPassword,\n         signOut, onAuthStateChanged } from \"firebase\u002Fauth\";\n\nconst auth = getAuth();\n\n\u002F\u002F Google sign-in\nasync function signInWithGoogle() {\n  const provider = new GoogleAuthProvider();\n  const result = await signInWithPopup(auth, provider);\n  return result.user;\n}\n\n\u002F\u002F Email\u002Fpassword registration\nasync function register(email: string, password: string) {\n  const result = await createUserWithEmailAndPassword(auth, email, password);\n  return result.user;\n}\n\n\u002F\u002F Auth state listener\nonAuthStateChanged(auth, (user) => {\n  if (user) {\n    console.log(\"Signed in:\", user.uid, user.email);\n  } else {\n    console.log(\"Signed out\");\n  }\n});\n```\n\n## Cloud Functions\n\n```typescript\n\u002F\u002F functions\u002Fsrc\u002Findex.ts\nimport { onRequest } from \"firebase-functions\u002Fv2\u002Fhttps\";\nimport { onDocumentCreated } from \"firebase-functions\u002Fv2\u002Ffirestore\";\nimport { getFirestore, FieldValue } from \"firebase-admin\u002Ffirestore\";\nimport { initializeApp } from \"firebase-admin\u002Fapp\";\n\ninitializeApp();\nconst db = getFirestore();\n\n\u002F\u002F HTTP function (API endpoint)\nexport const api = onRequest({ cors: true, region: \"us-central1\" }, async (req, res) => {\n  if (req.method !== \"GET\") {\n    res.status(405).send(\"Method not allowed\");\n    return;\n  }\n  const snapshot = await db.collection(\"posts\").orderBy(\"createdAt\", \"desc\").limit(10).get();\n  const posts = snapshot.docs.map(doc => ({ id: doc.id, ...doc.data() }));\n  res.json({ posts });\n});\n\n\u002F\u002F Firestore trigger — runs when a new message is created\nexport const onMessageCreated = onDocumentCreated(\n  \"channels\u002F{channelId}\u002Fmessages\u002F{messageId}\",\n  async (event) => {\n    const data = event.data?.data();\n    if (!data) return;\n\n    \u002F\u002F Update channel's last message timestamp\n    await db.doc(`channels\u002F${event.params.channelId}`).update({\n      lastMessageAt: data.createdAt,\n      messageCount: FieldValue.increment(1),\n    });\n\n    \u002F\u002F Send notification (example)\n    \u002F\u002F Do not log message bodies; emit a redacted event identifier only.\n  }\n);\n```\n\n## Hosting\n\n```json\n\u002F\u002F firebase.json\n{\n  \"hosting\": {\n    \"public\": \"dist\",\n    \"ignore\": [\"firebase.json\", \"**\u002F.*\", \"**\u002Fnode_modules\u002F**\"],\n    \"rewrites\": [\n      { \"source\": \"\u002Fapi\u002F**\", \"function\": \"api\" },\n      { \"source\": \"**\", \"destination\": \"\u002Findex.html\" }\n    ],\n    \"headers\": [\n      {\n        \"source\": \"**\u002F*.@(js|css|svg|png|jpg|webp|woff2)\",\n        \"headers\": [{ \"key\": \"Cache-Control\", \"value\": \"public, max-age=31536000, immutable\" }]\n      },\n      {\n        \"source\": \"**\",\n        \"headers\": [\n          { \"key\": \"X-Frame-Options\", \"value\": \"DENY\" },\n          { \"key\": \"X-Content-Type-Options\", \"value\": \"nosniff\" },\n          { \"key\": \"Strict-Transport-Security\", \"value\": \"max-age=63072000\" }\n        ]\n      }\n    ]\n  }\n}\n```\n\n## Local Emulators\n\n```bash\n# Start all emulators\nfirebase emulators:start\n\n# Start specific emulators\nfirebase emulators:start --only auth,firestore,functions\n\n# Export emulator data for persistence\nfirebase emulators:export .\u002Femulator-data\nfirebase emulators:start --import=.\u002Femulator-data\n\n# Emulator UI at http:\u002F\u002Flocalhost:4000\n```\n\n```json\n\u002F\u002F firebase.json — emulator config\n{\n  \"emulators\": {\n    \"auth\": { \"port\": 9099 },\n    \"firestore\": { \"port\": 8080 },\n    \"functions\": { \"port\": 5001 },\n    \"hosting\": { \"port\": 5000 },\n    \"ui\": { \"enabled\": true, \"port\": 4000 }\n  }\n}\n```\n\n## Environment Configuration\n\n```bash\n# Set environment variables for functions\nfirebase functions:config:set stripe.key=\"sk_live_xxx\" app.name=\"MyApp\"\n\n# View config\nfirebase functions:config:get\n\n# Use in functions (v1)\nconst stripeKey = functions.config().stripe.key;\n\n# For v2 functions, use .env files\n# functions\u002F.env\nSTRIPE_KEY=sk_live_xxx\n\n# functions\u002F.env.local (for emulators)\nSTRIPE_KEY=sk_test_xxx\n```\n\n## Multi-Environment Setup\n\n```bash\n# Create separate projects for each environment\nfirebase use --add   # Add staging project alias\nfirebase use staging # Switch to staging\nfirebase use production\n\n# Deploy to specific project\nfirebase deploy --project my-app-staging\nfirebase deploy --project my-app-production\n\n# .firebaserc\n{\n  \"projects\": {\n    \"staging\": \"my-app-staging\",\n    \"production\": \"my-app-production\"\n  }\n}\n```\n\n## CLI Reference\n\n```bash\nfirebase projects:list              # List all projects\nfirebase deploy                      # Deploy everything\nfirebase deploy --only functions     # Deploy only functions\nfirebase deploy --only hosting       # Deploy only hosting\nfirebase deploy --only firestore     # Deploy rules + indexes\nfirebase functions:log               # View function logs\nfirebase hosting:channel:create pr-123  # Preview channel\nfirebase hosting:channel:delete pr-123\n```\n\n## Security Best Practices\n\n- Write strict Firestore security rules before any other code\n- Separate environments by Firebase project (staging\u002Fproduction)\n- Enable budget alerts and quota monitoring in GCP console\n- Move privileged logic into Cloud Functions (never trust the client)\n- Use App Check to prevent API abuse from non-app clients\n- Enable Firestore audit logging for compliance\n- Review OAuth consent screen settings\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|---------|\n| Permission denied | Check Firestore rules, verify auth state |\n| Function cold starts | Use min instances (`minInstances: 1`), optimize imports |\n| Emulator won't start | Check port conflicts, run `firebase emulators:start --debug` |\n| Deploy fails | Run `firebase deploy --debug`, check service account permissions |\n| Rules test failing | Use `firebase emulators:exec` to run rules unit tests |\n\n## Related Skills\n\n- gcp-cloud-functions (`gcp-cloud-functions`) — Function runtime patterns\n- vercel-deployments (`vercel-deployments`) — Alternative frontend hosting\n- convex-backend (`convex-backend`) — Alternative managed backend\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# Firebase App Platform\n\nShip mobile and web backends with Firebase managed services.\n\n## When to Use This Skill\n\nUse this skill when:\n- Building mobile or web apps with real-time data sync\n- Need authentication with minimal backend code\n- Prototyping quickly with managed infrastructure\n- Building serverless APIs with Cloud Functions\n- Hosting static sites or SPAs with CDN\n\n## Prerequisites\n\n- Node.js 18+\n- Firebase CLI (`npm install -g firebase-tools`)\n- Google Cloud account (Firebase is part of GCP)\n- A Firebase project (create at console.firebase.google.com)\n\n## Security and deployment boundaries\n\nTest rules with allowed\u002Fdenied identities in the emulator before authorized deployment to an explicitly selected project. User-editable profile fields must never grant admin permissions; the admin example uses a server-managed custom claim. The message rules are an intentionally public-to-authenticated example, not private-channel membership enforcement. Admin SDK HTTP functions bypass Firestore rules, so authenticate\u002Fauthorize there or expose only explicitly public fields. CORS is not authorization. Firestore triggers may retry\u002Fout-of-order: the counter\u002Ftimestamp illustration needs event-ID deduplication and monotonic timestamp handling before production. Keep secrets in supported secret storage and verify current runtime\u002Fconfig migration guidance; budget alerts do not cap spend. See [rule conditions](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Ffirestore\u002Fsecurity\u002Frules-conditions).\n\n## Quick Start\n\n```bash\n# Install and authenticate\nnpm install -g firebase-tools\nfirebase login\n\n# Initialize in your project directory\nfirebase init\n# Select: Firestore, Functions, Hosting, Emulators\n\n# Start local emulators\nfirebase emulators:start\n\n# Deploy everything\nfirebase deploy\n\n# Deploy specific services\nfirebase deploy --only functions\nfirebase deploy --only hosting\nfirebase deploy --only firestore:rules\n```\n\n## Firestore Database\n\n### Security Rules\n\n```javascript\n\u002F\u002F firestore.rules\nrules_version = '2';\nservice cloud.firestore {\n  match \u002Fdatabases\u002F{database}\u002Fdocuments {\n    \u002F\u002F Users can only read\u002Fwrite their own data\n    match \u002Fusers\u002F{userId} {\n      allow read, write: if request.auth != null && request.auth.uid == userId;\n    }\n\n    \u002F\u002F Messages: authenticated users can read, only owner can write\n    match \u002Fchannels\u002F{channelId}\u002Fmessages\u002F{messageId} {\n      allow read: if request.auth != null;\n      allow create: if request.auth != null\n        && request.resource.data.userId == request.auth.uid\n        && request.resource.data.body is string\n        && request.resource.data.body.size() \u003C= 5000;\n      allow update: if request.auth != null\n        && resource.data.userId == request.auth.uid\n        && request.resource.data.userId == resource.data.userId\n        && request.resource.data.body is string\n        && request.resource.data.body.size() \u003C= 5000;\n      allow delete: if request.auth != null\n        && resource.data.userId == request.auth.uid;\n    }\n\n    \u002F\u002F Admin-only collection\n    match \u002Fadmin\u002F{document=**} {\n      allow read, write: if request.auth != null\n        && request.auth.token.admin == true; \u002F\u002F custom claim set only by trusted server admin\n    }\n\n    \u002F\u002F Default: deny everything\n    match \u002F{document=**} {\n      allow read, write: if false;\n    }\n  }\n}\n```\n\n### Data Operations\n\n```typescript\n\u002F\u002F lib\u002Ffirestore.ts\nimport { getFirestore, collection, doc, setDoc, getDoc,\n         query, where, orderBy, limit, onSnapshot,\n         serverTimestamp, increment } from \"firebase\u002Ffirestore\";\n\nconst db = getFirestore();\n\n\u002F\u002F Create document with auto-ID\nasync function createMessage(channelId: string, body: string, userId: string) {\n  const ref = doc(collection(db, \"channels\", channelId, \"messages\"));\n  await setDoc(ref, {\n    body,\n    userId,\n    createdAt: serverTimestamp(),\n  });\n  return ref.id;\n}\n\n\u002F\u002F Real-time listener\nfunction subscribeToMessages(channelId: string, callback: (msgs: any[]) => void) {\n  const q = query(\n    collection(db, \"channels\", channelId, \"messages\"),\n    orderBy(\"createdAt\", \"desc\"),\n    limit(50)\n  );\n  return onSnapshot(q, (snapshot) => {\n    const messages = snapshot.docs.map(doc => ({ id: doc.id, ...doc.data() }));\n    callback(messages);\n  });\n}\n\n\u002F\u002F Atomic counter\nasync function incrementViews(postId: string) {\n  await setDoc(doc(db, \"posts\", postId), {\n    views: increment(1),\n  }, { merge: true });\n}\n```\n\n### Indexes\n\n```json\n\u002F\u002F firestore.indexes.json\n{\n  \"indexes\": [\n    {\n      \"collectionGroup\": \"messages\",\n      \"queryScope\": \"COLLECTION\",\n      \"fields\": [\n        { \"fieldPath\": \"channelId\", \"order\": \"ASCENDING\" },\n        { \"fieldPath\": \"createdAt\", \"order\": \"DESCENDING\" }\n      ]\n    }\n  ]\n}\n```\n\n## Authentication\n\n```typescript\n\u002F\u002F lib\u002Fauth.ts\nimport { getAuth, signInWithPopup, GoogleAuthProvider,\n         createUserWithEmailAndPassword, signInWithEmailAndPassword,\n         signOut, onAuthStateChanged } from \"firebase\u002Fauth\";\n\nconst auth = getAuth();\n\n\u002F\u002F Google sign-in\nasync function signInWithGoogle() {\n  const provider = new GoogleAuthProvider();\n  const result = await signInWithPopup(auth, provider);\n  return result.user;\n}\n\n\u002F\u002F Email\u002Fpassword registration\nasync function register(email: string, password: string) {\n  const result = await createUserWithEmailAndPassword(auth, email, password);\n  return result.user;\n}\n\n\u002F\u002F Auth state listener\nonAuthStateChanged(auth, (user) => {\n  if (user) {\n    console.log(\"Signed in:\", user.uid, user.email);\n  } else {\n    console.log(\"Signed out\");\n  }\n});\n```\n\n## Cloud Functions\n\n```typescript\n\u002F\u002F functions\u002Fsrc\u002Findex.ts\nimport { onRequest } from \"firebase-functions\u002Fv2\u002Fhttps\";\nimport { onDocumentCreated } from \"firebase-functions\u002Fv2\u002Ffirestore\";\nimport { getFirestore, FieldValue } from \"firebase-admin\u002Ffirestore\";\nimport { initializeApp } from \"firebase-admin\u002Fapp\";\n\ninitializeApp();\nconst db = getFirestore();\n\n\u002F\u002F HTTP function (API endpoint)\nexport const api = onRequest({ cors: true, region: \"us-central1\" }, async (req, res) => {\n  if (req.method !== \"GET\") {\n    res.status(405).send(\"Method not allowed\");\n    return;\n  }\n  const snapshot = await db.collection(\"posts\").orderBy(\"createdAt\", \"desc\").limit(10).get();\n  const posts = snapshot.docs.map(doc => ({ id: doc.id, ...doc.data() }));\n  res.json({ posts });\n});\n\n\u002F\u002F Firestore trigger — runs when a new message is created\nexport const onMessageCreated = onDocumentCreated(\n  \"channels\u002F{channelId}\u002Fmessages\u002F{messageId}\",\n  async (event) => {\n    const data = event.data?.data();\n    if (!data) return;\n\n    \u002F\u002F Update channel's last message timestamp\n    await db.doc(`channels\u002F${event.params.channelId}`).update({\n      lastMessageAt: data.createdAt,\n      messageCount: FieldValue.increment(1),\n    });\n\n    \u002F\u002F Send notification (example)\n    \u002F\u002F Do not log message bodies; emit a redacted event identifier only.\n  }\n);\n```\n\n## Hosting\n\n```json\n\u002F\u002F firebase.json\n{\n  \"hosting\": {\n    \"public\": \"dist\",\n    \"ignore\": [\"firebase.json\", \"**\u002F.*\", \"**\u002Fnode_modules\u002F**\"],\n    \"rewrites\": [\n      { \"source\": \"\u002Fapi\u002F**\", \"function\": \"api\" },\n      { \"source\": \"**\", \"destination\": \"\u002Findex.html\" }\n    ],\n    \"headers\": [\n      {\n        \"source\": \"**\u002F*.@(js|css|svg|png|jpg|webp|woff2)\",\n        \"headers\": [{ \"key\": \"Cache-Control\", \"value\": \"public, max-age=31536000, immutable\" }]\n      },\n      {\n        \"source\": \"**\",\n        \"headers\": [\n          { \"key\": \"X-Frame-Options\", \"value\": \"DENY\" },\n          { \"key\": \"X-Content-Type-Options\", \"value\": \"nosniff\" },\n          { \"key\": \"Strict-Transport-Security\", \"value\": \"max-age=63072000\" }\n        ]\n      }\n    ]\n  }\n}\n```\n\n## Local Emulators\n\n```bash\n# Start all emulators\nfirebase emulators:start\n\n# Start specific emulators\nfirebase emulators:start --only auth,firestore,functions\n\n# Export emulator data for persistence\nfirebase emulators:export .\u002Femulator-data\nfirebase emulators:start --import=.\u002Femulator-data\n\n# Emulator UI at http:\u002F\u002Flocalhost:4000\n```\n\n```json\n\u002F\u002F firebase.json — emulator config\n{\n  \"emulators\": {\n    \"auth\": { \"port\": 9099 },\n    \"firestore\": { \"port\": 8080 },\n    \"functions\": { \"port\": 5001 },\n    \"hosting\": { \"port\": 5000 },\n    \"ui\": { \"enabled\": true, \"port\": 4000 }\n  }\n}\n```\n\n## Environment Configuration\n\n```bash\n# Set environment variables for functions\nfirebase functions:config:set stripe.key=\"sk_live_xxx\" app.name=\"MyApp\"\n\n# View config\nfirebase functions:config:get\n\n# Use in functions (v1)\nconst stripeKey = functions.config().stripe.key;\n\n# For v2 functions, use .env files\n# functions\u002F.env\nSTRIPE_KEY=sk_live_xxx\n\n# functions\u002F.env.local (for emulators)\nSTRIPE_KEY=sk_test_xxx\n```\n\n## Multi-Environment Setup\n\n```bash\n# Create separate projects for each environment\nfirebase use --add   # Add staging project alias\nfirebase use staging # Switch to staging\nfirebase use production\n\n# Deploy to specific project\nfirebase deploy --project my-app-staging\nfirebase deploy --project my-app-production\n\n# .firebaserc\n{\n  \"projects\": {\n    \"staging\": \"my-app-staging\",\n    \"production\": \"my-app-production\"\n  }\n}\n```\n\n## CLI Reference\n\n```bash\nfirebase projects:list              # List all projects\nfirebase deploy                      # Deploy everything\nfirebase deploy --only functions     # Deploy only functions\nfirebase deploy --only hosting       # Deploy only hosting\nfirebase deploy --only firestore     # Deploy rules + indexes\nfirebase functions:log               # View function logs\nfirebase hosting:channel:create pr-123  # Preview channel\nfirebase hosting:channel:delete pr-123\n```\n\n## Security Best Practices\n\n- Write strict Firestore security rules before any other code\n- Separate environments by Firebase project (staging\u002Fproduction)\n- Enable budget alerts and quota monitoring in GCP console\n- Move privileged logic into Cloud Functions (never trust the client)\n- Use App Check to prevent API abuse from non-app clients\n- Enable Firestore audit logging for compliance\n- Review OAuth consent screen settings\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|---------|\n| Permission denied | Check Firestore rules, verify auth state |\n| Function cold starts | Use min instances (`minInstances: 1`), optimize imports |\n| Emulator won't start | Check port conflicts, run `firebase emulators:start --debug` |\n| Deploy fails | Run `firebase deploy --debug`, check service account permissions |\n| Rules test failing | Use `firebase emulators:exec` to run rules unit tests |\n\n## Related Skills\n\n- gcp-cloud-functions (`gcp-cloud-functions`) — Function runtime patterns\n- vercel-deployments (`vercel-deployments`) — Alternative frontend hosting\n- convex-backend (`convex-backend`) — Alternative managed backend\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":30,"source":46,"license":14,"category":47,"metadata":48,"date_added":51,"description":7,"source_repo":52,"source_type":34,"compatibility":53,"license_source":54},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":49,"version":50},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-firebase-app-platform",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add boisenoise\u002Fskills-collections --skill firebase-app-platform",{"tool":67,"command":68},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill firebase-app-platform",{"tool":70,"command":71},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill firebase-app-platform","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-firebase-app-platform\u002FSKILL.md",true,[],[76,85,93,102,110,118],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":84},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":84},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":101},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":101},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":101},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":101},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]