Source profileQuality 85/100

evanca/flutter-ai-rules/skills/firebase-cloud-functions/SKILL.md

firebase-cloud-functions

Use when calling callable functions (httpsCallable), passing data to server-side logic, handling function errors/timeouts, configuring regions, or testing with the Emulator Suite.

Source repository stars
604
Declared platforms
0
Static risk flags
0
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

This skill defines how to correctly call Firebase Cloud Functions from Flutter applications.

Best for

  • Implementing callable Cloud Functions in a Flutter project.
  • Passing structured data to server-side functions and processing results.
  • Handling errors, timeouts, and retries for function calls.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/evanca/flutter-ai-rules --skill "skills/firebase-cloud-functions"
Safe inspection promptEditorial

Inspect the Agent Skill "firebase-cloud-functions" from https://github.com/evanca/flutter-ai-rules/blob/b294a77b68b5508f8d3151fb93d87ed9622d2ff1/skills/firebase-cloud-functions/SKILL.md at commit b294a77b68b5508f8d3151fb93d87ed9622d2ff1. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    1. Setup and Configuration

    Initialize Firebase before using any Cloud Functions features.

    Initialize Firebase before using any Cloud Functions features.For region-specific deployments, specify the region:Deploy callable functions to Firebase before attempting to call them from the Flutter app.
  2. 02

    When to Use

    Implementing callable Cloud Functions in a Flutter project. Passing structured data to server-side functions and processing results. Handling errors, timeouts, and retries for function calls. Configuring region-specific function deployments. Testing Cloud Functions locally with…

    Implementing callable Cloud Functions in a Flutter project.Passing structured data to server-side functions and processing results.Handling errors, timeouts, and retries for function calls.
  3. 03

    2. Calling Functions

    Use httpsCallable to reference a function, then call to invoke it:

    Pass data as a Map — it is automatically serialized to JSON:Access the result via the data property — it is automatically deserialized from JSON:Do not pass authentication tokens in function parameters — they are automatically included by the SDK.
  4. 04

    3. Error Handling

    Always wrap function calls in try-catch and check for FirebaseFunctionsException:

    Handle network connectivity issues and timeouts appropriately.Provide meaningful error messages to users when function calls fail.Implement retry logic with exponential backoff for transient errors (unavailable, deadline-exceeded).

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score85/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars604SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
evanca/flutter-ai-rules
Skill path
skills/firebase-cloud-functions/SKILL.md
Commit
b294a77b68b5508f8d3151fb93d87ed9622d2ff1
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Firebase Cloud Functions Skill

This skill defines how to correctly call Firebase Cloud Functions from Flutter applications.

When to Use

Use this skill when:

  • Implementing callable Cloud Functions in a Flutter project.
  • Passing structured data to server-side functions and processing results.
  • Handling errors, timeouts, and retries for function calls.
  • Configuring region-specific function deployments.
  • Testing Cloud Functions locally with the Firebase Emulator Suite.

1. Setup and Configuration

flutter pub add cloud_functions
import 'package:cloud_functions/cloud_functions.dart';

// After Firebase.initializeApp():
final functions = FirebaseFunctions.instance;
  • Initialize Firebase before using any Cloud Functions features.
  • For region-specific deployments, specify the region:
final functions = FirebaseFunctions.instanceFor(region: 'europe-west1');
  • Deploy callable functions to Firebase before attempting to call them from the Flutter app.
  • Consider implementing App Check to prevent abuse of Cloud Functions.

2. Calling Functions

Use httpsCallable to reference a function, then call to invoke it:

final result = await FirebaseFunctions.instance
  .httpsCallable('functionName')
  .call(data);
  • Pass data as a Map — it is automatically serialized to JSON:
final result = await FirebaseFunctions.instance
  .httpsCallable('addMessage')
  .call({
    "text": messageText,
    "push": true,
  });
  • Access the result via the data property — it is automatically deserialized from JSON:
final responseData = result.data;
// Cast to expected type if needed:
final message = result.data as Map<String, dynamic>;
final status = message['status'] as String;
  • Do not pass authentication tokens in function parameters — they are automatically included by the SDK.
  • Keep function names consistent between client code and server-side implementations.

3. Error Handling

Always wrap function calls in try-catch and check for FirebaseFunctionsException:

try {
  final result = await FirebaseFunctions.instance
    .httpsCallable('functionName')
    .call(data);
  // Handle successful result
} on FirebaseFunctionsException catch (e) {
  switch (e.code) {
    case 'not-found':
      // Function does not exist
      break;
    case 'permission-denied':
      // User lacks permission
      break;
    case 'unavailable':
      // Service temporarily unavailable — retry
      break;
    default:
      debugPrint('Function error [${e.code}]: ${e.message}');
  }
} catch (e) {
  debugPrint('Unexpected error: $e');
}
  • Handle network connectivity issues and timeouts appropriately.
  • Provide meaningful error messages to users when function calls fail.
  • Implement retry logic with exponential backoff for transient errors (unavailable, deadline-exceeded).

4. Performance Optimization

Set a timeout appropriate to the expected execution time:

final callable = FirebaseFunctions.instance.httpsCallable(
  'functionName',
  options: HttpsCallableOptions(
    timeout: const Duration(seconds: 30),
  ),
);
  • Minimize the amount of data passed to and from functions to reduce latency.
  • Use batch operations when possible to reduce the number of function calls.
  • Consider client-side caching for frequently used function results.
  • Account for cold starts for infrequently used functions.
  • Implement proper loading states in the UI while waiting for function responses.

5. Testing and Development

Use the Firebase Emulator Suite for local development and testing:

FirebaseFunctions.instance.useFunctionsEmulator('localhost', 5001);
  • Test functions with both valid and invalid inputs to ensure proper validation.
  • Verify that functions handle authentication correctly.
  • Test with different user roles and permissions to ensure proper access control.
  • Implement unit tests for client-side function calling logic.

References

Alternatives

Compare before choosing

Computed 10042,968

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10023,781

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1004,922

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 100165

JasonColapietro/suede-creator-skills

suede-ab-testing

Suede-owned experimentation discipline for hypotheses, sample sizing, test duration, significance, and repeatable experiment programs. Use when comparing variants, deciding whether a result is reliable, or building an experiment backlog and cadence. NOT FOR: analytics instrumentation (use suede-analytics), post-click conversion diagnosis (use suede-site-alchemy), or writing the variant copy itself (use suede-copy).