evanca/firebase-remote-config
Use when implementing feature flags, running A/B tests, setting parameter defaults, fetching/activating config, or enabling real-time config updates.
npx skills add https://github.com/evanca/flutter-ai-rules --skill firebase-remote-config
This skill defines how to correctly use Firebase Remote Config in Flutter applications.
Use this skill when:
flutter pub add firebase_remote_config
flutter pub add firebase_analytics # required for conditional targeting of app instances
import 'package:firebase_remote_config/firebase_remote_config.dart';
final remoteConfig = FirebaseRemoteConfig.instance;
Configure settings:
await remoteConfig.setConfigSettings(RemoteConfigSettings(
fetchTimeout: const Duration(minutes: 1),
minimumFetchInterval: const Duration(hours: 1),
));
Set in-app defaults (ensures the app behaves as intended before connecting to the backend):
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:
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");
login_timeout, login_attempts_max).await remoteConfig.fetchAndActivate();
fetchAndActivate() to fetch and apply values in a single call.fetch() then activate() separately to control when values take effect.remoteConfig.lastFetchStatus to determine if the fetch was successful, failed, or throttled.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
}
});
await remoteConfig.setConfigSettings(RemoteConfigSettings(
fetchTimeout: const Duration(minutes: 1),
minimumFetchInterval: const Duration(minutes: 5),
));
Take evanca/firebase-remote-config from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
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.