firebase-remote-config-basics

작성자: firebase

Firebase Remote Config에 대한 포괄적인 가이드로, 템플릿 관리 및 SDK 사용법을 포함합니다. 사용자가 Remote Config 설정, 기능 플래그 관리, 또는 앱 동작을 동적으로 업데이트하는 데 도움이 필요할 때 이 스킬을 사용하세요.

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의 다른 스킬

resolve-docker-vulnerabilities
firebase
firebase-cli 이미지의 Docker 취약점을 해결하는 스킬입니다. firebase-cli Docker 이미지의 취약점을 확인해야 할 때 이 스킬을 사용하세요.
official
python-expert
firebase
깔끔하고 관용적인 Python을 위한 규칙. Python 소스 파일을 읽거나, 편집하거나, 작성할 때마다 로드하세요.
official
test-writer
firebase
이 워크스페이스의 모듈에 대한 pytest 테스트를 작성하는 방법. 테스트를 작성하거나 확장하려고 할 때마다 로드하세요.
official
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-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