flags-sdk

Installation
SKILL.md

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, letting you manage flags from the Vercel dashboard or the vercel flags CLI.

When the user asks to install, configure, or set up feature flags, follow Set up the SDK (including vercel env pull when .env.local is missing). When they ask to create or add a flag, follow Create a flag. A request is CLI-only when the user asks to inspect, create, or change a remote flag and the request involves no code; then follow CLI-only flag management. Inside an app repository, treat an ambiguous request as the full flow. Do not leave CLI steps as "next steps" for the user — execute them yourself.

Core concepts

Flags as code

Each flag is declared as a function. No string keys at call sites:

import { flag } from 'flags/next';
Installs
2.3K
Repository
vercel/flags
GitHub Stars
622
First Seen
Feb 27, 2026
flags-sdk — vercel/flags