home / skills / a5c-ai / babysitter / feature-flags

This skill helps teams design and rollout feature flags with controlled canary strategies, targeting, and rollback procedures.

npx playbooks add skill a5c-ai/babysitter --skill feature-flags

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
4.8 KB
---
name: Feature Flagging
description: Feature flag configuration and rollout planning for controlled releases
allowed-tools:
  - Read
  - Write
  - Glob
  - Grep
  - Bash
---

# Feature Flagging Skill

## Overview

Specialized skill for feature flag configuration and rollout planning. Enables product teams to plan and manage controlled feature releases with proper targeting, monitoring, and rollback strategies.

## Capabilities

### Flag Design
- Generate feature flag specifications
- Design flag naming conventions
- Create flag documentation templates
- Define flag types (release, experiment, ops, permission)
- Plan flag dependencies and interactions

### Rollout Planning
- Design rollout percentage strategies
- Create flag targeting rules
- Plan canary and gradual rollouts
- Define geographic or segment-based rollouts
- Create rollout schedules

### Operations
- Generate kill switch procedures
- Track flag lifecycle and cleanup
- Monitor flag impact on metrics
- Plan flag deprecation
- Create incident response procedures

## Target Processes

This skill integrates with the following processes:
- `product-launch-gtm.js` - Feature flag rollout for launches
- `beta-program.js` - Beta feature flagging
- `conversion-funnel-analysis.js` - A/B test flag management

## Input Schema

```json
{
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": ["design", "rollout", "audit", "deprecate"],
      "description": "Operation mode"
    },
    "feature": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "description": { "type": "string" },
        "type": { "type": "string", "enum": ["release", "experiment", "ops", "permission"] },
        "owner": { "type": "string" },
        "impactLevel": { "type": "string", "enum": ["low", "medium", "high", "critical"] }
      }
    },
    "rolloutStrategy": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "enum": ["percentage", "segment", "geographic", "gradual"] },
        "stages": { "type": "array", "items": { "type": "object" } },
        "criteria": { "type": "object" }
      }
    },
    "existingFlags": {
      "type": "array",
      "items": { "type": "object" },
      "description": "Existing flags for audit or cleanup"
    }
  },
  "required": ["mode"]
}
```

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "flagSpec": {
      "type": "object",
      "properties": {
        "key": { "type": "string" },
        "name": { "type": "string" },
        "description": { "type": "string" },
        "type": { "type": "string" },
        "defaultValue": { "type": "boolean" },
        "variations": { "type": "array", "items": { "type": "object" } },
        "targetingRules": { "type": "array", "items": { "type": "object" } },
        "prerequisites": { "type": "array", "items": { "type": "string" } }
      }
    },
    "rolloutPlan": {
      "type": "object",
      "properties": {
        "stages": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "stage": { "type": "string" },
              "percentage": { "type": "number" },
              "targeting": { "type": "object" },
              "duration": { "type": "string" },
              "successCriteria": { "type": "array", "items": { "type": "string" } },
              "rollbackTriggers": { "type": "array", "items": { "type": "string" } }
            }
          }
        },
        "metrics": { "type": "array", "items": { "type": "string" } },
        "alerts": { "type": "array", "items": { "type": "object" } }
      }
    },
    "killSwitch": {
      "type": "object",
      "properties": {
        "procedure": { "type": "array", "items": { "type": "string" } },
        "owner": { "type": "string" },
        "escalation": { "type": "array", "items": { "type": "string" } }
      }
    },
    "lifecycle": {
      "type": "object",
      "properties": {
        "createdDate": { "type": "string" },
        "plannedRemovalDate": { "type": "string" },
        "cleanupTasks": { "type": "array", "items": { "type": "string" } }
      }
    }
  }
}
```

## Usage Example

```javascript
const flagPlan = await executeSkill('feature-flags', {
  mode: 'rollout',
  feature: {
    name: 'New Dashboard Experience',
    description: 'Redesigned analytics dashboard with AI insights',
    type: 'release',
    owner: 'product-team',
    impactLevel: 'high'
  },
  rolloutStrategy: {
    type: 'gradual',
    stages: [
      { name: 'internal', percentage: 100, duration: '3 days' },
      { name: 'beta', percentage: 10, duration: '1 week' },
      { name: 'early-adopters', percentage: 25, duration: '1 week' },
      { name: 'general', percentage: 100, duration: 'permanent' }
    ]
  }
});
```

## Dependencies

- Feature flag platforms (LaunchDarkly, Split, Flagsmith)
- Monitoring and alerting systems

Overview

This skill helps teams design, plan, and operate feature flags for controlled releases. It produces flag specifications, rollout plans, kill-switch procedures, and lifecycle tracking to reduce risk during launches. The skill focuses on clear targeting, measurable success criteria, and safe rollback paths for any release type.

How this skill works

Provide a mode (design, rollout, audit, deprecate) plus feature metadata and an optional rolloutStrategy or existingFlags list. The skill generates a flagSpec with naming, defaults, variations and prerequisites, a staged rolloutPlan with success criteria and rollbackTriggers, an operational killSwitch procedure, and cleanup/lifecycle tasks. Outputs align with common flag platforms and include monitoring and alert definitions to integrate with observability systems.

When to use it

  • Planning a controlled launch or canary rollout for a new feature
  • Designing experiments or A/B tests that require precise targeting
  • Auditing existing flags to find cleanup and deprecation opportunities
  • Preparing operational runbooks and kill-switch procedures before release
  • Coordinating rollouts across regions, segments, or beta programs

Best practices

  • Name flags consistently: include team, feature, and intent (e.g., product.new-dashboard.release)
  • Always define defaultValue and safe fallback behavior for client failures
  • Start with small, observable cohorts and expand based on pre-defined success criteria
  • Create explicit kill-switch steps and assign an owner for rapid rollback
  • Schedule flag removal during planning to prevent long-lived technical debt

Example use cases

  • Generate a rolloutPlan for a high-impact release with staged percentage increases and monitoring alerts
  • Design experiment flags with variations, targeting rules, and metric-based success criteria
  • Audit existingFlags to produce a cleanup checklist and plannedRemovalDate
  • Create an ops flag and incident procedure to disable a risky subsystem immediately
  • Plan geographic rollouts with region-specific stages and escalation paths

FAQ

Which inputs are required to generate a rollout plan?

At minimum set mode to 'rollout' and provide feature metadata; supplying rolloutStrategy.stages yields a detailed staged plan.

Can this output be used with common flag platforms?

Yes. Outputs are platform-agnostic and map to LaunchDarkly, Split, Flagsmith fields such as key, variations, targetingRules, and stages.

How does the skill handle risk and rollback?

It produces rollbackTriggers tied to metrics, a killSwitch procedure with owner and escalation steps, and stage-based successCriteria to gate progress.