feature-flags
하는 일
이 스킬은 Agent-Native 앱에 기능 플래그를 선언하고, 선택한 사용자, 조직, 비율에 대해 켜는 방법을 설명합니다. 오래된 플래그를 제거하는 방법도 다룹니다. 기능을 단계적으로 출시하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓새 기능을 먼저 소수의 사용자에게 공개하고 나중에 넓히고 싶을 때.
- ✓새 배포 없이 특정 조직에 기능을 켜야 할 때.
- ✓컴파일 시점의 스위치를 안전하게 바꿀 수 있는 런타임 플래그로 바꿔야 할 때.
스킬 링크
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/feature-flags/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“파일럿 고객에게만 새 보고서 빌더를 켜 두고, 나중에 전체로 켤 수 있도록 플래그를 추가해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 공유 코드에 플래그를 선언하고, 보호된 액션 전에 서버에서 플래그를 확인하며, Analytics 제어 플레인에서 출시 상태를 관리합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Feature Flags
A feature flag is a boolean declared in app code, evaluated locally by Core, and managed from the Analytics fleet control plane. Code owns whether a flag exists. Runtime settings own only its rollout state.
Flags let an app deploy dormant code and turn it on in the real environment without another deployment. They are not experiments: do not add variants, hypotheses, conversion metrics, exposure tracking, or lifecycle states.
When to use one
Use a flag for a reversible rollout of a user-facing capability whose dormant code is safe to deploy. Flags are useful for production dogfooding, exact-user or organization pilots, and deterministic percentage rollouts.
Do not use a flag for authentication, authorization, secrets, audit enablement, SSR cache behavior, or another security boundary. Client hiding is presentation only; every guarded server action must evaluate the same registered flag.
Agent workflow
1. Declare
Keep definitions in a shared TypeScript module so server and client code use the same stable key. Flags are boolean and default-off.
import { defineFeatureFlag } from "@agent-native/core/feature-flags/registry";
export const FULL_APP_BUILDING = defineFeatureFlag({
key: "full-app-building",
displayName: "Full app building",
description: "Create and edit Fusion-backed applications.",
});
Never import defineFeatureFlag from @agent-native/core/feature-flags.
That barrel is server evaluation (isFeatureFlagEnabled) plus store code;
Vite will follow it into the browser and crash the page. Plugin and A2A auth
helpers live on @agent-native/core/server (or
@agent-native/core/feature-flags/server).
Keys are immutable, never reused, and contain only letters, numbers, dots, underscores, or hyphens. Prefer a concise app-owned name. Do not create flag definitions or rollout rows from Analytics.
2. Register
Register app definitions from a Nitro plugin before actions are discovered. Do not add app-specific flags to a Core registry.
import { createFeatureFlagsPlugin } from "@agent-native/core/server";
import { FULL_APP_BUILDING } from "../../shared/feature-flags.js";
export default createFeatureFlagsPlugin({ flags: [FULL_APP_BUILDING] });
Definitions live in one process-wide registry (a globalThis symbol in
feature-flags/registry.ts, like the labs registry). In local dev the plugin
can load core from source while actions load the built package; a
module-local map gave each copy its own registry, so get-feature-flags saw
no definitions and every flag read as off. Keep the shared registry when
touching that module.
3. Guard server and client
The server action is the enforcement boundary:
import { isFeatureFlagEnabled } from "@agent-native/core/feature-flags";
run: async (args, ctx) => {
if (!(await isFeatureFlagEnabled(FULL_APP_BUILDING, ctx))) {
throw new Error("Full app building is not enabled for this account.");
}
// guarded operation
}
Use the client hook only to hide or reveal hydrated UI:
import { useFeatureFlag } from "@agent-native/core/client/feature-flags";
const enabled = useFeatureFlag(FULL_APP_BUILDING.key);
return enabled ? <FullAppOption /> : null;
The client hook intentionally returns false while loading or for an unknown
flag. Never replace that fail-closed behavior with app-local bucketing or a
compile-time fallback. When the flag-off UI must not flash before the answer
arrives (a whole page swaps on the flag), use useFeatureFlagState(key): it
returns
{ status: "loading" | "ready" | "unavailable", enabled }, so the surface can
hold a layout-matching skeleton while status is "loading". Never evaluate personalized flags in the public SSR
shell; it is shared and cached for every visitor.
4. Verify and roll out
- Verify the off path before changing rollout state.
- Confirm the registered flag appears in Analytics → Feature flags for the app and is Off by default.
- Use Enable for me for initial production dogfood.
- Expand to exact emails, organization IDs, or a percentage only from Analytics.
- Confirm the client presentation and authoritative server action agree.
Management contract
Core mounts three actions in registered apps:
| Action | Purpose |
|---|---|
get-feature-flags |
Return the current caller's evaluated boolean values. |
list-feature-flags |
Return definitions and rollout metadata to an authorized operator. |
| `set-fea |
자주 묻는 질문
플래그로 보안 기능을 보호할 수 있나요?
아니요. 이 스킬은 플래그가 인증, 권한 부여, 비밀 값, 감사 설정을 보호하면 안 된다고 말합니다.
플래그와 실험은 같은가요?
아니요. 이 스킬은 플래그는 켜기와 끄기 스위치이며, 변형이나 지표가 있는 실험이 아니라고 말합니다.
UI에서 버튼을 숨기면 기능이 꺼지나요?
아니요. 클라이언트에서 숨기는 것은 표시일 뿐이며, 서버도 같은 플래그를 확인해야 한다고 말합니다.
상세 정보
작성자의 원본 설명
Declare, evaluate, manage, and remove framework feature flags. Use when shipping a capability gradually, targeting users or organizations, or replacing a compile-time rollout switch with a production-safe runtime flag.
repo: BuilderIO/agent-native
인기도
- GitHub 스타
- 7.6k
- 순위
- #13159
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
design-exploration
7.6k에이전트가 여러 UI 디자인 방향을 나란히 보여 주고, 사용자가 하나를 고르면 그 디자인을 다듬도록 돕습니다.
visual-edit
7.6k에이전트가 실행 중인 로컬 앱을 시각 편집기에 열어, 실제 화면을 함께 검토하고 편집하도록 돕습니다.
turn-into-app
7.6k워크플로, 스프레드시트 또는 프로젝트를 데이터가 채워진 세련된 시각 앱으로 바꾸고, 컨트롤 뒤에서 에이전트가 작업하도록 합니다.
visual-plan
7.6k일반 텍스트 계획을 다이어그램, 파일 맵, 코드 조각, 열린 질문이 담긴 대화형 시각 계획으로 바꿔 줍니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.