Skip to content
Join free
Cloudflare Official

Flagship skill

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.

$npx alyn-cli add flagship
View this skill on GitHubcloudflare/skills/skills/flagship/SKILL.md
Pack stars
3,447
Pack installs
2M
Alyn Score
75/99
Updated
29 h ago
License
Apache-2.0

Cloudflare

Flagship

What is the Flagship skill?

Flagship is a devops skill by Cloudflare for Claude Code, Cursor, Codex and other AI coding agents. 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.

Flagship is Cloudflare's feature flag service: apps group flags, flags have typed variants and ordered targeting rules, and evaluation runs at the edge against propagated configuration. Your knowledge of the Flagship API may be outdated or missing. Prefer retrieval over pre-training: read the matching page below before writing code or commands, and treat the docs and generated types as the source of truth over this skill.

When to use it

Use for the Flagship binding, targeting rules, percentage rollouts and A/B splits, kill switches, local flag stores, and flag-related API tokens.

What the SKILL.md covers

  • Documentation
  • Gotchas
  • Skill feedback
Author
Cloudflare
Pack
cloudflare/skills (24 skills)
Category
DevOps, #95 of 455
Alyn Score
75 / 99
Files
2, includes references
License
Apache-2.0
Last updated
29 h ago
Works with
Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot

Flagship compared to similar skills

SkillAlyn ScoreGitHub starsUpdated
Flagship · Cloudflare753.4k29 h ago
Cs Fullstack Review · alirezarezvani6330k3 days ago
Cloudflare Deploy · tech-leads-club727.2k4 days ago
Cloudflare Deploy · OpenAI7629k28 days ago

Install Flagship

Pick your agent. Every command is ready to paste.

$npx alyn-cli add flagship

Detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

$npx skills add cloudflare/skills --skill flagship

Or use the open skills CLI directly.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads flagship when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the flagship skill”. In Codex, type $flagship.

The skill itself

SKILL.md

FolderGitHub

Cloudflare Flagship

Flagship is Cloudflare's feature flag service: apps group flags, flags have typed variants and ordered targeting rules, and evaluation runs at the edge against propagated configuration. Your knowledge of the Flagship API may be outdated or missing. Prefer retrieval over pre-training: read the matching page below before writing code or commands, and treat the docs and generated types as the source of truth over this skill.

Documentation

Task Docs Check for
Understand the model Concepts Apps, flags, variant types, rule order, evaluation context, propagation
Evaluate flags in a Worker Get started, Configuration, Binding methods, Types Binding config, typed and *Details methods, context value types
Evaluate outside Workers or through OpenFeature OpenFeature SDK, TypeScript server, TypeScript client, Python, Go, Rust Package names, provider options, caching, minimum versions for structured context
Evaluate over HTTP without an SDK Evaluation API GET for scalar context, POST for structured context, token permissions
Target users or roll out gradually Targeting rules, Operators, Percentage rollouts Rule shape, nested attribute paths, bucketing attribute, cumulative A/B thresholds
Manage flags from the CLI Wrangler commands --rule syntax, rollout, split, enable/disable, --local, --json
Manage flags over HTTP API reference Apps, flags, and flag changelog endpoints; rules live on the flag object. Update flag is a PUT that clears omitted fields, so read the flag before writing
Create tokens for SDKs or automation API tokens Account-wide vs app-scoped tokens, Evaluate vs Read vs Write
Debug unexpected values Evaluation reasons and error codes reason and errorCode values
Plan rollouts and cleanup Best practices, Limits Rollout steps, flag removal order, key and context limits

For the full page list, read Flagship llms.txt. After adding a binding, run npx wrangler types and read the Flagship declarations in the generated worker-configuration.d.ts; they match the installed Wrangler version.

Gotchas

These follow from the pages above and are the usual causes of flags that look broken but are working as documented.

  • Use the binding inside Workers. It authenticates automatically and needs no API token. Outside Workers, use an OpenFeature provider with an Evaluate token; local evaluation in any server SDK needs a Read token instead. Only the TypeScript server provider accepts the binding: in a Worker that wants OpenFeature APIs, pass the binding to FlagshipServerProvider. Do not ship the TypeScript client provider in public-facing apps: it requires an API token that would be visible in client code.
  • Known evaluation failures return your default silently. The typed binding methods return defaultValue for known failures such as a missing flag, type mismatch, or invalid context. Unexpected runtime failures can still throw, and get() without a defaultValue throws on known failures. Other clients differ: the Rust SDK returns a Result, and the evaluation API POST returns 400 for invalid context. Pick a default that is the safe, existing behavior, and use the matching *Details method to see reason and errorCode when a value looks wrong.
  • Local development starts with an empty flag store. wrangler dev, the Vite plugin, the Vitest integration, and cf dev evaluate against a local store, so every flag returns its default until you seed it. Run npx wrangler flagship flags pull <APP_ID>, create flags with --local, or set "remote": true on the binding. pull overwrites local flags with matching keys and writes to .wrangler/state, which wrangler dev and the Vite plugin 1.x use. cf dev and the Vite plugin 2.0 use .cloudflare/state, so for them pass --persist-to .cloudflare/state to pull, or every flag still returns its default. cf cannot copy flags from the remote app, so seed it with wrangler flagship flags pull. On flag commands other than pull, --persist-to requires --local. Check Configuration for the minimum tool versions.
  • Rollouts need a stable bucketing value. The bucketing attribute defaults to targetingKey. If it is missing or null, each evaluation gets a random bucket, so the same user can flip between values. Pass the same stable identifier under the same attribute name on every call, and use targetingKey with OpenFeature SDKs.
  • Rules are ordered and rollout misses fall through. The first matching rule wins. A context that matches a rule's conditions but falls outside its rollout percentage continues to the next rule. Put specific rules before broad ones, and use cumulative thresholds that end at 100 for API-managed A/B/n splits, or wrangler flagship flags split, which calculates them.
  • Changes take up to 30 seconds to propagate. Do not expect the next evaluation to reflect an update immediately; for scripted checks, allow for the propagation window.
  • flags update --rule, rollout, and split replace every rule. rollout and split overwrite the flag's entire rule set with the rules they generate, and prompt first only when existing rules have conditions; --force skips the prompt. Use --add-rule to append, or rules update and rules delete to change one rule by priority. Wrangler commands take the app ID as an argument and do not read it from the Worker binding.
  • Keep context small and JSON-only. Send only attributes that rules or bucketing use, and no sensitive data. Serialize Date values to ISO 8601 strings for the binding in TypeScript. A condition whose attribute is absent from the context never matches, including with negative operators such as not_equals. Evaluate a flag once per request and reuse the value instead of calling it in a loop.
  • Disabling a flag is the kill switch. A disabled flag always serves its default variant, regardless of targeting rules.
  • Delete flags last. Disable the flag, watch for problems, remove the evaluation code, deploy, then delete the flag. A deleted flag that is still evaluated silently returns its default.

Skill feedback

If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read references/skill-feedback.md.

Tips for Flagship

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
  • • It is part of a pack with 24 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Flagship

What does the Flagship skill do?

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.

How do I install Flagship?

Run "npx alyn-cli add flagship" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Flagship work in Cursor and Codex?

Yes. Flagship uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

When should I use the Flagship skill?

Use for the Flagship binding, targeting rules, percentage rollouts and A/B splits, kill switches, local flag stores, and flag-related API tokens.

What is inside the Flagship skill?

The SKILL.md covers Documentation, Gotchas, Skill feedback, and the skill folder has 2 files.

What is a good alternative to Flagship?

Cs Fullstack Review by alirezarezvani is the highest-ranked similar skill from another creator, with an Alyn Score of 63 compared to 75 for Flagship.

Is Flagship free?

Flagship is open source on GitHub under the Apache-2.0 license. It is free to install; check the license before commercial use.

Who made Flagship?

Flagship is published by Cloudflare in the cloudflare/skills repository, together with 23 other skills.

Similar skills. From other creators.