firebase-remote-config — Claude Code & Codex skill
A Flutter skill that keeps the agent on track with Firebase Remote Config: feature flags, in-app defaults, A/B tests and live config updates.
MIT ★ 674 updated 2026-10-29
/plugin marketplace add evanca/flutter-ai-rules
/plugin install flutter-ai-skills@flutter-ai-rulesWhat firebase-remote-config does
The skill sets out how the agent should wire Remote Config into a Flutter app: SDK settings, in-app defaults, typed getters, fetching and activating, live updates. Sections cover package setup, parameter naming and testing.
Two packages go in — firebase_remote_config and, when you target audiences, firebase_analytics. Analytics has to be switched on in the Firebase project, or conditional targeting has nothing to match on. Keys and values are readable by end users, so secrets stay out of them.
Platform limits are spelled out. Real-time updates do not exist on Web, macOS needs Keychain Sharing enabled in Xcode, and frequent fetches get throttled: the production interval is 12 hours by default, and a shorter one is suggested for debug builds only. A failed fetch falls back to the defaults you set.
What it helps with
- ship a feature flag without a new app release
- set in-app defaults so screens render before the first fetch
- pull remote values and apply them in a single call
- run an A/B test across user segments
- stay clear of fetch throttling and quota limits
Example prompts for the agent
- Add a
feature_new_onboardingflag with Firebase Remote Config and read it in the widget - Set defaults for the parameters and handle
lastFetchStatusafterfetchAndActivate - Wire
onConfigUpdatedso the screen refreshes when config changes
How to install firebase-remote-config
1Plugin marketplace
/plugin marketplace add evanca/flutter-ai-rules/plugin install flutter-ai-skills@flutter-ai-rulesThis installs the whole flutter-ai-skills plugin with all its skills
2Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-remote-config -a claude-code3Manually: put the files in place
~/.claude/skills/firebase-remote-config/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/firebase-remote-config/
1Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-remote-config -a codex2Manually: put the files in place
.agents/skills/firebase-remote-config/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-remote-config -a cursor2Manually: put the files in place
.cursor/skills/firebase-remote-config/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install evanca/flutter-ai-rules skills/firebase-remote-config2Manually: put the files in place
.github/skills/firebase-remote-config/SKILL.md1Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-remote-config -a gemini-cli2Platform CLI
gemini skills install https://github.com/evanca/flutter-ai-rules --path skills/firebase-remote-configManually: put the files in place
.devin/skills/firebase-remote-config/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about firebase-remote-config
How do I install firebase-remote-config in Claude Code?
Add the marketplace with /plugin marketplace add evanca/flutter-ai-rules, then install the bundle: /plugin install flutter-ai-skills@flutter-ai-rules. The skill file lands at ~/.claude/skills/firebase-remote-config/SKILL.md.
What does firebase-remote-config do?
It gives the agent rules for Firebase Remote Config in Flutter: installing packages, setting defaults, reading values with typed getters, calling fetchAndActivate, handling live updates and checking throttling.
Does real-time Remote Config work everywhere?
No — it is not available on Web. On macOS you also have to enable Keychain Sharing in Xcode before the SDK works as described.
Source text
SKILL.md · MIT
---
name: firebase-remote-config
description: "Use when implementing feature flags, running A/B tests, setting parameter defaults, fetching/activating config, or enabling real-time config updates."
license: MIT
---
# Firebase Remote Config Skill
This skill defines how to correctly use Firebase Remote Config in Flutter applications.
## When to Use
Use this skill when:
* Implementing feature flags or remote configuration without deploying app updates.
* Managing parameter defaults and fetching remote values.
* Implementing real-time config updates for instant changes.
* Setting up A/B testing or conditional targeting for user segments.
---
## 1. Setup and Configuration
```
flutter pub add firebase_remote_config
flutter pub add firebase_analytics # required for conditional targeting of app instances
```
```dart
import 'package:firebase_remote_config/firebase_remote_config.dart';
final remoteConfig = FirebaseRemoteConfig.instance;
```
- Enable **Google Analytics** in the Firebase project for user property and audience targeting.
- Ensure the **Remote Config REST API** is not disabled — the SDK depends on it.
- For **macOS**, enable Keychain Sharing in Xcode.
**Configure settings:**
```dart
await remoteConfig.setConfigSettings(RemoteConfigSettings(
fetchTimeout: const Duration(minutes: 1),
minimumFetchInterval: const Duration(hours: 1),
));
```
---
## 2. Parameter Management
**Set in-app defaults** (ensures the app behaves as intended before connecting to the backend):
```dart
await remoteConfig.setDefaults(const {
"feature_new_onboarding": false,
"max_retry_attempts": 3,
"welcome_message": "Hello, world!",
"promo_discount_pct": 0.0,
});
```
**Read values with type-specific getters:**
```dart
final showNewOnboarding = remoteConfig.getBool("feature_new_onboarding");
final maxRetries = remoteConfig.getInt("max_retry_attempts");
final welcomeMsg = remoteConfig.getString("welcome_message");
final discount = remoteConfig.getDouble("promo_discount_pct");
```
- **Never** store confidential data in Remote Config keys or values — they can be accessed by end users.
- Define parameters with the **same names** in the Firebase console as those in the app.
- Group related parameters with common prefixes (e.g., `login_timeout`, `login_attempts_max`).
---
## 3. Fetching and Activating
```dart
await remoteConfig.fetchAndActivate();
```
- Use `fetchAndActivate()` to fetch and apply values in a single call.
- Alternatively, call `fetch()` then `activate()` separately to control when values take effect.
- Activate fetched values at appropriate times (e.g., app start) for a smooth user experience.
- Check `remoteConfig.lastFetchStatus` to determine if the fetch was successful, failed, or throttled.
- Handle fetch failures gracefully — default values are used automatically when fetch fails.
---
## 4. Real-time Updates
```dart
remoteConfig.onConfigUpdated.listen((event) async {
await remoteConfig.activate();
// event.updatedKeys contains the changed parameter names
if (event.updatedKeys.contains("feature_new_onboarding")) {
// Refresh UI based on the new value
}
});
```
- Real-time Remote Config is **not available for Web**.
- Update UI state when new configuration values are activated.
- Ensure real-time updates do not disrupt the user experience mid-flow.
---
## 5. Throttling and Performance
- Fetch calls are **throttled** if an app fetches too frequently.
- Default minimum fetch interval in production: **12 hours**.
- For development, use a shorter interval — but only in debug builds:
```dart
await remoteConfig.setConfigSettings(RemoteConfigSettings(
fetchTimeout: const Duration(minutes: 1),
minimumFetchInterval: const Duration(minutes: 5),
));
```
- Be mindful of **service-side quota limits** with a large user base.
---
## 6. Testing and Debugging
- Use **conditional values** in the Firebase console to test configurations without new app deployments.
- Implement **A/B testing** with different parameter values for different user segments.
- Test the app with both default and remote values.
- Verify graceful handling of configuration changes at runtime.
- Test **offline behavior** to ensure proper fallback to defaults.
---
## References
- [Firebase Remote Config Flutter documentation](https://firebase.google.com/docs/remote-config/get-started?platform=flutter)
© Ivanna Kaceviča · MIT · evanca/flutter-ai-rules