Agent skill

Add Feature Flag

by simstudioai in simstudioai/sim

Add a runtime feature flag (AppConfig-backed on prod, secret fallback off-prod), global by default or optionally gated by workspace id, org id, user id, or platform admin

Apache-2.0Auto-check passed

Install Add Feature Flag

skills CLI
$ npx skills add simstudioai/sim --skill add-feature-flag -a claude-code

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

GitHub CLI
$ gh skill install simstudioai/sim add-feature-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/simstudioai/sim.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-feature-flag .claude/skills/add-feature-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
add-feature-flag
GitHub stars
30k
Token cost
~1.6k tokens
SKILL.md length
735 words
Files
1
Skills in repo
40
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add a runtime feature flag (AppConfig-backed on prod, secret fallback off-prod), global by default or optionally gated by workspace id, org id, user id, or platform admin

  • Works in 6 steps: Confirm the granularity before editing… → Define the flag. Add one entry to the… → Gate the call site at the chosen… → …
  • SKILL.md covers When to use this vs env-flags.ts, The flag model, Steps and Notes
  • Needs FLAG_SECRET

What it does

Add Feature Flag is an agent skill from simstudioai/sim. Add a runtime feature flag (AppConfig-backed on prod, secret fallback off-prod), global by default or optionally gated by workspace id, org id, user id, or platform admin

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Sim is the collaborative workspace to build, deploy, and monitor AI agents and workflows. Used by 100,000+ builders. The licence is Apache-2.0.

Example prompts

  • “/add-feature-flag”

Requirements

  • A credential in FLAG_SECRET

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the granularity before editing code. If the user has not already specified it, stop and ask
  2. Define the flag. Add one entry to the FEATURE_FLAGS registry in apps/sim/lib/core/config/feature-flags.ts. Each entry is the flag's whole…
  3. Gate the call site at the chosen granularity. For the recommended global mode, pass no context
  4. (Prod) configure in AppConfig. The infra feature-flags profile schema is permissive, so a new flag needs no infra change. Operators add…
  5. Test only new evaluation logic. A flag that reuses the existing clauses is already covered by…
  6. Clean up after rollout. When the feature ships to everyone, delete the flag's entry from FEATURE_FLAGS, the env entry, the AppConfig…

What it can do on your machine

Read from SKILL.md and the folder at commit 546d4e7. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

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

    • FLAG_SECRET

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

Context cost

Add Feature Flag loads about 1.6k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 735 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~1.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 simstudioai/sim at commit 546d4e7, republished under its Apache-2.0 licence (© simstudioai). 735 words, ~1,573 tokens.

Download SKILL.mdSave it as .claude/skills/add-feature-flag/SKILL.md (or your agent's skills folder).
name
add-feature-flag
description
Add a runtime feature flag (AppConfig-backed on prod, secret fallback off-prod), global by default or optionally gated by workspace id, org id, user id, or platform admin
argument-hint
<flag-name>

Add Feature Flag Skill

You add a runtime feature flag to Sim that can change on prod with no redeploy (AWS AppConfig). Prefer a global on/off flag unless the rollout actually needs per-workspace, per-organization, per-user, or platform-admin targeting. When AppConfig isn't the source of truth, the flag falls back to a single secret (on/off only).

When to use this vs env-flags.ts

  • Feature flag (@/lib/core/config/feature-flags.ts): runtime global on/off by default, optionally scoped by workspaceId/userId/orgId/admin. This skill.
  • Env flag (@/lib/core/config/env-flags.ts): deploy-time capability/environment detection (isProd, isHosted, isBillingEnabled). A module-load boolean. Do not add gated flags here.

If the user wants a fixed per-deployment toggle, send them to env-flags.ts instead.

The flag model

A flag's gating rule lives only in the hosted AppConfig document. It is ON for a context when any configured clause matches:

ts
interface FeatureFlagRule {
  enabled?: boolean       // global default for everyone
  workspaceIds?: string[] // allowlisted workspace ids
  orgIds?: string[]       // allowlisted organization ids
  userIds?: string[]      // allowlisted user ids
  adminEnabled?: boolean  // platform admins (user.role === 'admin')
}

Critically, none of this is expressible in code — gating (especially adminEnabled) can only be set through AppConfig, so no environment can grant access from a code literal. Off-AppConfig (self-hosted/OSS/local), a flag is simply on or off, derived from its fallback secret.

Steps

  1. Confirm the granularity before editing code. If the user has not already specified it, stop and ask:

    Should <flag-name> be a global on/off flag (recommended), or does it need rollout targeting by workspace, organization, user, and/or platform admin?

    • Recommend global. Do not infer scoped gating merely because the call site already has a workspace, user, or organization id.
    • If the user chooses scoped gating but does not name the dimensions, ask which of workspace, organization, user, and platform admin it needs. Wire only the selected dimensions.
    • If the user wants a fixed per-deployment toggle rather than a runtime AppConfig flag, use env-flags.ts instead.
  2. Define the flag. Add one entry to the FEATURE_FLAGS registry in apps/sim/lib/core/config/feature-flags.ts. Each entry is the flag's whole definition — name (kebab-case key), description, and the fallback secret consulted when AppConfig isn't the source of truth (truthy ⇒ on globally):

    ts
    const FEATURE_FLAGS = {
      '<flag-name>': {
        description: '<what this gates>',
        fallback: '<FLAG_SECRET>',
      },
    }

    fallback is the env/secret key (typed as keyof typeof env), so add <FLAG_SECRET> to apps/sim/lib/core/config/env.ts first (and the deployment's secret store) — it won't typecheck otherwise. Do not add workspace/org/user/admin defaults here — that gating exists only in AppConfig. Adding the entry makes <flag-name> a valid FeatureFlagName.

  3. Gate the call site at the chosen granularity. For the recommended global mode, pass no context:

    ts
    import { isFeatureEnabled } from '@/lib/core/config/feature-flags'
    
    if (await isFeatureEnabled('<flag-name>')) {
      // gated behavior
    }

    Do not fetch, resolve, or thread through user or organization context solely for a global flag.

    For scoped rollout, pass only the dimensions the user selected. Admin status is resolved internally, so ordinary callers pass userId, not a role:

    ts
    import { isFeatureEnabled } from '@/lib/core/config/feature-flags'
    
    if (await isFeatureEnabled('<flag-name>', { workspaceId, userId, orgId })) {
      // gated behavior
    }
    • Workspace targeting uses workspaceId; organization targeting uses orgId; user and platform-admin targeting require userId.
    • Missing ids are fine — a clause with no matching id is skipped; with no userId, the admin clause resolves to false without a DB read.
    • Admin routes that already know the caller is an admin may pass { userId, isAdmin: true } to skip the role lookup.
    • Client/UI flags: resolve server-side (in a server component, route, or loader) and pass the boolean down as a prop. There is no client AppConfig.
  4. (Prod) configure in AppConfig. The infra feature-flags profile schema is permissive, so a new flag needs no infra change. Operators add the flag to the hosted feature-flags document using enabled for global rollout or only the selected workspaceIds/orgIds/userIds/adminEnabled clauses for scoped rollout, then start a sim-<env>-fast deployment (see the AppConfig runbook in the infra README — same flow as access-control). The fallback secret only applies when AppConfig is disabled.

  5. Test only new evaluation logic. A flag that reuses the existing clauses is already covered by apps/sim/lib/core/config/feature-flags.test.ts; add no per-flag case. When you change how flags evaluate (a new clause kind, a new fallback path), add a case there that passes the test-audit authoring gate.

  6. Clean up after rollout. When the feature ships to everyone, delete the flag's entry from FEATURE_FLAGS, the <FLAG_SECRET> env entry, the AppConfig document, and the call sites. Leaving dead flags around is the main failure mode of flag systems.

Show full SKILL.md (80 more words)Show less

Notes

  • Flag keys are kebab-case.
  • Never read flags via raw fetch or a new AppConfig client — always go through isFeatureEnabled / getFeatureFlags.
  • Never bake gating into code. The fallback is a single boolean secret; workspace/org/user/admin scoping is AppConfig-only.
  • Never add or propagate request context unless the user chose scoped rollout.
  • The admin check reads the DB replica (dbReplica) and is resolved lazily, so an admin-gated flag adds at most one cheap replica read, and only when adminEnabled is the deciding clause.

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

Files

Just SKILL.md in .agents/skills/add-feature-flag of simstudioai/sim.

Open the folder on GitHubat commit 546d4e7

Compare with similar skills

Add Feature 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.

Add Feature Flag compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Feature Flag this skillsimstudioai/sim30k—~1.6kAutomated safety check: PassApache-2.0
Secret Scanninggithub/awesome-copilot40k1 repos~2.4kAutomated safety check: PassMIT
Secrets Managementdavila7/claude-code-templates32k11 repos~2kAutomated safety check: PassMIT
Dotenvx Secretskortix-ai/suna20k—~4.2kAutomated safety check: NotesCustom licence
Secrets Vault Manageralirezarezvani/claude-skills28k1 repos~3.6kAutomated safety check: NotesMIT
Leaked Secretsthedaviddias/Front-End-Checklist74k—~596Automated safety check: NotesMIT

Similar skills

  • Secret Scanning

    github/awesome-copilot

    Official

    Guide for configuring and managing GitHub secret scanning, push protection, custom patterns, and secret alert remediation.

    40k GitHub starsUsed in 1 repo~2.4k tokens
    DevOps & CloudAuto-check passed
  • Secrets Management

    davila7/claude-code-templates

    Secure secrets management practices for CI/CD pipelines using Vault, AWS Secrets Manager, and other tools.

    32k GitHub starsUsed in 11 repos~2k tokens
    DevOps & CloudAuto-check passed
  • Dotenvx Secrets

    kortix-ai/suna

    How this repo manages API secrets and the four local-run environments (local/dev/staging/prod).

    20k GitHub stars~4.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Secrets Vault Manager

    alirezarezvani/claude-skills

    A skill your agent uses when the user asks to set up secret management infrastructure, integrate HashiCorp Vault, configure cloud secret stores (AWS Secrets Manager, Azure Key Vault, GCP Secret…

    28k GitHub starsUsed in 1 repo~3.6k tokens
    DevOps & CloudAuto-check: notes
  • Leaked Secrets

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing client-side JavaScript, HTML source, or git history for exposed credentials, API keys, or tokens.

    74k GitHub stars~596 tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Implementing Secrets Management With Vault

    mukul975/Anthropic-Cybersecurity-Skills

    Deploy HashiCorp Vault for centralized secrets management, covering dynamic secret generation for databases and cloud providers, transit encryption, PKI certificate management, and Kubernetes…

    34k GitHub stars~3.2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed

More from simstudioai/sim

All 40 skills in this repo
  • Sim Helm

    simstudioai/sim

    Install, upgrade, and operate the Sim Helm chart on Kubernetes.

    30k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Add Column Type

    simstudioai/sim

    Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read.

    30k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Add Enrichment

    simstudioai/sim

    Add a code-defined table enrichment (registry entry) under apps/sim/enrichments/ backed by an ordered provider cascade, ensuring every provider tool it calls has hosted-key support.

    30k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Add Hosted Key

    simstudioai/sim

    Add hosted API key support to a tool so Sim provides the key (metered and billed to the workspace) when a user has not brought their own.

    30k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Add Managed CLI

    simstudioai/sim

    Add or upgrade a curated, immutable managed CLI for Sim Function sandboxes, including client-safe catalog metadata, a pinned server-only installation recipe, checksum and executable verification…

    30k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Add Selector

    simstudioai/sim

    Add or update a Sim dynamic selector using the shared manifest, server attachment, and selectors.execute path.

    30k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Questions about Add Feature Flag

What does Add Feature Flag do?

Add a runtime feature flag (AppConfig-backed on prod, secret fallback off-prod), global by default or optionally gated by workspace id, org id, user id, or platform admin. Add Feature Flag is an agent skill from simstudioai/sim.

How do I install Add Feature Flag in Claude Code?

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

How do I install Add Feature Flag in Codex?

Run `npx skills add simstudioai/sim --skill add-feature-flag -a codex`. Or copy the skill folder (.agents/skills/add-feature-flag in simstudioai/sim) into .agents/skills/add-feature-flag in your project. Codex loads it when a task matches its description.

Can I use Add Feature 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 simstudioai/sim --skill add-feature-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/add-feature-flag, .gemini/skills/add-feature-flag, .github/skills/add-feature-flag and .opencode/skills/add-feature-flag in your project.

What does Add Feature Flag need to run?

Going by SKILL.md and its folder, Add Feature Flag needs credentials named FLAG_SECRET. Our summary lists: A credential in FLAG_SECRET.

Does Add Feature Flag access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Feature 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 Add Feature Flag use?

Add Feature Flag is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Feature Flag use?

About 1.6k tokens (SKILL.md is roughly 6.3k 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 Add Feature Flag?

Skills that share tags, products or a category with Add Feature Flag: Secret Scanning (github/awesome-copilot, 40k stars), Secrets Management (davila7/claude-code-templates, 32k stars), Dotenvx Secrets (kortix-ai/suna, 20k stars) and Secrets Vault Manager (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Feature Flag?

simstudioai (a GitHub organization) maintains it in simstudioai/sim, which has 29,785 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 7, 2026.

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