mcpbeat Sign in

Firebase App Check Agent Skill

Use when implementing app attestation, configuring App Check providers, setting up debug tokens, enabling backend enforcement, or managing token refresh.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
604
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/evanca/flutter-ai-rules --skill firebase-app-check

The instruction itself

12 sections, as written by the author

Firebase App Check Skill

This skill defines how to correctly implement Firebase App Check in Flutter applications, covering provider selection, debug configuration, enforcement rollout, and security hardening.

When to Use

Use this skill when:

  • Setting up and activating Firebase App Check in a Flutter project.
  • Selecting the right attestation provider for each platform.
  • Configuring debug providers for development, testing, and CI.
  • Enabling enforcement and monitoring App Check metrics.
  • Implementing token refresh handling and custom TTL configuration.

1. Setup and Configuration

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

Initialize App Check after Firebase.initializeApp() and before using any Firebase services:

await Firebase.initializeApp();
await FirebaseAppCheck.instance.activate(
  webProvider: ReCaptchaV3Provider('recaptcha-v3-site-key'),
  androidProvider: AndroidProvider.playIntegrity,
  appleProvider: AppleProvider.deviceCheck,
);

Setup Checklist

  • Register apps in the Firebase console under Project Settings > App Check.
  • For web, obtain a reCAPTCHA v3 site key from the Firebase console.
  • Confirm activation completes before any Firestore, Storage, or RTDB calls.
  • Consider setting a custom TTL — shorter TTLs are more secure but consume quota faster.

2. Provider Selection

Android:

| Provider | Use case |

|---|---|

| AndroidProvider.playIntegrity | Production (default) |

| AndroidProvider.debug | Development / CI only |

Apple (iOS / macOS):

| Provider | Use case |

|---|---|

| AppleProvider.deviceCheck | Production default (iOS 11+, macOS 10.15+) |

| AppleProvider.appAttest | Enhanced security (iOS 14+, macOS 14+) |

| AppleProvider.appAttestWithDeviceCheckFallback | App Attest with Device Check fallback |

| AppleProvider.debug | Development / CI only |

Web:

| Provider | Use case |

|---|---|

| ReCaptchaV3Provider | Standard reCAPTCHA v3 |

| ReCaptchaEnterpriseProvider | Enhanced with additional features |

> Android note: For certain Android devices, enable "Meets basic device integrity" in the Google Play console to ensure proper App Check functionality.


3. Development and Testing

Use debug providers during development to run in emulators or CI environments:

await Firebase.initializeApp();
await FirebaseAppCheck.instance.activate(
  androidProvider: AndroidProvider.debug,
  appleProvider: AppleProvider.debug,
);

Platform-Specific Debug Setup

iOS: Enable debug logging by adding -FIRDebugEnabled to Arguments Passed on Launch in Xcode. The debug token appears in the console output.

Android: The debug token prints to logcat on first run. Filter by DebugAppCheckProvider.

Web: Set self.FIREBASE_APPCHECK_DEBUG_TOKEN = true; in web/index.html before Firebase scripts load.

Register Debug Tokens

  • Copy the debug token from the device/emulator console output.
  • In the Firebase console, navigate to App Check > Apps > Manage debug tokens.
  • Add the token. It is immediately active for that app.

Token Listener for Custom Backends

FirebaseAppCheck.instance.onTokenChange.listen((token) {
  // Attach token to custom backend requests
  // e.g., set as Authorization header
});
  • Never use debug providers or share debug tokens in production builds.
  • Keep debug tokens private — do not commit them to public repositories.
  • Revoke compromised debug tokens immediately from the Firebase console.

4. Enforcement Rollout

Follow this sequence to avoid disrupting legitimate users:

  • Deploy App Check activation code to all app versions.
  • Monitor App Check metrics in the Firebase console — wait until most traffic shows valid tokens.
  • Enable enforcement gradually, starting with non-critical Firebase services (e.g., Cloud Storage before Firestore).
  • Verify that unverified request percentage drops to near zero before enforcing on critical services.
  • Once enforcement is enabled, only apps with valid App Check tokens can access protected Firebase resources.
  • Use App Check in combination with Firebase Security Rules for defense in depth.
  • Implement proper error handling for App Check verification failures — surface a user-friendly message rather than a raw error.

5. Security Best Practices

  • Never disable App Check in production builds once enabled.
  • Implement a fallback mechanism for App Check verification failures (e.g., retry with exponential backoff).
  • Regularly review App Check metrics to identify potential abuse patterns.
  • App Check tokens are automatically refreshed at approximately half the TTL duration.
  • For high-security applications, use the shortest practical TTL.
  • Implement server-side verification for critical operations using the Firebase Admin SDK:
// Node.js Admin SDK example for verifying App Check tokens
const appCheckToken = req.header('X-Firebase-AppCheck');
const appCheckClaims = await getAppCheck().verifyToken(appCheckToken);

References

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take evanca/firebase-app-check from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.