New to Claude Skills? Learn how to install them →

Fcivitai on GitHub

Flipt Feature Flag Management

Free

Control feature flags with GitOps for safe rollouts.

Get this skill

Free · Opens the source repo

What Flipt Feature Flag Management does

Flipt is a skill designed for managing feature flags effectively, particularly in environments that utilize GitOps for version control. This skill allows developers and teams to list, get details about, and configure feature flags without directly writing to the API, ensuring that all changes are reviewed and tracked through a Git repository. By leveraging Flipt, you can manage feature flags in a way that promotes safety and accountability, which is crucial for teams working on complex applications where feature rollouts need to be carefully controlled.

The core functionality of Flipt revolves around its command-line interface, which includes commands for listing all flags, retrieving specific flag details, and handling the creation and modification of flags through a GitOps workflow. Notably, any attempt to write changes directly via the API is deliberately refused, emphasizing the importance of using a pull request to manage changes. This design choice helps maintain a clean and auditable history of feature flag modifications, aligning with best practices in software development.

Flipt is particularly useful for teams that need to implement segmented rollouts or gradual feature releases. By utilizing rollout percentages and segment keys, developers can control which users see new features, allowing for testing and feedback before a full-scale launch. The skill is designed for environments where safety and collaboration are paramount, making it ideal for teams that prioritize code quality and peer review in their development processes.

In summary, Flipt provides a structured approach to feature flag management that integrates seamlessly with Git workflows. It is best suited for development teams looking to implement controlled feature rollouts while ensuring that all changes are subject to review and approval, thus minimizing the risk of introducing bugs or unstable features into production.

When to use it

Use this skill when you need to manage feature flags in a controlled manner, ensuring that all changes are reviewed and tracked through Git.

When not to use it

This skill is not suitable for scenarios where immediate API writes are required or when a simple feature flag management solution is sufficient.

What you can build with it

Managing Feature Flags in Production

Use Flipt to manage feature flags in your production environment, ensuring that all changes are reviewed through Git.

Segmented Rollouts for New Features

Implement segmented rollouts for new features, allowing you to test with a subset of users before a full launch.

Collaborative Feature Management

Coordinate with your team to manage feature flags collaboratively, reducing the risk of conflicts and unreviewed changes.

How to install Flipt Feature Flag Management

View source

1. Install with the skills CLI

npx skills add civitai/civitai/flipt --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by civitai

Flipt Feature Flag Management

Use this skill to manage Flipt feature flags for controlled feature rollouts.

Running Commands

Use the included script:

node .claude/skills/flipt/flipt.mjs <command> [options]

Commands

CommandDescription
listList all flags
get <key>Get details for a specific flag
create / enable / disable / deleteRefuse with exit 2 and print the GitOps steps — see below
add-variant / remove-variant / set-rolloutSame

Reads work over the API; writes are deliberately refused. This Flipt is v2, GitOps-backed by a private state repo, so a merged change becomes visible within about a poll interval.

Never write through the API. Flag state is reviewed material — change flags by opening a PR against the state repo, never by calling the API. This skill refuses writes for that reason.

Treat FLIPT_API_TOKEN as a live secret: read it from env, never inline it, and don't copy it into anything new.

Flags live at /api/v2/environments/{env}/namespaces/{ns}/resources/flipt.core.Flag. The environment (civitai-app) and namespace (default) are discovered at runtime — the environment marked default: true, then its default namespace — so a second environment can't silently redirect reads. Override with FLIPT_ENVIRONMENT / FLIPT_NAMESPACE if ever needed.

Responses carry a revision equal to the flipt-state commit SHA, which is the quickest way to confirm a flag change has actually synced:

node .claude/skills/flipt/flipt.mjs list --json | head -3   # revision == your commit

Options

FlagDescription
--description <text>, -dDescription for new flag
--enabledCreate flag as enabled (default: disabled)
--variantCreate as variant flag (default: boolean)
--variants <keys>Comma-separated variant keys (first is default)
--default <key>Set default variant key
--rollout <pct>Rollout percentage (default: 100)
--segment <key>Segment key for rules (default: all-users)
--jsonOutput results as JSON
--quiet, -qMinimal output
--force, -fSkip confirmation prompts

Examples

# List all flags
node .claude/skills/flipt/flipt.mjs list

# Get a specific flag
node .claude/skills/flipt/flipt.mjs get gift-card-vendor-waifu-way

# Creating / toggling a flag goes through GitOps — see below.
# These commands exit 2 and print the steps:
node .claude/skills/flipt/flipt.mjs disable my-feature

# JSON output for scripting
node .claude/skills/flipt/flipt.mjs list --json

GitOps Integration

Flipt uses GitOps - flags are stored in the civitai/flipt-state repository. Changes made via the API are temporary and will be overwritten on the next Git sync (every 30 seconds).

For permanent changes, edit the repository directly:

# Clone the state repo
gh repo clone civitai/flipt-state /tmp/flipt-state

# Edit civitai-app/default/features.yaml
# Add your flag under the `flags:` section

# Commit and push
cd /tmp/flipt-state
git add -A && git commit -m "Add new feature flag" && git push

Flag Format in YAML

flags:
  - key: my-feature-flag
    name: my-feature-flag
    type: BOOLEAN_FLAG_TYPE
    description: Description of what this flag controls
    enabled: false
    # Optional: rollout rules
    rollouts:
      - threshold:
          percentage: 50
          value: true
      - segment:
          keys:
            - moderators
          operator: OR_SEGMENT_OPERATOR
          value: true

Safety Notes

  1. Do not write through the API: it pushes an unreviewed commit to flipt-state main
  2. Test before enabling: Use segments for gradual rollout
  3. Coordinate with team: Others may be editing the same flags

Environment Setup

Copy .env.example to .env and configure:

cp .claude/skills/flipt/.env.example .claude/skills/flipt/.env

The skill needs FLIPT_URL and FLIPT_API_TOKEN to connect to Flipt.

Frequently asked questions about Flipt Feature Flag Management

Similar skills