Skip to content
Skill

Flags SDK

Guides an agent to add and configure feature flags in Next.js or SvelteKit with the Flags

Flags SDK is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
5
Last commit
License
MIT
Listing updated

Similar skills

About Flags SDK

This skill walks the agent through installing the Flags SDK and its Vercel adapter, linking a project and pulling environment variables, and setting up the Vercel Toolbar and Flags Explorer discovery route. It also covers declaring flags as typed functions, adding flags that already exist on Vercel, and reading several flags at once with a batched evaluate call instead of sequential awaits.

The instructions cover server-side evaluation, the precompute pattern for keeping pages static behind routing middleware, identify and dedupe helpers for targeting context, and encryption helpers used by Flags Explorer. Other provider adapters such as Statsig, LaunchDarkly and PostHog are documented in reference files, along with custom adapter patterns.

The workflow expects a Next.js or SvelteKit project, a package manager, and the Vercel CLI for linking and environment steps. Changing what a flag serves happens outside the code, in the Vercel dashboard or the vercel flags CLI, which the skill hands off to a companion skill.

When your agent uses it

Implement feature flags in Next.js or SvelteKit code with the Flags SDK (`flags` npm package). Use when installing or configuring the SDK, declaring flags with `flag()`, setting up Project Connections, wiring a provider adapter (`@flags-sdk/vercel`, Statsig, LaunchDarkly, PostHog, GrowthBook, Global Config, OpenFeature, Split, Flagsmith, Reflag, Optimizely, or custom), using `identify`, `dedupe`, or `evaluate`, keeping pages static with precompute, setting up Flags Explorer and the Vercel Toolbar, or encrypting flag values. Triggers: `flags/next`, `flags/sveltekit`, `flags/react`, `@flags-sdk/*`, `vercelAdapter`, precompute. For planning a flag, for Vercel Flags rollouts, experiments, and the `vercel flags` CLI, or for other frameworks, use the `vercel-flags` skill.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 5 files (73 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the better-supabase plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase

Or copy only this skill to ~/.claude/skills/flags-sdk:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/flags-sdk &&
cp -R "$tmp/.agents/skills/flags-sdk/upstream" ~/.claude/skills/flags-sdk &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/flags-sdk inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/flags-sdk to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/flags-sdk &&
cp -R "$tmp/.agents/skills/flags-sdk/upstream" ~/.agents/skills/flags-sdk &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/flags-sdk inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/flags-sdk to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/flags-sdk &&
cp -R "$tmp/.agents/skills/flags-sdk/upstream" ~/.cursor/skills/flags-sdk &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/flags-sdk inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/flags-sdk/upstream

Or copy the folder to ~/.gemini/skills/flags-sdk yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/flags-sdk:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/flags-sdk &&
cp -R "$tmp/.agents/skills/flags-sdk/upstream" ~/.copilot/skills/flags-sdk &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/flags-sdk inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git

Then copy better-supabase/.agents/skills/flags-sdk/upstream into your agent's skills folder as flags-sdk. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Flag declaration
Shows how to declare typed flags as callable functions with keys, defaults and options.
Vercel adapter setup
Covers installing the adapter, linking the project and pulling local credentials.
Flags Explorer wiring
Creates the discovery endpoint and Toolbar so flags can be overridden during development.
Precompute for static pages
Explains encoding flag results into rewritten URLs so pages stay statically cached.
Batched flag evaluation
Recommends a single evaluate call for multiple flags over sequential or parallel awaits.
Targeting with identify
Shows how to resolve request entities with dedupe for per-user flag decisions.

Good for

  • Add a feature flag to a Next.js page and render a variant based on it
  • Set up the Flags SDK and Vercel Toolbar in a SvelteKit project
  • Wire an existing Vercel-managed flag into the code with the right default value
  • Keep a marketing page static while still testing two layout variants
  • Switch a flag declaration from LaunchDarkly or PostHog to another provider adapter

Flags SDK FAQ

Which frameworks does the Flags SDK support?

The skill covers Next.js and SvelteKit. For other frameworks it points to the @vercel/flags-core package instead.

Does Flags SDK change flag rollouts or targeting?

No. Changing what a flag serves happens in the dashboard or with the vercel flags CLI, which belongs to the separate vercel-flags skill.

What does the setup need before Flags SDK runs?

A linked Vercel project, the Vercel CLI installed and authenticated, and the flags and @flags-sdk/vercel packages installed through the project's package manager.

Which provider adapters are documented?

Vercel, Global Config, Statsig, LaunchDarkly, PostHog, GrowthBook, Flagsmith, Reflag, Split, Optimizely and OpenFeature, plus custom adapters.

How do I install Flags SDK in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/flags-sdk to use it in all your projects, or to .claude/skills/flags-sdk in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

Does Flags SDK run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Flags SDK?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Flags SDK?

The closest alternatives to Flags SDK are Flagship, Env vars, Vercel optimize, React frontend and Antfu.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ScaleDockHQ/better-supabase

  1. Apply the CommonMark 0.31.2 spec when parsing or rendering Markdown

    • Open source
    • 5 GitHub stars
    • Files and documents
  2. Publish Agent Cards and run agent-to-agent calls over the A2A 1.0 protocol

    • Open source
    • 5 GitHub stars
    • Developer tools
  3. Lets an agent stream runs, tool calls and shared state to user-facing apps over AG-UI 1.0

    • Open source
    • 5 GitHub stars
    • Developer tools
  4. Lets an AI agent drive Chrome or Chromium through a fast browser automation CLI

    • Open source
    • 5 GitHub stars
    • Browser automation
  5. Guides an agent to write, review and validate SKILL.md skills against the Agent Skills

    • Open source
    • 5 GitHub stars
    • Developer tools
  6. Write, place, migrate and review AGENTS.md instruction files for coding agents

    • Open source
    • 5 GitHub stars
    • Developer tools