New advertisers: 50% off your first month with code FIRSTMONTHSee slots
vercel avatar

Flags Sdk

vercel/flagsOfficial

Setup and usage guide for the Flags SDK (flags npm package) with Next.js and SvelteKit feature flags.

skills.sh installs
2.7K
GitHub stars
631
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers installing and configuring the SDK, declaring flags with flag(), and wiring provider adapters such as @flags-sdk/vercel, Statsig, and LaunchDarkly
  • Includes steps for identify, dedupe, precompute patterns for static pages, Flags Explorer with the Vercel Toolbar, and flag value encryption
  • Runs one-time project setup: installs packages, links to Vercel, pulls .env.local credentials, and creates flags.ts and the Explorer route
  • Designed for code-level work; flag planning, the vercel flags CLI, and archiving or deleting flags belong to the vercel-flags skill

Install

$ npx -y skills add vercel/flags --skill flags-sdk -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Set up and use the Flags SDK

The Flags SDK (flags npm package) is a feature flags toolkit for Next.js and SvelteKit. It turns each feature flag into a callable function, works with any flag provider via adapters, and keeps pages static using the precompute pattern. Vercel Flags is the first-party provider; its adapter is @flags-sdk/vercel.

This skill covers the code. Planning a flag, choosing between the Flags SDK, @vercel/flags-core, and OpenFeature, and managing flags in the dashboard or with the vercel flags CLI belong to the vercel-flags skill. Archiving a flag, deleting it, or removing a variant requires the checks in that skill (remove the code first, confirm no evaluations over the Skew Protection window, archive before rm); do not run those commands without it. If it is not available, suggest npx skills add vercel/flags@vercel-flags (do not auto-install) and run vercel flags <cmd> --help in the meantime. For a project on another framework, @vercel/flags-core replaces this SDK (Core SDK).

Details

Repository
github.com/vercel/flags
Categories
Frontend & UI Code, Backend & APIs
First seen
Apr 16, 2026

Similar to Flags Sdk

More Frontend & UI Code