/iac-automation-skills:openfeature-vendor-neutral-feature-flag-standardfrom iac-automation-skills
Guides adopting OpenFeature as a vendor-neutral abstraction layer for feature flags. Covers provider architecture, evaluation context design, hooks, and swapping providers without rewriting call sites.
Ships in iac-automation-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Calling a feature-flag vendor's SDK directly from application code
(ldClient.variation(...), unleash.isEnabled(...)) works fine until
the organization needs to switch vendors, run two providers side by
side during a migration, or simply wants flag-evaluation logic that
doesn't leak a specific vendor's method names and object shapes through
every call site in the codebase. OpenFeature (a CNCF specification
with SDKs for most major languages) solves this the same way SLF4J
solved logging-framework lock-in: application code calls one standard
API (client.getBooleanValue(...), evaluation context, hooks), and a
swappable provider underneath does the actual evaluation against
whichever vendor or homegrown system is configured — LaunchDarkly,
Unleash, Flagsmith, a static config file provider for tests, or an
in-house flag service, all through the identical call-site shape. This
skill covers OpenFeature's provider architecture, evaluation context
design, and hooks — it is the abstraction layer, distinct from
feature-flag-configuration-launchdarkly-and-unleash,
which covers the flag lifecycle, rollout, and kill-switch discipline
within a specific vendor and applies equally whether that vendor sits
behind OpenFeature or is called directly.
Install the OpenFeature SDK and a provider for the current vendor, and set the provider once at application startup — this is the one place vendor-specific configuration lives:
// Node.js: OpenFeature core SDK + the Unleash provider
const { OpenFeature } = require('@openfeature/server-sdk');
const { UnleashProvider } = require('@openfeature/unleash-provider');
await OpenFeature.setProviderAndWait(
new UnleashProvider({
url: 'https://unleash.internal.example.com/api',
appName: 'checkout-service',
instanceId: 'checkout-service-1',
clientKey: process.env.UNLEASH_CLIENT_KEY,
})
);
// swapping to LaunchDarkly later touches only this one setup block,
// not any of the call sites in step 2
const { LaunchDarklyProvider } = require('@openfeature/launchdarkly-provider');
await OpenFeature.setProviderAndWait(
new LaunchDarklyProvider(process.env.LAUNCHDARKLY_SDK_KEY)
);
Evaluate flags through the standard client API, never importing a vendor SDK directly in application/business logic:
const client = OpenFeature.getClient();
const showNewCheckout = await client.getBooleanValue(
'release-new-checkout-flow',
false, // default value if evaluation fails
{ targetingKey: user.id, plan: user.plan }
);
if (showNewCheckout) {
return renderNewCheckout(user);
}
return renderLegacyCheckout(user);
This call site is identical whether the provider underneath is Unleash, LaunchDarkly, or a static-file provider used in tests — the whole point is that this code never needs to change when the provider does.
Design a shared evaluation context shape used consistently across every call site, rather than each call site inventing its own ad hoc context object:
function buildEvaluationContext(user, request) {
return {
targetingKey: user.id, // stable identifier every provider needs
plan: user.plan,
region: request.region,
internalAccount: user.isInternalAccount,
};
}
const context = buildEvaluationContext(user, request);
const showNewCheckout = await client.getBooleanValue('release-new-checkout-flow', false, context);
const useNewProvider = await client.getBooleanValue('release-new-payment-provider', false, context);
A consistent context shape is what actually makes a provider swap painless later — if half the call sites pass ad hoc, inconsistent attribute names, the underlying provider's targeting rules (however they're re-created against a new vendor) have nothing reliable to key on.
Use hooks for cross-cutting behavior around every evaluation — logging, metrics, or tracing span attributes — instead of wrapping every individual call site by hand:
const { OpenFeature } = require('@openfeature/server-sdk');
const loggingHook = {
after: (hookContext, details) => {
logger.info('flag evaluated', {
flag: hookContext.flagKey,
value: details.value,
reason: details.reason,
targetingKey: hookContext.context.targetingKey,
});
},
error: (hookContext, error) => {
logger.error('flag evaluation failed', { flag: hookContext.flagKey, error });
},
};
OpenFeature.addHooks(loggingHook);
A hook registered once at the client (or global) level applies to every subsequent evaluation automatically — this is the OpenFeature equivalent of the "flag evaluation should be observable" guidance in feature-flag-configuration-launchdarkly-and-unleash, implemented once instead of per call site.
Use the in-memory/static-file provider for deterministic tests, rather than mocking the vendor SDK or hitting a real flag service in CI:
const { InMemoryProvider } = require('@openfeature/in-memory-provider');
await OpenFeature.setProviderAndWait(new InMemoryProvider({
'release-new-checkout-flow': { variants: { on: true, off: false }, defaultVariant: 'off', disabled: false },
}));
Testing against the real vendor SDK's mock/test mode still works, but the in-memory provider removes any dependency on that specific vendor's testing conventions from the test suite itself.
Run two providers side-by-side only as a deliberate, time-boxed migration step, using OpenFeature's multi-client support (a named client bound to a specific provider) rather than a permanent dual-provider architecture:
// during a LaunchDarkly -> Unleash migration: the "old" domain still
// reads from LaunchDarkly while newly-migrated flags read from Unleash
await OpenFeature.setProviderAndWait('legacy', new LaunchDarklyProvider(ldKey));
await OpenFeature.setProviderAndWait('unleash', new UnleashProvider({ url, appName }));
const legacyClient = OpenFeature.getClient('legacy');
const newClient = OpenFeature.getClient('unleash');
Treat this dual-provider state as a migration in progress with an end date, not a permanent architecture — the goal is a single provider per environment once the migration completes.
Decide deliberately whether OpenFeature's abstraction is worth it for a given team. The abstraction pays off clearly when a vendor switch or multi-provider period is a real, foreseeable scenario, or when many services across an org need a consistent flag-evaluation interface regardless of which team picked which vendor. It's a real but smaller cost — one more dependency, one more layer to understand — for a single small service with no plausible vendor-switch scenario on the horizon, where calling the vendor SDK directly (per feature-flag-configuration-launchdarkly-and-unleash) may be the simpler, sufficient choice.
getBooleanValue/getStringValue calls by hand across the
codebase.Symptom: A "vendor swap" turns into a large codebase-wide rewrite anyway, despite using OpenFeature. Fix: Some call sites were bypassing OpenFeature and calling the vendor SDK directly (often for a vendor-specific feature OpenFeature's common API doesn't expose, like a vendor's specific experimentation analytics call). Audit for direct vendor SDK imports outside the provider-setup code, and either find the OpenFeature-standard equivalent or explicitly document the vendor-specific escape hatch as a deliberate, isolated exception rather than letting it spread.
Symptom: After swapping providers, targeting rules that worked
correctly under the old vendor evaluate inconsistently or incorrectly
under the new one, even though the flag names match.
Fix: The evaluation context attributes passed at call sites were
never consistent to begin with (step 3) — one part of the codebase
passed plan, another passed tier for the same concept, and the old
vendor's targeting rules happened to tolerate the inconsistency in
ways the new provider's rule engine doesn't. Standardize the
evaluation context shape across the codebase before or during a
provider migration, not after problems surface.
Symptom: A test suite is flaky or slow because it depends on reaching a real flag backend over the network. Fix: Tests are using the real provider instead of the in-memory/ static-file provider (step 5). Swap the provider in test setup/bootstrap code specifically, keeping the real provider only for actual integration tests that deliberately want to exercise the network path.
Symptom: A default value passed to getBooleanValue silently
becomes "the" behavior in production because the provider never
successfully initializes, and nobody notices for a while.
Fix: This mirrors the vendor-level "fail-safe default" pitfall in
feature-flag-configuration-launchdarkly-and-unleash
— a default value is a legitimate fail-safe, but a provider that never
actually connects (a misconfigured Unleash URL, an invalid
LaunchDarkly SDK key) evaluating every single flag to its default is
a silent, standing degradation, not a one-off. Add a hook (step 4) or
provider-status check that alerts specifically when the provider is
in a not-ready/error state, rather than only ever seeing individual
evaluation results.
Symptom: Adding OpenFeature to a small, single-service project with one flag and no foreseeable vendor change adds a dependency and a layer of indirection with no apparent payoff. Fix: This is a case where OpenFeature's abstraction cost may genuinely outweigh its benefit (step 7) — it's not free, and a small project calling a vendor SDK directly per feature-flag-configuration-launchdarkly-and-unleash is a legitimate, simpler choice; reserve OpenFeature for genuine multi-service or plausible-vendor-switch scenarios rather than applying it as a default on every project regardless of size.
Scenario: A platform team standardizes on OpenFeature across services currently split between LaunchDarkly (older services) and Unleash (a newer, cost-motivated self-hosted choice), and plans to consolidate everything onto Unleash within two quarters.
Provider setup (checkout-service, currently on LaunchDarkly, migrating
to Unleash):
const { OpenFeature } = require('@openfeature/server-sdk');
const { LaunchDarklyProvider } = require('@openfeature/launchdarkly-provider');
const { UnleashProvider } = require('@openfeature/unleash-provider');
// Phase 1: still on LaunchDarkly, but already behind OpenFeature
await OpenFeature.setProviderAndWait(new LaunchDarklyProvider(process.env.LAUNCHDARKLY_SDK_KEY));
Application call sites, unaffected by the provider migration:
const client = OpenFeature.getClient();
function buildContext(user, request) {
return { targetingKey: user.id, plan: user.plan, region: request.region };
}
async function chargeCustomer(order, user, request) {
const context = buildContext(user, request);
const useNewProvider = await client.getBooleanValue(
'release-new-payment-provider', false, context
);
return useNewProvider
? newProviderClient.charge(order)
: legacyProviderClient.charge(order);
}
Logging hook registered once, capturing every evaluation regardless of which underlying provider is active:
OpenFeature.addHooks({
after: (hookContext, details) => {
metrics.increment('flag_evaluation', { flag: hookContext.flagKey, value: String(details.value) });
},
});
Migration day: the target environment's flags are recreated in Unleash
with matching targeting rules using the same plan/region context
attributes (consistent because buildContext was shared from the
start), and the provider setup line becomes:
await OpenFeature.setProviderAndWait(
new UnleashProvider({ url: process.env.UNLEASH_URL, appName: 'checkout-service' })
);
No call site, hook, or test in checkout-service changes — the
migration is entirely contained in the one provider-setup block, and
the same in-memory-provider-backed test suite continues to pass
unmodified throughout.
What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/ansible-playbook-and-role-designDesigns and safely runs Ansible playbooks, roles, and inventories for configuration management, including idempotent task design, Ansible Vault for secrets, and choosing config-management (Ansible) versus provisioning (Terraform/CloudFormation) for a given change. Use when the user asks to "write an Ansible playbook/role for X," "structure an Ansible inventory across environments," "make this task idempotent," "encrypt secrets with Ansible Vault," "dry-run a playbook before production," or "should this be Ansible or Terraform."
/aws-cloudformation-templatesAuthors and safely operates AWS CloudFormation templates (YAML/JSON), including stacks, change sets, nested and cross-stack references, StackSets for multi-account/multi-region deployment, and drift detection. Use when the user asks to "write a CloudFormation template for X," "structure nested CloudFormation stacks," "deploy the same stack across AWS accounts/regions," "review a CloudFormation change set before applying," "detect/reconcile drift on a stack," or "migrate/compare CloudFormation with Terraform" for an AWS-native IaC choice.
/chef-puppet-saltstack-legacy-config-managementProvides a comparative overview of Chef, Puppet, and SaltStack for teams maintaining existing legacy configuration-management estates alongside or instead of Ansible — agent-based pull architecture, DSL/resource models (Chef recipes/cookbooks, Puppet manifests/catalogs, Salt states/pillars), and a candid assessment of where each still earns its keep in a modern enterprise versus where it's inertia. Use when the user asks to "maintain this existing Chef/Puppet/Salt estate," "write a Chef recipe/Puppet manifest/Salt state," "should we migrate off Puppet to Ansible," "why is our Puppet run applying a change we didn't expect," or "compare Chef vs. Puppet vs. SaltStack."
/feature-flag-configuration-launchdarkly-and-unleashDesigns and operates feature flag configuration with LaunchDarkly or Unleash, covering flag lifecycle (create, target, roll out, retire), kill-switch patterns for fast incident mitigation without a redeploy, targeting/segmentation rules, and cleaning up stale flag debt before it accumulates into unreadable conditional logic. Use when the user asks to "add a feature flag for X," "set up a kill switch for this feature," "configure LaunchDarkly/Unleash targeting rules," "roll out a flag gradually by percentage," "clean up old feature flags," or "should we use LaunchDarkly or self-host Unleash."
/gremlin-chaos-engineering-configurationConfigures Gremlin-specific chaos engineering attacks — installing the Gremlin agent/sidecar, defining resource, state, and network attacks via the Gremlin API/CLI or Terraform provider, scoping blast radius with targets and halt conditions, and running Gremlin Scenarios for multi-step failure sequences. Use when the user asks to "configure a Gremlin attack," "set up the Gremlin agent in Kubernetes/EC2," "write a Gremlin Scenario," "scope a Gremlin blast radius/halt condition," or "use Gremlin to test our failover." For the general chaos-engineering principles (steady-state hypothesis, game days, tool-agnostic blast radius scoping) this configures against, use the SRE chaos-engineering-and-resilience-testing skill instead.
/infrastructure-post-deployment-validation-and-smoke-testingVerifies that a Terraform apply, CloudFormation deploy, or Ansible playbook run actually produced working infrastructure — resource existence and configuration checks, connectivity/health smoke tests, and automated post-apply assertions — rather than treating a clean "apply succeeded" exit code as proof the system works. Use when the user asks to "verify this deployment actually worked," "write a smoke test after terraform apply/cloudformation deploy," "check the resource is actually reachable/configured correctly post-deploy," "add post-deployment validation to the pipeline," or "our apply succeeded but the service is down."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin iac-automation-skillsOther plugins' skills for the same job