AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Firebase Crashlytics

skill-evanca-flutter-ai-rules-firebase-crashlytics · by evanca

Use when implementing crash reporting, capturing fatal/non-fatal errors, recording isolate/async exceptions, customizing reports, or uploading obfuscated symbols.

No reviews yet
0 installs
12 views
0.0% view→install

Install

$ agentstack add skill-evanca-flutter-ai-rules-firebase-crashlytics

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-evanca-flutter-ai-rules-firebase-crashlytics)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
11d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Firebase Crashlytics? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Firebase Crashlytics Skill

This skill defines how to correctly use Firebase Crashlytics in Flutter applications.

When to Use

Use this skill when:

  • Implementing crash reporting in a Flutter project.
  • Capturing fatal errors, non-fatal exceptions, and async/isolate errors.
  • Customizing crash reports with keys, logs, and user identifiers.
  • Configuring opt-in data collection or disabling reporting in debug builds.
  • Uploading symbol files for obfuscated builds.

1. Setup and Configuration

flutter pub add firebase_crashlytics
flutter pub add firebase_analytics  # enables breadcrumb logs for better crash context

Run flutterfire configure to update the Firebase configuration and add the required Crashlytics Gradle plugin for Android.

import 'package:firebase_crashlytics/firebase_crashlytics.dart';

Obfuscated code:

  • For apps built with --split-debug-info and/or --obfuscate, upload symbol files for readable stack traces.
  • iOS: Flutter 3.12.0+ and Crashlytics Flutter plugin 3.3.4+ handle symbol upload automatically.
  • Android: Use Firebase CLI (v11.9.0+) to upload Flutter debug symbols:
firebase crashlytics:symbols:upload --app=FIREBASE_APP_ID PATH/TO/symbols

2. Error Handling

Configure comprehensive error capture in main() to catch errors from all sources:

Fatal Flutter errors:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();

  // Pass all uncaught fatal errors from the framework to Crashlytics
  FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;

  // Catch async errors not handled by the Flutter framework
  PlatformDispatcher.instance.onError = (error, stack) {
    FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
    return true;
  };

  runApp(MyApp());
}

Non-fatal Flutter errors: use recordFlutterError instead of recordFlutterFatalError.

Isolate errors:

Isolate.current.addErrorListener(RawReceivePort((pair) async {
  final List errorAndStacktrace = pair;
  await FirebaseCrashlytics.instance.recordError(
    errorAndStacktrace.first,
    errorAndStacktrace.last,
    fatal: true,
  );
}).sendPort);

Caught exceptions (non-fatal):

await FirebaseCrashlytics.instance.recordError(
  error,
  stackTrace,
  reason: 'a non-fatal error',
  information: ['further diagnostic information about the error', 'version 2.0'],
);
  • Crashlytics only stores the most recent 8 non-fatal exceptions per session — older ones are discarded.

3. Crash Report Customization

Custom keys (max 64 key/value pairs, up to 1 kB each):

FirebaseCrashlytics.instance.setCustomKey('str_key', 'hello');
FirebaseCrashlytics.instance.setCustomKey('bool_key', true);
FirebaseCrashlytics.instance.setCustomKey('int_key', 1);

Custom log messages (limit: 64 kB per session):

FirebaseCrashlytics.instance.log("User tapped on payment button");

User identifier:

FirebaseCrashlytics.instance.setUserIdentifier("user-123");
// Clear by setting to blank string
FirebaseCrashlytics.instance.setUserIdentifier("");
  • Avoid putting unique values (user IDs, timestamps) directly in exception messages — use custom keys instead.

4. Performance and Optimization

  • Crashlytics processes exceptions on a dedicated background thread to minimize performance impact.
  • Fatal reports are sent in real-time without requiring an app restart.
  • Non-fatal reports are written to disk and sent with the next fatal report or on app restart.
  • Use breadcrumb logs (requires Firebase Analytics) to understand user actions leading up to a crash.

Disable Crashlytics in debug builds:

if (kReleaseMode) {
  await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
} else {
  await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(false);
}

5. Testing and Debugging

Force a test crash to verify the setup:

FirebaseCrashlytics.instance.crash();

Verification workflow:

  1. Build and run the app in release mode.
  2. Trigger the test crash.
  3. Reopen the app so the crash report is uploaded.
  4. Check the Firebase Console Crashlytics dashboard within 5 minutes.
  5. Verify that custom keys, logs, and user identifiers appear on the crash report.
  • Verify stack traces are properly symbolicated when using code obfuscation.

6. Opt-in Reporting

By default, Crashlytics automatically collects crash reports for all users.

To give users control over data collection:

  • Disable automatic reporting and enable it only via setCrashlyticsCollectionEnabled(true) when users opt in.
  • The override value persists across all subsequent app launches.
  • To opt a user out, pass false — this applies from the next app launch.
  • When disabled, crash info is stored locally; if later enabled, locally stored crashes are sent to Crashlytics.

References

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.