Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

openfeature

БесплатноБез исполняемых скриптовНе проверен

OpenFeature vendor-agnostic feature flag SDK: installation, evaluation, providers. Use when implementing feature flags, A/B testing, or progressive rollouts.

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

OpenFeature SDK Integration

When to Use This Skill

Use this skill when... Use a sibling skill instead when...
You need the vendor-agnostic OpenFeature SDK API, hooks, and evaluation patterns You need the GO Feature Flag (GOFF) self-hosted backend specifics — use go-feature-flag
You are choosing between providers or wiring an OpenFeature client into application code You want to scaffold the full feature-flag stack (SDK + provider + CI) from scratch — use configure-feature-flags
Another skill needs the canonical reference for OpenFeature semantics You want runtime detection of an existing feature-flag setup before changing anything — use configure-feature-flags

Vendor-agnostic feature flag SDK providing standardized API across languages and providers. Use when implementing feature flags, A/B testing, canary releases, or progressive rollouts with any feature flag backend.

Activation triggers

  • User mentions "feature flags", "feature toggles", or "feature management"
  • User asks about A/B testing or canary releases
  • User wants to implement progressive rollouts
  • Project has OpenFeature SDK dependencies
  • User mentions OpenFeature, flagd, or vendor-agnostic flags

Related skills:

  • go-feature-flag - Specific GO Feature Flag provider details
  • launchdarkly - LaunchDarkly provider integration

Core Concepts

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Application Code                          │
├─────────────────────────────────────────────────────────────┤
│                  OpenFeature SDK (API)                       │
│  ┌─────────────┬──────────────┬─────────────┬─────────────┐ │
│  │  getBool()  │  getString() │  getNumber()│  getObject()│ │
│  └─────────────┴──────────────┴─────────────┴─────────────┘ │
├─────────────────────────────────────────────────────────────┤
│                       Provider                               │
│  ┌─────────────────────────────────────────────────────────┐ │
│  │  GO Feature Flag │ flagd │ LaunchDarkly │ Split │ etc  │ │
│  └─────────────────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────────────┤
│                    Flag Source                               │
│  ┌─────────────────────────────────────────────────────────┐ │
│  │   File   │   S3   │  GitHub  │  API  │  ConfigMap      │ │
│  └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Key Components

  1. API - Standardized interface for flag evaluation
  2. Provider - Backend-specific implementation
  3. Evaluation Context - User/request data for targeting
  4. Hooks - Lifecycle extensions for logging, telemetry

SDK Installation

Install the core SDK for the runtime plus one provider package (GO Feature Flag, flagd, or the in-memory provider for tests). Per-language install commands (Node.js server and browser/React, Python, Go, Java, Rust): see references/sdk-installation.md.

Basic Usage Patterns

Initialization

// TypeScript/Node.js
import { OpenFeature } from '@openfeature/server-sdk';
import { GoFeatureFlagProvider } from '@openfeature/go-feature-flag-provider';

// Initialize provider
const provider = new GoFeatureFlagProvider({
  endpoint: process.env.GOFF_RELAY_URL || 'http://localhost:1031',
});

// Set provider (awaitable for ready state)
await OpenFeature.setProviderAndWait(provider);

// Get client
const client = OpenFeature.getClient('my-app');

Flag Evaluation

// Boolean flag
const isEnabled = await client.getBooleanValue('new-feature', false);

// String flag
const buttonColor = await client.getStringValue('button-color', '#000000');

// Number flag
const maxItems = await client.getNumberValue('max-items', 10);

// Object/JSON flag
const config = await client.getObjectValue('feature-config', {});

// With evaluation context
const context = { targetingKey: userId, email: userEmail, groups: ['beta'] };
const isEnabled = await client.getBooleanValue('new-feature', false, context);

Evaluation Context

// Creating context
const context: EvaluationContext = {
  // Required: unique identifier for targeting
  targetingKey: user.id,

  // Optional: additional attributes for targeting rules
  email: user.email,
  groups: user.roles,
  plan: user.subscription,

  // Custom attributes
  country: request.geoip.country,
  browser: request.headers['user-agent'],
};

// Set global context (applies to all evaluations)
OpenFeature.setContext(context);

// Or per-evaluation context
await client.getBooleanValue('feature', false, context);

Hooks

import { Hook, HookContext, EvaluationDetails } from '@openfeature/server-sdk';

// Logging hook
const loggingHook: Hook = {
  before: (hookContext: HookContext) => {
    console.log(`E
Полный SKILL.md на GitHub

Установить openfeature в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(npm install *)
Bash(uv add *)
Bash(go get *)
Read
Write
Edit
Grep
Glob

Вложенные файлы

references/sdk-installation.mdreferences/testing.md

FAQ

Что делает скилл openfeature?

OpenFeature vendor-agnostic feature flag SDK: installation, evaluation, providers. Use when implementing feature flags, A/B testing, or progressive rollouts.

Как установить скилл openfeature?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл openfeature запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить openfeature с