Skip to content
cccskills
FreePublished on GitHub

feature-flag-analytics-expert

Expert guide for Feature Flags & Progressive Rollout (PostHog, LaunchDarkly, GrowthBook), A/B testing orchestration, and canary releases / Panduan ahli Feature Flags, A/B testing, dan rilis bertahap.

The English summary is being prepared. Showing the original description.

Works withPlaywright
See how to install

Files included (1)

  • SKILL.md6.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Feature Flag & Progressive Rollout Expert (2026 Edition)

English | Bahasa Indonesia


<a name="english"></a>

English

Description

Production-grade engineering guide for feature flag management, progressive rollouts (canary releases), A/B testing statistical orchestration, and dynamic server-side/client-side flag evaluation using PostHog, LaunchDarkly, and GrowthBook. Covers zero-flicker server-side bootstrapping in Next.js 15 App Router, deterministic user bucketing, conversion metric tracking, and automated flag lifecycle deprecation.

Trigger Conditions

  • Decoupling software deployment from feature release with instant operational kill-switches.
  • Phased rollouts to user cohorts (e.g., internal team -> 5% beta -> 25% canary -> 100% GA).
  • Setting up multivariate A/B/n testing experiments with statistical significance monitoring.
  • Managing server-side gating in Next.js Server Components, Fastify, or Bun backends.
  • Retiring obsolete feature flags to prevent technical debt accumulation.

Zero-Flicker Server Component Pattern (Next.js 15 / PostHog)

// src/lib/posthog-server.ts
import { PostHog } from 'posthog-node';

let posthogClient: PostHog | null = null;

export function getPostHogServer(): PostHog {
  if (!posthogClient) {
    posthogClient = new PostHog(process.env.POSTHOG_API_KEY!, {
      host: process.env.POSTHOG_HOST || 'https://us.i.posthog.com',
      flushAt: 1,
      flushInterval: 0,
    });
  }
  return posthogClient;
}

// src/app/dashboard/page.tsx (React Server Component)
import { getPostHogServer } from '@/lib/posthog-server';
import { getCurrentUser } from '@/lib/auth';
import { ModernDashboard } from '@/components/dashboard/ModernDashboard';
import { LegacyDashboard } from '@/components/dashboard/LegacyDashboard';

export default async function DashboardPage() {
  const user = await getCurrentUser();
  const posthog = getPostHogServer();

  // Evaluated on the server: zero layout shift, zero client-side flicker
  const isV2Enabled = await posthog.isFeatureEnabled('modern-dashboard-v2', user.id, {
    personProperties: { tier: user.subscriptionTier, region: user.region },
  });

  return isV2Enabled ? <ModernDashboard user={user} /> : <LegacyDashboard user={user} />;
}

Client-Side Integration & Tracking (React 19)

// src/components/checkout/CheckoutCTA.tsx
'use client';

import { useFeatureFlagVariantKey } from 'posthog-js/react';
import posthog from 'posthog-js';

export function CheckoutCTA({ orderTotal }: { orderTotal: number }) {
  const variant = useFeatureFlagVariantKey('checkout-cta-variant') || 'control';

  const handleClick = () => {
    posthog.capture('checkout_button_clicked', {
      variant,
      order_total: orderTotal,
      currency: 'USD',
    });
  };

  return (
    <button
      onClick={handleClick}
      className={`rounded-lg px-6 py-3 font-semibold transition ${
        variant === 'emerald-glow'
          ? 'bg-emerald-600 text-white hover:bg-emerald-500 shadow-sm'
          : 'bg-slate-900 text-white hover:bg-slate-800'
      }`}
    >
      {variant === 'emerald-glow' ? 'Complete Secure Checkout' : 'Pay Now'}
    </button>
  );
}

Progressive Rollout Checklist

  • Deterministic Hashing: Ensure flag evaluations use stable identifiers (distinct_id / user UUID) so users do not oscillate between variants.
  • Server-Side Fallbacks: Always provide hardcoded safe fallbacks (false or 'control') if the flag provider times out (>100ms).
  • Flag Cleanup Cadence: Add calendar reminders or GitHub issues to remove flags that reach 100% rollout within 14 days.

Orchestration & Integration

  • data-telemetry-expert: Bridges flag evaluation events with analytics data pipelines.
  • nextjs-app-router-expert: Implements server-side flag evaluation to avoid Flash of Unstyled Content (FOUC).
  • e2e-testing-expert: Mocks feature flag overrides during automated Playwright tests.
  • zero-tech-debt-auditor: Scans and flags deprecated flags for systematic removal.

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Deskripsi

Panduan tingkat produksi untuk manajemen feature flags, rilis bertahap (canary rollout), orkestrasi pengujian A/B berbasis statistik, dan evaluasi fitur dinamis pada sisi server maupun klien menggunakan PostHog, LaunchDarkly, dan GrowthBook. Mencakup evaluasi server-side tanpa kedip (zero-flicker) pada Next.js 15 App Router, segmentasi pengguna deterministik, pelacakan metrik konversi, dan pembersihan siklus hidup flag secara berkala.

Kondisi Pemicu

  • Memisahkan deployment kode dari aktivasi fitur dengan tombol kill-switch instan.
  • Meluncurkan fitur secara bertahap ke kelompok pengguna (misal: tim internal -> 5% beta -> 25% canary -> 100% GA).
  • Menjalankan eksperimen A/B/n testing dengan pemantauan signifikansi statistik.
  • Mengelola pengecekan fitur di sisi server pada Server Components Next.js atau API Bun/Node.js.
  • Membersihkan flag lama untuk mencegah penumpukan utang teknis (technical debt).

Pola Integrasi Server-Side Tanpa Kedip

// src/app/checkout/page.tsx
import { getPostHogServer } from '@/lib/posthog-server';
import { auth } from '@/lib/auth';

export default async function CheckoutPage() {
  const session = await auth();
  const posthog = getPostHogServer();

  // Evaluasi langsung di server sebelum HTML dikirim ke browser
  const isSnapBiEnabled = await posthog.isFeatureEnabled(
    'doku-snap-bi-direct',
    session?.user?.id || 'anonymous'
  );

  return (
    <main className="container mx-auto p-6">
      <h1 className="text-2xl font-bold">Checkout Pembayaran</h1>
      {isSnapBiEnabled ? <DirectSnapBiPayment /> : <StandardHostedCheckout />}
    </main>
  );
}

Checklist Implementasi Rollout

  • Identitas Pengguna Deterministik: Gunakan ID pengguna yang konsisten agar pengguna yang sama tidak melihat tampilan yang berubah-ubah saat me-refresh halaman.
  • Nilai Fallback Aman: Tentukan nilai default aman jika layanan pihak ketiga mengalami latensi atau gangguan jaringan.
  • Jadwal Pembersihan Flag: Hapus pengecekan flag dari kode dalam waktu 14 hari setelah fitur diluncurkan 100%.

Integrasi Orkestrasi

  • data-telemetry-expert: Menghubungkan evaluasi fitur dengan pelacakan event analitik.
  • nextjs-app-router-expert: Mengoptimalkan evaluasi server-side agar tidak terjadi pergeseran tata letak (layout shift).
  • e2e-testing-expert: Melakukan mock nilai flag pada pengujian Playwright.
  • zero-tech-debt-auditor: Menemukan dan membersihkan flag yang sudah kedaluwarsa.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug105Updated Oct 20, 2026

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug105Updated Oct 20, 2026

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug105Updated Oct 20, 2026

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug105Updated Oct 20, 2026

Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug105Updated Oct 20, 2026

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug105Updated Oct 20, 2026

See all skills by roedyrustam

Report a problem with this skill