firebase-remote-config-basics

작성자: firebase

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.

npx skills add https://github.com/firebase/agent-skills --skill firebase-remote-config-basics

Remote Config

This skill provides a complete guide for getting started with Remote Config on Android or iOS. Remote Config allows you to change the behavior and appearance of your app without publishing an app update by maintaining a cloud-based configuration template.

Prerequisites

Provisioning Remote Config requires both a Firebase project and a Firebase app, either Android or iOS. To manage the Remote Config template and conditions via the command line, use the Firebase CLI. See the firebase-basics skill for references on project initialization.

Troubleshooting Execution

Handling npx 403 Forbidden Errors

If npx -y firebase-tools@latest fails due to registry permissions (403 error):

  1. Inform the user: "I am unable to fetch the latest Firebase tools via npx due to a registry error."
  2. Fallback: Attempt to use the local firebase command directly if the user confirms it is installed globally (npm install -g firebase-tools).

Handling Project Context Issues

If a command fails because "no active project is selected":

  1. Check login: Run npx -y firebase-tools@latest login:list.
  2. Prompt for ID: If logged in but no project is active, ask the user: "Please provide your Firebase Project ID to proceed."
  3. Use Flag: Append --project <PROJECT_ID> to every subsequent command.

SDK Setup

To learn how to set up Remote Config in your application code, choose your platform:

Best Practices and Template Management

Follow these guidelines and use the associated CLI tools to ensure efficient and safe use of Remote Config.

Fetching Strategies

To optimize app performance and user experience, follow these recommended patterns (see Loading Strategies):

  • Load new values for next startup: The most effective pattern is to activate previously fetched values immediately on startup and fetch new values in the background to be used next time. This minimizes user wait time.
  • Real-time Updates: Use the SDK's real-time listener to update the app instantly without a refresh when server-side configuration changes.

Template Management via CLI

Use the following commands to manage your Remote Config template and version history through the terminal:

Template Management via CLI

Use the following commands to manage your Remote Config template and version history through the terminal:

  • Get current template: Save the remote template to a local JSON file for auditing or modification.

    npx -y firebase-tools@latest remoteconfig:get -o remote_config.json
    
  • Autonomous Editing & Discovery : Modify the local remote_config.json directly. Determine the correct signal (e.g., device.country or percent) and update the "conditions" array and "parameters" map accordingly.

  • MANDATORY: User Review and Verification : STOP and ask the user to verify your changes before proceeding to deployment.

    • Action: Inform the user: "I have prepared the changes in remote_config.json. Please review the file for accuracy. Once you are satisfied, tell me to 'deploy' to make the changes live."
  • Deployment Orchestration : To push changes, you must ensure the environment is configured for deployment.

    • Config Mapping: If a firebase.json file is missing, create one to map the local JSON to the Remote Config service:
      { "remoteconfig": { "template": "remote_config.json" } }
    
    • Deploy: Execute the partial deployment command
      npx -y firebase-tools@latest deploy --only remoteconfig
      
  • Verification: After deployment, verify the update by listing the version history.

    npx -y firebase-tools@latest remoteconfig:versions:list
    

The SDK provides a number of features to make your application dynamic and responsive to user segments.

  • Set In-App Defaults: Define baseline values to ensure the app functions offline or before the first fetch.
  • Fetch and Activate: Retrieve values from the Firebase backend and apply them to the local UI/Logic.
  • Template Management: Use the Firebase CLI to version-control, get, and deploy your config JSON files.

firebase의 다른 스킬

developing-genkit-dart
firebase
통합 AI SDK for Dart로 코드 생성, 구조화된 출력, 도구, 플로우 및 에이전트를 지원합니다. 단일 인터페이스로 생성, 도구 정의, 플로우 오케스트레이션, 임베딩 및 스트리밍을 위한 핵심 API를 제공합니다. LLM 제공업체(Google Gemini, Anthropic Claude, OpenAI GPT), Firebase AI, Model Context Protocol, Chrome 브라우저 통합, Shelf를 통한 HTTP 서버 호스팅을 위한 8개 이상의 플러그인을 포함합니다. 플로우 실행, 추적, 모델 실험 등을 위한 로컬 개발 UI가 포함된 내장 CLI를 제공합니다.
official
developing-genkit-go
firebase
Go에서 Genkit을 사용하여 AI 기반 애플리케이션을 개발합니다. 사용자가 Genkit을 사용하여 Go로 AI 기능, 에이전트, 플로우 또는 도구를 구축하거나 작업할 때 사용합니다.
official
developing-genkit-js
firebase
Genkit 플로우, 도구 및 멀티 모델 지원을 통해 AI 기반 Node.js/TypeScript 애플리케이션을 구축합니다. Genkit은 제공자에 구애받지 않으며, 플러그인을 통해 Google AI, OpenAI, Anthropic, Ollama 및 기타 LLM 제공자를 지원합니다. Zod를 사용하여 타입 안전 스키마로 플로우를 정의하고, 생성 요청을 실행하며, TypeScript로 다단계 AI 워크플로우를 구성합니다. Genkit CLI v1.29.0+가 필요하며, 최근 주요 API 변경 사항으로 인해 이전 지식이 아닌 현재 패턴을 위해 genkit docs:read 및 common-errors.md를 참조해야 합니다...
official
developing-genkit-python
firebase
Python에서 Genkit을 사용하여 AI 기반 애플리케이션을 개발합니다. 사용자가 Genkit, AI 에이전트, 플로우 또는 Python 도구에 대해 묻거나 Genkit을 접할 때 사용합니다…
official
firebase-ai-logic
firebase
웹 앱을 위한 클라이언트 측 Gemini 통합으로, 멀티모달 추론, 스트리밍, 온디바이스 하이브리드 실행을 지원합니다. 텍스트 전용 및 멀티모달 입력(이미지, 오디오, 비디오, PDF)을 지원하며, 20MB를 초과하는 파일은 Cloud Storage를 통해 라우팅됩니다. 자동 기록이 포함된 채팅 세션, 실시간 디스플레이를 위한 스트리밍 응답, 구조화된 JSON 출력 적용을 제공합니다. Chrome의 Gemini Nano를 통한 온디바이스 하이브리드 추론을 지원하며, 자동으로 클라우드 실행으로 폴백됩니다. 프로덕션 환경에서는 App Check가 필요합니다...
official
firebase-ai-logic-basics
firebase
Firebase AI Logic(Gemini API)를 웹 애플리케이션에 통합하기 위한 공식 스킬입니다. 설정, 멀티모달 추론, 구조화된 출력 및 보안을 다룹니다.
official
firebase-app-hosting-basics
firebase
Firebase App Hosting을 사용하여 Next.js, Angular 및 기타 지원되는 프레임워크로 풀스택 웹 앱을 배포하고 관리합니다. Firebase 프로젝트가 Blaze 요금제에 있어야 하며, 서버사이드 렌더링(SSR) 및 증분 정적 재생성(ISR) 워크플로를 지원합니다. 백엔드 설정을 위한 선택적 apphosting.yaml과 함께 firebase.json 구성을 통해 배포하거나, GitHub 통합을 통한 자동화된 "git push to deploy"를 활성화할 수 있습니다. 민감한 키에 대한 안전한 접근을 위해 CLI 명령을 통한 비밀 관리 기능을 포함합니다...
official
firebase-auth-basics
firebase
Firebase 인증을 여러 ID 제공업체와 함께 설정하고 데이터 접근 규칙을 보호합니다. 이메일/비밀번호, 전화번호, 익명, 연합 제공업체(Google, Facebook, Twitter, GitHub, Microsoft, Apple) 및 사용자 지정 인증 통합을 지원합니다. 각 인증된 사용자는 Firebase 서비스에 접근하기 위한 고유 ID와 JWT 기반 토큰(단기 ID 토큰 및 장기 갱신 토큰)을 받습니다. Google 로그인, 익명 및 이메일/비밀번호에 대해 CLI를 통해 제공업체를 활성화하고 Firebase Console을 사용합니다...
official