Feature flag system

From abcnuts/manus-skills · View interactive version

Feature flag system is an AI agent skill from the GitHub repository abcnuts/manus-skills. Toggle features without deployment using feature flags

How to use this skill

Skill file

Feature Flag System Skill

Implement feature flags to toggle features, run A/B tests, and control rollouts without redeployment.

Purpose

Enable gradual feature rollouts, A/B testing, kill switches, and environment-specific behavior.

When to Use

Quick Start

python3 /home/ubuntu/skills/feature-flag-system/scripts/setup_flags.py /path/to/project

Usage Example

import { useFeatureFlag } from '@/lib/flags'

export function Dashboard() {
  const { enabled } = useFeatureFlag('new_dashboard')
  
  if (enabled) return <NewDashboard />
  return <OldDashboard />
}

Common Patterns

Percentage Rollout

// Roll out to 25% of users
const rollout = 25
const userHash = hashUserId(user.id) % 100
if (userHash < rollout) {
  // Show new feature
}

User-Based Access

const betaUsers = ['user1', 'user2']
if (betaUsers.includes(user.id)) {
  // Show beta feature
}

Providers

Time Savings

Manual: 1-2 hours

With Skill: 10-15 minutes

Saved: ~1.5 hours per project

Files

Related Skills

Ship features safely with instant rollback capability.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.