Agent skill

Unleash Flag

by ambient-code in ambient-code/platform

This skill should be used when the user asks to "add a feature flag", "gate a feature", "put this behind a flag", "add a workspace flag", "feature flag this", "make this configurable per workspace"…

MITAuto-check passed

Install Unleash Flag

skills CLI
$ npx skills add ambient-code/platform --skill unleash-flag -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ambient-code/platform unleash-flag --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ambient-code/platform.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/integrations/unleash-flag .claude/skills/unleash-flag && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unleash-flag
GitHub stars
131
Token cost
~2.6k tokens
SKILL.md length
880 words
Files
2
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when the user asks to "add a feature flag", "gate a feature", "put this behind a flag", "add a workspace flag", "feature flag this", "make this configurable per workspace"…

  • Works in 4 steps: Define the Flag → Gate the Frontend → Update Tests → …
  • Asks to add a feature flag
  • SKILL.md covers Checklist, 1. Define the Flag, 2. Gate the Frontend and 3. Update Tests, plus 4 more sections
  • Calls npx; needs CYPRESS_UNLEASH_ADMIN_TOKEN and UNLEASH_ADMIN_TOKEN

What it does

Unleash Flag is an agent skill from ambient-code/platform. This skill should be used when the user asks to "add a feature flag", "gate a feature", "put this behind a flag", "add a workspace flag", "feature flag this", "make this configurable per workspace", "configure Unleash", or references "flags.json", "useWorkspaceFlag", "useFlag", "SyncFlags", or "controlled rollout" of a feature.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `evals/evals.json`).

The repository describes itself as: Vision/Mission https://ambient-code.ai : Virtual team management and collaboration platform. User guides: https://ambient-code.github.io/platform/. The licence is MIT.

When your agent uses it

  • Asks to add a feature flag
  • Put this behind a flag
  • Add a workspace flag
  • Feature flag this

Example prompts

  • “add a feature flag”
  • “gate a feature”
  • “put this behind a flag”
  • “/unleash-flag”

Requirements

  • Node.js
  • A credential in CYPRESS_UNLEASH_ADMIN_TOKEN
  • A credential in UNLEASH_ADMIN_TOKEN

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Define the Flag
  2. Gate the Frontend
  3. Update Tests
  4. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 57e8af8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • CYPRESS_UNLEASH_ADMIN_TOKEN
    • UNLEASH_ADMIN_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unleash Flag loads about 2.6k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 880 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ambient-code/platform at commit 57e8af8, republished under its MIT licence (© ambient-code). 880 words, ~2,614 tokens.

Download SKILL.mdSave it as .claude/skills/unleash-flag/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
unleash-flag
description
This skill should be used when the user asks to "add a feature flag", "gate a feature", "put this behind a flag", "add a workspace flag", "feature flag this", "make this configurable per workspace", "configure Unleash", or references "flags.json", "useWorkspaceFlag", "useFlag", "SyncFlags", or "controlled rollout" of a feature.

Unleash Feature Flag

Workspace-scoped feature flags for the Ambient Code Platform — naming, gating, evaluation, and lifecycle management.

Checklist

Every new flag requires these steps. Skip none.

  1. Define the flag in components/manifests/base/core/flags.json
  2. Gate the frontend using the correct hook for scope
  3. Update tests to mock the flag hook
  4. Verify type-check and tests pass

1. Define the Flag

Add to components/manifests/base/core/flags.json:

json
{
  "name": "category.feature-name.enabled",
  "description": "Human-readable purpose of this flag",
  "tags": [
    {
      "type": "scope",
      "value": "workspace"
    }
  ]
}
Naming Convention

All new flags must use the category.feature-name.enabled format:

category.feature-name.enabled
SegmentRulesExamples
categoryOne of the standard categories belowrunner, model, integration
feature-nameLowercase, hyphen-separated, descriptivegemini-cli, coderabbit
.enabledRequired suffix for all new flags—

Standard categories:

CategoryWhenExample
integrationExternal service integrationsintegration.coderabbit.enabled
runnerRunner type availabilityrunner.gemini-cli.enabled
modelModel availability (auto-generated by SyncFlags)model.claude-sonnet-4-5.enabled
featurePlatform capabilitiesfeature.scheduled-export.enabled

Grandfathered flags (do not rename):

  • jira-write
  • ldap.autocomplete.enabled
  • scheduled-session.reuse.enabled

These predate the convention. New flags must not follow their patterns.

Rules:

  • Unique across the entire system — never reuse a retired flag name
  • Descriptive — someone unfamiliar should understand the scope from the name alone
  • Dot-delimited with category prefix — enables grouping in workspace settings UI
  • Lowercase with hyphens within segments (not underscores, not camelCase)
Workspace Settings Visibility

The scope:workspace tag is what makes a flag appear in the workspace settings UI. Without it, the flag exists in Unleash but workspace admins cannot toggle it.

Backend SyncFlags runs at startup: reads flags.json, creates flags in Unleash (type: release, disabled by default, 0% rollout), and tags them. Flags without EnabledByDefault: true start off.

To force a re-sync, restart the backend. To clear a stuck flag, archive + purge it in Unleash admin before restarting.

2. Gate the Frontend

Choosing the Right Hook

Default: useWorkspaceFlag — always prefer this hook. It respects ConfigMap overrides set by workspace admins.

tsx
import { useWorkspaceFlag } from "@/services/queries/use-feature-flags-admin";
const { enabled } = useWorkspaceFlag(projectName, "category.feature.enabled");

Exception: useFlag — only for the rare case where no project context is available (e.g., cluster-level admin pages like /integrations). It bypasses workspace overrides entirely and returns only the Unleash global default. Do not use it in project-scoped pages.

tsx
import { useFlag } from "@/lib/feature-flags";
const enabled = useFlag("category.feature.enabled");
HookScopeEvaluation
useWorkspaceFlagProject-scoped pages (default)ConfigMap override > Unleash default
useFlagCluster-scoped pages only (exception)Unleash default only
Gating Patterns

Conditionally render a component:

tsx
const { enabled: featureEnabled } = useWorkspaceFlag(projectName, "category.feature.enabled");

// In JSX:
{featureEnabled && <FeatureComponent />}

Conditionally include in an array:

tsx
const items = [
  { key: "always-visible", name: "Always" },
  ...(featureEnabled
    ? [{ key: "gated", name: "Gated Feature" }]
    : []),
];

Extract project name from route params (when not passed as prop):

tsx
import { useParams } from "next/navigation";
const params = useParams();
const projectName = params.name as string;
Backend Gating (when needed)

For full-stack gating (not always necessary — frontend-only is often sufficient):

go
// Global check
if !FeatureEnabled("category.feature.enabled") {
    c.JSON(http.StatusForbidden, gin.H{"error": "Feature not enabled"})
    return
}

// Request-scoped (includes user/IP context for Unleash strategies)
if !FeatureEnabledForRequest(c, "category.feature.enabled") {
    c.JSON(http.StatusForbidden, gin.H{"error": "Feature not enabled"})
    return
}
Backend Middleware Gating

For endpoints that should be entirely hidden behind a flag, create a middleware in routes.go that checks FeatureEnabledForRequest() and returns 404 when the flag is off:

go
// routes.go — gate an entire route group
flagged := router.Group("/api/v1/feature")
flagged.Use(func(c *gin.Context) {
    if !handlers.FeatureEnabledForRequest(c, "category.feature.enabled") {
        c.AbortWithStatus(http.StatusNotFound)
        return
    }
    c.Next()
})
{
    flagged.GET("/resource", handlers.ListResource)
    flagged.POST("/resource", handlers.CreateResource)
}

This returns 404 (not 403) when the flag is off, so the endpoint appears not to exist. Use this for features that shouldn't even be discoverable until enabled.

E2E Testing with Feature Flags

When writing E2E tests for flagged features, the Unleash admin token must be set as an environment variable. Never paste or export the token inline in a shell session — this risks exposing it in shell history, logs, or terminal recordings.

Obtain the token from Unleash UI > API Access or from deployment secrets, then set it using a non-echoing prompt or a secret manager:

bash
# Non-echoing prompt (token not stored in shell history)
read -rs CYPRESS_UNLEASH_ADMIN_TOKEN && export CYPRESS_UNLEASH_ADMIN_TOKEN

In CI, inject it via a secret reference (e.g. GitHub Actions secret, Vault, or sealed secret) — never hard-code or echo the value.

Note: When logging token-related errors, use len(token) to confirm presence without exposing the value. Never include the full token in error messages, API responses, or commit history.

Map it in e2e/cypress.config.ts:

typescript
env: { UNLEASH_ADMIN_TOKEN: process.env.CYPRESS_UNLEASH_ADMIN_TOKEN }
typescript
// e2e/cypress/e2e/flagged-feature.cy.ts
describe('Flagged Feature', () => {
  before(() => {
    // Enable the flag via Unleash admin API
    cy.request({
      method: 'POST',
      url: 'http://localhost:4242/api/admin/projects/default/features/category.feature.enabled/environments/development/on',
      headers: { Authorization: Cypress.env('UNLEASH_ADMIN_TOKEN') },
    }).its('status').should('eq', 200);
  });

  after(() => {
    // Disable the flag after tests
    cy.request({
      method: 'POST',
      url: 'http://localhost:4242/api/admin/projects/default/features/category.feature.enabled/environments/development/off',
      headers: { Authorization: Cypress.env('UNLEASH_ADMIN_TOKEN') },
    }).its('status').should('eq', 200);
  });

  it('renders when flag is enabled', () => {
    // ... test the feature
  });
});
Show full SKILL.md (324 more words)Show less

3. Update Tests

Any component that now calls useWorkspaceFlag or useFlag needs its tests updated.

Mock useWorkspaceFlag:

tsx
vi.mock("@/services/queries/use-feature-flags-admin", () => ({
  useWorkspaceFlag: () => ({ enabled: true }),
}));

Mock useParams (if newly added):

tsx
vi.mock("next/navigation", () => ({
  useParams: () => ({ name: "test-project" }),
}));

Mock useFlag:

tsx
vi.mock("@/lib/feature-flags", () => ({
  useFlag: () => true,
}));

Test both states: confirm the gated element renders when enabled, and is absent when disabled.

4. Verify

bash
cd components/frontend && npx tsc --noEmit    # Type-check
cd components/frontend && npx vitest run       # Unit tests

Both must pass with zero errors.

Evaluation Order

When a flag is evaluated at runtime, the platform checks in priority order:

  1. ConfigMap override (feature-flag-overrides in workspace namespace) — set by workspace admin via settings UI
  2. Unleash default — global state from Unleash server
  3. Code default — false (fail-closed)

This means a workspace admin can override the global Unleash state in either direction.

Lifecycle

PhaseAction
CreateAdd to flags.json, gate frontend, assign ownership
RolloutWorkspace admins enable per-workspace via settings UI
GARemove flag checks from code, remove from flags.json, create Jira for cleanup tracking
CleanupArchive flag in Unleash, remove stale ConfigMap overrides

Treat flags as technical debt. When a feature is fully rolled out, remove the flag — don't leave it permanently enabled.

When a feature reaches GA, create a Jira issue (use /jira-log) to track cleanup in this order:

  1. Verify feature is fully rolled out (all workspaces enabled or no longer need it)
  2. Remove useWorkspaceFlag / useFlag calls from code and deploy
  3. Remove the flag from flags.json and deploy (SyncFlags stops recreating it)
  4. Remove any ConfigMap overrides in workspace namespaces
  5. Archive and purge the flag in Unleash

Exceptions for long-lived flags: kill switches for graceful degradation, and debug flags for expensive tracing.

Common Mistakes

MistakeFix
Using useFlag() in project-scoped pageUse useWorkspaceFlag(projectName, flagName)
Missing scope:workspace tagFlag won't appear in workspace settings UI
Forgetting to mock hook in testsTests crash with "Cannot read properties of null"
Reusing a retired flag nameUnleash conflict error on sync — archive + purge first
Checking flag in multiple placesEvaluate once, pass result down
No test for disabled stateAdd test verifying gated element is hidden when flag is off

© ambient-code, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/integrations/unleash-flag of ambient-code/platform.

  • SKILL.md
  • evals/evals.json

Open the folder on GitHubat commit 57e8af8

Compare with similar skills

Unleash Flag next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unleash Flag compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unleash Flag this skillambient-code/platform131—~2.6kAutomated safety check: PassMIT
Flagsvercel/next.js143k—~746Automated safety check: PassMIT
Feature Flagssickn33/agentic-awesome-skills47k1 repos~2.6kAutomated safety check: PassMIT
Feature Flagsgetsentry/sentry46k—~374Automated safety check: PassCustom licence
Setting Feature Flags In StorybookPostHog/posthog40k—~1.1kAutomated safety check: PassCustom licence
Admin7 Feature FlagsTryGhost/Ghost55k—~169Automated safety check: PassMIT

Similar skills

  • Flags

    vercel/next.js

    Official

    How to add or modify Next.js experimental feature flags end-to-end.

    143k GitHub stars~746 tokensUpdated today
    DevelopmentAuto-check passed
  • Feature Flags

    sickn33/agentic-awesome-skills

    Implement feature flags for progressive feature rollout using LaunchDarkly, Unleash, or custom solutions.

    47k GitHub starsUsed in 1 repo~2.6k tokens
    Auto-check passed
  • Feature Flags

    getsentry/sentry

    Official

    Gate a Sentry feature behind a FlagPole feature flag. An agent skill from getsentry/sentry.

    46k GitHub stars~374 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Official

    A skill your agent uses when writing a Storybook story for a component gated on a feature flag — boolean flags or multivariate/experiment-arm variants.

    40k GitHub stars~1.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Admin7 Feature Flags

    TryGhost/Ghost

    Add, consume, review, or remove Admin 7 milestone flags using Ghost's existing Labs conventions.

    55k GitHub stars~169 tokensUpdated today
    Product & Project ManagementAuto-check passed
  • Removes a Warp feature flag once it is stable for everyone, deleting the definition, the Cargo entries and every conditional check.

    65k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed

More from ambient-code/platform

All 18 skills in this repo
  • Align

    ambient-code/platform

    Run a convention alignment check across the codebase to measure adherence to documented standards.

    131 GitHub stars~754 tokensUpdated today
    Auto-check passed
  • Amber Review

    ambient-code/platform

    Perform a comprehensive code review using repository-specific standards.

    131 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Cypress Demo

    ambient-code/platform

    Create a Cypress-based video demo for a feature branch with cursor, click effects, and captions.

    131 GitHub stars~879 tokensUpdated today
    Auto-check: notes
  • Deploy

    ambient-code/platform

    Deploy, update manifests, and troubleshoot the ambient-ui component.

    131 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Discover

    ambient-code/platform

    Discover domain-specific skills and context before starting any coding or spec work.

    131 GitHub stars~747 tokensUpdated today
    Auto-check passed
  • Frontend Development

    ambient-code/platform

    Required context for all frontend work. An agent skill from ambient-code/platform.

    131 GitHub stars~525 tokensUpdated today
    Auto-check passed

Questions about Unleash Flag

What does Unleash Flag do?

This skill should be used when the user asks to "add a feature flag", "gate a feature", "put this behind a flag", "add a workspace flag", "feature flag this", "make this configurable per workspace"…. Unleash Flag is an agent skill from ambient-code/platform.json", "useWorkspaceFlag", "useFlag", "SyncFlags", or "controlled rollout" of a feature.

When should I use Unleash Flag?

Unleash Flag fits situations like: asks to add a feature flag; put this behind a flag; add a workspace flag; feature flag this.

How do I install Unleash Flag in Claude Code?

Run `npx skills add ambient-code/platform --skill unleash-flag -a claude-code`. Or copy the skill folder (skills/integrations/unleash-flag in ambient-code/platform) into .claude/skills/unleash-flag in your project. Claude Code loads it when a task matches its description.

How do I install Unleash Flag in Codex?

Run `npx skills add ambient-code/platform --skill unleash-flag -a codex`. Or copy the skill folder (skills/integrations/unleash-flag in ambient-code/platform) into .agents/skills/unleash-flag in your project. Codex loads it when a task matches its description.

Can I use Unleash Flag in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ambient-code/platform --skill unleash-flag -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unleash-flag, .gemini/skills/unleash-flag, .github/skills/unleash-flag and .opencode/skills/unleash-flag in your project.

What does Unleash Flag need to run?

Going by SKILL.md and its folder, Unleash Flag needs the command-line tools its instructions call (npx) and credentials named CYPRESS_UNLEASH_ADMIN_TOKEN and UNLEASH_ADMIN_TOKEN. Our summary lists: Node.js; A credential in CYPRESS_UNLEASH_ADMIN_TOKEN; A credential in UNLEASH_ADMIN_TOKEN.

Does Unleash Flag access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Unleash Flag safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unleash Flag use?

Unleash Flag is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unleash Flag use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Unleash Flag?

Skills that share tags, products or a category with Unleash Flag: Flags (vercel/next.js, 143k stars), Feature Flags (sickn33/agentic-awesome-skills, 47k stars), Feature Flags (getsentry/sentry, 46k stars) and Setting Feature Flags In Storybook (PostHog/posthog, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unleash Flag?

ambient-code (a GitHub organization) maintains it in ambient-code/platform, which has 131 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 7, 2026.

Source: ambient-code/platform on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.