Firebase Mobile

Firebase backend services integration for mobile apps

509 stars

Best use case

Firebase Mobile is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Firebase backend services integration for mobile apps

Teams using Firebase Mobile should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/firebase-mobile/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/mobile-development/skills/firebase-mobile/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/firebase-mobile/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Firebase Mobile Compares

Feature / AgentFirebase MobileStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Firebase backend services integration for mobile apps

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Firebase Mobile Skill

## Overview

This skill provides Firebase backend services integration for mobile applications. It enables configuration of Authentication, Firestore, Storage, Cloud Functions, and other Firebase services.

## Allowed Tools

- `bash` - Execute Firebase CLI commands
- `read` - Analyze Firebase configurations
- `write` - Generate security rules and configurations
- `edit` - Update Firebase implementations
- `glob` - Search for Firebase files
- `grep` - Search for patterns

## Capabilities

### Firebase Authentication

1. **Auth Methods**
   - Email/password authentication
   - OAuth providers (Google, Apple, Facebook)
   - Phone authentication
   - Anonymous authentication
   - Custom token authentication

2. **Auth State**
   - Handle auth state changes
   - Token refresh
   - Session persistence
   - Multi-factor authentication

### Cloud Firestore

3. **Database Operations**
   - Document CRUD operations
   - Collection queries
   - Real-time listeners
   - Batch operations
   - Transactions

4. **Security Rules**
   - Write Firestore rules
   - Test rules with emulator
   - Handle role-based access
   - Validate data structure

### Firebase Storage

5. **File Operations**
   - Upload files with progress
   - Download files
   - Generate download URLs
   - Handle metadata
   - Configure security rules

### Cloud Functions

6. **Function Integration**
   - Call HTTPS functions
   - Call callable functions
   - Handle function responses
   - Configure timeouts

### Remote Config

7. **Feature Flags**
   - Fetch remote config
   - Configure defaults
   - Handle fetch intervals
   - A/B testing setup

### Performance Monitoring

8. **Performance Tracking**
   - Automatic traces
   - Custom traces
   - Network request monitoring
   - Screen rendering metrics

## Target Processes

- `firebase-backend-integration.js` - Firebase integration
- `firebase-cloud-messaging.js` - Push notifications
- `mobile-analytics-setup.js` - Analytics

## Dependencies

- Firebase SDK
- Firebase CLI
- Google Cloud account

## Usage Examples

### Firebase Setup (iOS)

```swift
// AppDelegate.swift
import FirebaseCore
import FirebaseAuth
import FirebaseFirestore

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        FirebaseApp.configure()
        return true
    }
}

// AuthService.swift
class AuthService: ObservableObject {
    @Published var user: User?
    private var handle: AuthStateDidChangeListenerHandle?

    init() {
        handle = Auth.auth().addStateDidChangeListener { [weak self] _, user in
            self?.user = user
        }
    }

    func signIn(email: String, password: String) async throws {
        try await Auth.auth().signIn(withEmail: email, password: password)
    }

    func signUp(email: String, password: String) async throws {
        try await Auth.auth().createUser(withEmail: email, password: password)
    }

    func signOut() throws {
        try Auth.auth().signOut()
    }
}
```

### Firestore Repository (Android)

```kotlin
// data/repository/PostRepository.kt
class PostRepository @Inject constructor(
    private val firestore: FirebaseFirestore
) {
    private val postsCollection = firestore.collection("posts")

    fun observePosts(): Flow<List<Post>> = callbackFlow {
        val listener = postsCollection
            .orderBy("createdAt", Query.Direction.DESCENDING)
            .addSnapshotListener { snapshot, error ->
                if (error != null) {
                    close(error)
                    return@addSnapshotListener
                }
                val posts = snapshot?.documents?.mapNotNull { it.toObject<Post>() } ?: emptyList()
                trySend(posts)
            }
        awaitClose { listener.remove() }
    }

    suspend fun createPost(post: Post): String {
        val docRef = postsCollection.add(post).await()
        return docRef.id
    }

    suspend fun updatePost(postId: String, updates: Map<String, Any>) {
        postsCollection.document(postId).update(updates).await()
    }

    suspend fun deletePost(postId: String) {
        postsCollection.document(postId).delete().await()
    }
}
```

### Security Rules

```javascript
// firestore.rules
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    function isAuthenticated() {
      return request.auth != null;
    }

    function isOwner(userId) {
      return isAuthenticated() && request.auth.uid == userId;
    }

    match /users/{userId} {
      allow read: if isAuthenticated();
      allow write: if isOwner(userId);
    }

    match /posts/{postId} {
      allow read: if true;
      allow create: if isAuthenticated()
        && request.resource.data.authorId == request.auth.uid;
      allow update, delete: if isOwner(resource.data.authorId);
    }
  }
}
```

### Firebase Emulator

```bash
# Start emulators
firebase emulators:start

# Run with emulator in code
if ProcessInfo.processInfo.environment["USE_FIREBASE_EMULATOR"] == "YES" {
    Auth.auth().useEmulator(withHost: "localhost", port: 9099)
    Firestore.firestore().useEmulator(withHost: "localhost", port: 8080)
    Storage.storage().useEmulator(withHost: "localhost", port: 9199)
}
```

## Quality Gates

- Security rules tested with emulator
- Authentication flows verified
- Offline persistence tested
- Error handling comprehensive

## Related Skills

- `push-notifications` - FCM integration
- `mobile-analytics` - Firebase Analytics
- `mobile-security` - Security patterns

## Version History

- 1.0.0 - Initial release

Related Skills

Appium Mobile Testing

509
from a5c-ai/babysitter

Appium mobile testing framework for iOS and Android automation

Mobile Offline Storage

509
from a5c-ai/babysitter

Cross-platform offline-first data management

Mobile Testing Frameworks

509
from a5c-ai/babysitter

Comprehensive mobile testing framework expertise

mobile-security

509
from a5c-ai/babysitter

Mobile application security skill for implementing OWASP MASVS compliance, secure storage, certificate pinning, biometric authentication, and security hardening across iOS and Android platforms.

Mobile Performance Profiling

509
from a5c-ai/babysitter

Mobile app performance analysis and optimization

Mobile Analytics

509
from a5c-ai/babysitter

Mobile app analytics and crash reporting integration

GraphQL Mobile

509
from a5c-ai/babysitter

GraphQL client integration for mobile applications

Fastlane/Mobile CI-CD

509
from a5c-ai/babysitter

Automated mobile build, test, and deployment with Fastlane

mobile-optimization

509
from a5c-ai/babysitter

Mobile GPU optimization skill for thermal management.

mobile-ads

509
from a5c-ai/babysitter

Ad mediation skill for rewarded video.

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity

babysitter

509
from a5c-ai/babysitter

Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)