Skip to content
Back to skills

Feature Flags

ASecurity

```typescript // Simple feature flag service const flags = new Map<string, boolean>() export const featureFlags = { isEnabled(key: string): boolean { return flags.get(key) ?? false }, enable(key: string) { flags.set(key, true) }, disable(key: string) { flags.set(key, false) }, } // Usage if (featureFlags.isEnabled('new-checkout')) { return <NewCheckout /> } return <OldCheckout /> ``` ```typescript // Simple A/B bucket function get

  • 21 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 7, 2026
developmenttypescripttesting

Security analysis

A100/100

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill feature-flags --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Feature Flags?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Feature Flags
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-feature-flags/badge)](https://www.skillsdirectory.com/skills/modbender-feature-flags)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Feature Flags & Progressive Delivery

## Feature Flag Implementation

```typescript
// Simple feature flag service
const flags = new Map<string, boolean>()

export const featureFlags = {
  isEnabled(key: string): boolean {
    return flags.get(key) ?? false
  },
  
  enable(key: string) {
    flags.set(key, true)
  },
  
  disable(key: string) {
    flags.set(key, false)
  },
}

// Usage
if (featureFlags.isEnabled('new-checkout')) {
  return <NewCheckout />
}
return <OldCheckout />
```

## A/B Testing

```typescript
// Simple A/B bucket
function getBucket(userId: string, experiment: string): 'a' | 'b' {
  const hash = hash(`${userId}:${experiment}`)
  return hash % 2 === 0 ? 'a' : 'b'
}

// Usage
const bucket = getBucket(userId, 'checkout-button-color')
if (bucket === 'a') {
  return <Button color="blue" />
}
return <Button color="green" />
```

## Kill Switch

```typescript
// Emergency disable
app.get('/feature/:key', (req, res) => {
  if (req.query.disable === 'true') {
    featureFlags.disable(req.params.key)
    return res.json({ status: 'disabled' })
  }
  return res.json({ enabled: featureFlags.isEnabled(req.params.key) })
})
```

## Checklist

- [ ] Choose feature flag tool (LaunchDarkly, Unleash, custom)
- [ ] Implement flag evaluation
- [ ] Add user targeting
- [ ] Set up A/B experiments
- [ ] Create kill switches
- [ ] Plan rollout percentage

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.