# Flagship

> Flagship is an open-source agent skill for developer tools. Guides agents in building, debugging and reviewing Cloudflare Flagship feature flag code. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/cloudflare/skills/tree/main/skills/flagship
- **Repository:** https://github.com/cloudflare/skills
- **GitHub stars:** 3,545
- **License:** Apache-2.0
- **Skill name:** flagship
- **Collection:** https://github.com/cloudflare/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-30

## About

This skill points the agent at Cloudflare Flagship, a feature flag service whose flags have typed variants and ordered targeting rules evaluated at the edge. It tells the agent to read the matching official documentation page before writing code or CLI commands, since the Flagship API may have changed since the model was trained, and to treat the docs and generated Wrangler types as the source of truth.

The skill covers the Worker binding, OpenFeature SDK providers for TypeScript, Python, Go and Rust, the HTTP evaluation API, and Wrangler commands for managing flags and rules. It includes a gotchas section on local development with an empty flag store, stable bucketing values for percentage rollouts, rule ordering, propagation delay, and how disabling a flag acts as a kill switch.

Using it requires a Cloudflare account and the relevant tokens for remote management, with Evaluate, Read or Write permissions depending on the client. Wrangler, the Vite plugin or the OpenFeature SDK for the target language are needed as well.

## When your agent uses it

> Build, debug, or review code that uses Cloudflare Flagship feature flags from Workers, OpenFeature SDKs, the evaluation API, or Wrangler. Use for the Flagship binding, targeting rules, percentage rollouts and A/B splits, kill switches, local flag stores, and flag-related API tokens.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/cloudflare/skills/tree/HEAD/skills/flagship)
- [License: Apache-2.0](https://github.com/cloudflare/skills/tree/HEAD/skills/flagship)

## Features

- **Binding and SDK guidance:** Explains when to use the Worker binding versus OpenFeature providers and the HTTP evaluation API.
- **Targeting and rollouts:** Covers targeting rules, operators, percentage rollouts and cumulative A/B split thresholds.
- **Wrangler flag management:** Describes creating, rolling out, splitting and toggling flags from the command line.
- **Local development setup:** Shows how to seed local flag stores so dev servers do not return only default values.
- **Token and permission choices:** Distinguishes account-wide and app-scoped API tokens and their Evaluate, Read and Write rights.
- **Debugging unexpected values:** Points to evaluation reasons, error codes and the *Details methods for diagnosing flags.

## Good for

- Add a feature flag with a percentage rollout to a Cloudflare Worker
- Set up an A/B split between two flag variants using Wrangler
- Debug why a flag returns its default value in local development
- Evaluate Cloudflare flags from a Python or Go service using OpenFeature
- Review existing flag code for rule ordering and bucketing mistakes

## Install

### Claude Code

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

```sh
/plugin marketplace add cloudflare/skills
/plugin install cloudflare@cloudflare
```

Or copy only this skill to `~/.claude/skills/flagship`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cloudflare/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/flagship &&
cp -R "$tmp/skills/flagship" ~/.claude/skills/flagship &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/flagship` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/flagship` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cloudflare/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/flagship &&
cp -R "$tmp/skills/flagship" ~/.agents/skills/flagship &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/flagship` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/flagship` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cloudflare/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/flagship &&
cp -R "$tmp/skills/flagship" ~/.cursor/skills/flagship &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/flagship` inside it instead.

### Gemini CLI

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

```sh
gemini skills install https://github.com/cloudflare/skills.git --path skills/flagship
```

Or copy the folder to `~/.gemini/skills/flagship` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/flagship`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cloudflare/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/flagship &&
cp -R "$tmp/skills/flagship" ~/.copilot/skills/flagship &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/flagship` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/cloudflare/skills.git
```

Then copy `skills/skills/flagship` into your agent's skills folder as `flagship`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Do I need an API token to use the Flagship binding inside a Worker?

No. The binding authenticates automatically inside Workers and needs no API token. Outside Workers, an OpenFeature provider with an Evaluate token is used instead.

### Why does my flag return its default value locally?

Local development starts with an empty flag store, so every flag returns its default until seeded. The skill suggests running wrangler flagship flags pull, creating flags with --local, or setting remote to true on the binding.

### What happens when a flag is disabled?

A disabled flag always serves its default variant, regardless of targeting rules, so it works as a kill switch.

### Why can the same user see different values in a rollout?

If the bucketing attribute, which defaults to targetingKey, is missing or null, each evaluation gets a random bucket. Passing the same stable identifier on every call prevents this.

### How do I install Flagship in Claude Code?

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

### Does Flagship 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 Flagship?

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 Flagship?

The closest alternatives to Flagship are Artifacts, Workers best practices, Cloudflare email service, Cf CLI and Workers development.

## Where this comes from

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

## Alternatives

- [Artifacts](https://ai-powered.com/skills/artifacts-cloudflare): Artifacts is an open-source agent skill for developer tools.
- [Workers best practices](https://ai-powered.com/skills/workers-best-practices): Workers best practices is an open-source agent skill for developer tools.
- [Cloudflare email service](https://ai-powered.com/skills/cloudflare-email-service): Cloudflare email service is an open-source agent skill for cloud and infrastructure.
- [Cf CLI](https://ai-powered.com/skills/cf-cli): Cf CLI is an open-source agent skill for cloud and infrastructure.
- [Workers development](https://ai-powered.com/skills/workers-development): Workers development is an open-source agent skill for developer tools.
- [Cloudflare app bootstrap](https://ai-powered.com/skills/cloudflare-app-bootstrap): Cloudflare app bootstrap is an open-source agent skill for cloud and infrastructure.
- [Shipping](https://ai-powered.com/skills/shipping): Shipping is an open-source agent skill for developer tools.
- [Sandbox stable](https://ai-powered.com/skills/sandbox-stable): Sandbox stable is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/flagship
