
Flags Sdk
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
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.localcredentials, and createsflags.tsand the Explorer route - Designed for code-level work; flag planning, the
vercel flagsCLI, and archiving or deleting flags belong to thevercel-flagsskill
Install
$ npx -y skills add vercel/flags --skill flags-sdk -yInstalls 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.
- Docs: https://flags-sdk.dev
- Repo: https://github.com/vercel/flags
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
flagsvercel/next.js900 installsStep-by-step guide for wiring a new or changed Next.js experimental flag from type declaration through runtime bundles.
feature-flags-nextjsposthog/skills139 installsSetup guide for PostHog feature flags in Next.js, covering client hooks, server evaluation, and flag management.
launchdarkly-flag-createlaunchdarkly/ai-tooling2.5K installsGuided creation of LaunchDarkly feature flags that first mirrors the codebase's existing flag patterns, naming, and defaults.
nextjs-on-cloudflarecloudflare/skills60.4K installsBuild and deploy Next.js apps on Cloudflare Workers with vinext, not OpenNext, for new projects.