firebase/firebase-crashlytics

Firebase Crashlyticsの包括的なガイドです。プロビジョニングとSDKの使用方法を解説します。ユーザーがCrashlyticsのセットアップ、クラッシュレポートの追加、またはアプリケーションでのCrashlytics SDKの使用について支援を必要とする場合に、このスキルを使用します。

firebase-crashlytics とは?

このスキルは、Firebase Crashlyticsの導入と運用を支援するための包括的なガイドです。Firebase Crashlyticsは、アプリのクラッシュレポートをリアルタイムで収集・分析し、クラッシュの原因を特定するのに役立つツールです。このスキルでは、FirebaseプロジェクトへのCrashlyticsのプロビジョニング設定から、iOS、Android、Flutterなどの主要プラットフォーム向けのCrashlytics SDKの統合方法、さらにカスタムログやユーザー識別子の設定、致命的ではないエラーの記録方法までを詳細に解説します。開発者は、このスキルを参照することで、アプリの安定性を向上させ、ユーザー体験を向上させるためのクラッシュレポート機能を効率的に実装できます。Firebase Consoleと連携したダッシュボードでの分析や、リアルタイムの通知設定についてもガイドしており、開発から運用までのワークフローをサポートします。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/firebase/agent-skills/tree/main/skills/firebase-crashlytics

Installed? Explore more 生産性&コラボレーション skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

firebase-crashlytics は何をしますか?

Firebase Crashlyticsの包括的なガイドです。プロビジョニングとSDKの使用方法を解説します。ユーザーがCrashlyticsのセットアップ、クラッシュレポートの追加、またはアプリケーションでのCrashlytics SDKの使用について支援を必要とする場合に、このスキルを使用します。

概要

Firebase Crashlyticsは、アプリのクラッシュをリアルタイムで追跡する、軽量ながら強力なクラッシュレポートツールです。クラッシュの原因を特定し、アプリの安定性を向上させるのに役立ちます。

前提条件

  • Firebaseプロジェクトが作成済みであること
  • Firebase CLIがインストールされていること(必要な場合)
  • 対象プラットフォーム(iOS、Android、Flutter、Unityなど)の開発環境

セットアップ手順

1. FirebaseプロジェクトへのCrashlyticsの追加

Firebase Consoleで、プロジェクトにCrashlyticsを有効にします。詳細な手順は公式ドキュメントを参照してください。

2. SDKのインストール

iOS (Swift/Objective-C)

// CocoaPodsを使用する場合
pod 'Firebase/Crashlytics'

Android (Kotlin/Java)

dependencies {
    // Firebase Crashlytics SDK
    implementation 'com.google.firebase:firebase-crashlytics-ktx'
}

Flutter

dependencies:
  firebase_crashlytics: ^3.3.0

3. 初期化コードの追加

アプリの起動時にFirebaseを初期化した後、Crashlyticsを有効にします。

iOS (Swift)

import Firebase
import FirebaseCrashlytics

FirebaseApp.configure()
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)

Android (Kotlin)

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        FirebaseApp.initializeApp(this)
        FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true)
    }
}

Flutter

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  
  // すべてのエラーをCrashlyticsに渡す
  FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
  runApp(MyApp());
}

クラッシュレポートのテスト

Crashlyticsが正しく設定されていることを確認するために、テスト用のクラッシュを発生させることができます。

iOS

Crashlytics.crashlytics().crash()

Android

FirebaseCrashlytics.getInstance().crash()

Flutter

FirebaseCrashlytics.instance.crash();

カスタムログとキー

クラッシュレポートに追加情報を添付できます。

カスタムログの記録

Crashlytics.crashlytics().log("ユーザーがボタンをタップしました")

カスタムキーの設定

FirebaseCrashlytics.getInstance().setCustomKey("user_level", "premium")

致命的ではないエラーの記録

アプリがクラッシュしなくても、キャッチしたエラーを記録できます。

try {
  // エラーが発生する可能性のあるコード
} catch (e, s) {
  FirebaseCrashlytics.instance.recordError(e, s);
}

ユーザー識別子の設定

クラッシュレポートにユーザー情報を関連付けることができます(プライバシーに注意)。

Crashlytics.crashlytics().setUserID("user123")

ダッシュボードでの分析

Firebase ConsoleのCrashlyticsダッシュボードで、クラッシュの統計情報、スタックトレース、影響を受けたユーザー数を確認できます。また、リアルタイムのアラートを設定することも可能です。

参考リンク


このスキルは、original-repo/firebase-crashlyticsから派生しています。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

firebase/developing-genkit-dart

Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.

firebase/developing-genkit-go

Develop AI-powered applications using Genkit in Go. Use when the user asks to build AI features, agents, flows, or tools in Go using Genkit, or when working with Genkit Go code involving generation, prompts, streaming, tool calling, or model providers.

firebase/developing-genkit-js

Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.

firebase/developing-genkit-python

Develop AI-powered applications using Genkit in Python. Use when the user asks about Genkit, AI agents, flows, or tools in Python, or when encountering Genkit errors, import issues, or API problems.

firebase/firebase-ai-logic

Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.

firebase/firebase-ai-logic-basics

Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.

firebase/firebase-app-hosting-basics

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

firebase/firebase-auth-basics

Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.

firebase/firebase-basics

Provides foundational setup, authentication, and project management workflows for Firebase using the Firebase CLI. Use when checking Firebase CLI version (must use 'npx -y firebase-tools@latest --version'), initializing a Firebase environment, authenticating, setting active projects, or setting up `google-services.json` or `GoogleService-Info.plist` files.

firebase/firebase-data-connect

Builds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL securely. Use when designing schemas with tables and relations, writing authorized queries and mutations, configuring real-time data updates, or generating type-safe SDKs. Use when you need a relational database with Firebase, or when the user mentions SQL Connect or Data Connect.

firebase/firebase-firestore

Sets up, manages, and executes queries against Cloud Firestore database instances, including advanced native full-text search and relational joins using pipelines. You MUST unconditionally activate this skill if you plan to use Firestore in any way. Use when listing or creating Firestore databases, configuring security rules, designing data models, writing client SDK queries (including search/joins), or checking indexes.

firebase/firebase-firestore-basics

Comprehensive guide for Firestore basics including provisioning, security rules, and SDK usage. Use this skill when the user needs help setting up Firestore, writing security rules, or using the Firestore SDK in their application.

firebase/firebase-firestore-enterprise-native-mode

Comprehensive guide for Firestore enterprise native including provisioning, data model, security rules, and SDK usage. Use this skill when the user needs help setting up Firestore Enterprise with the Native mode, writing security rules, or using the Firestore SDK in their application.

firebase/firebase-firestore-standard

Comprehensive guide for Firestore Standard Edition, including provisioning, security rules, and SDK usage. Use this skill when the user needs help setting up Firestore, writing security rules, or using the Firestore SDK in their application.

firebase/firebase-hosting-basics

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

firebase/firebase-local-env-setup

Bare minimum INITIAL setup for getting started with Firebase (Node.js, CLI installation, first-time login). Use ONLY for first-time setup. For updating, troubleshooting, or refreshing an existing environment, use the firebase-basics skill instead.

firebase/firebase-remote-config-basics

Comprehensive guide for Firebase Remote Config, including template management and SDK usage. Use this skill when the user needs help setting up Remote Config, managing feature flags, or updating app behavior dynamically.

firebase/firebase-security-rules-auditor

A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.

firebase/firestore-security-rules-auditor

A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.

firebase/xcode-project-setup

Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).

関連スキル