---
name: "openfeature-vendor-agnostic-flags"
description: "Decouple feature flagging code from specific vendors using CNCF OpenFeature SDKs."
metadata:
  author: "OpenFeature"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "use openfeature sdk"
  - "evaluate boolean flag openfeature"
  - "switch feature flag provider"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# OpenFeature Vendor-Agnostic Feature Flag Standard

Implements CNCF OpenFeature: OpenFeature.setProvider(), evaluating boolean and string flags (getBooleanValue, getStringValue), managing evaluation contexts (targeting keys, attributes), and switching providers without code rewrites.

## When to Invoke
Invoke this skill whenever you need to:
- use openfeature sdk
- evaluate boolean flag openfeature
- switch feature flag provider

## Execution SOP & Rules
1. Install SDK: pnpm add @openfeature/server-sdk.
2. Set provider: OpenFeature.setProvider(new MyProvider());
3. Create client: const client = OpenFeature.getClient();
4. Evaluate flag: const isEnabled = await client.getBooleanValue('new-feature', false, { targetingKey: user.id }).

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
