From aj-geddes-useful-ai-prompts-4
Implements feature flags for gradual rollouts, A/B testing, canary deployments, and kill switches. Provides TypeScript services, React hooks, analytics integration, LaunchDarkly-style SDK, and admin UI.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Implement feature flags to decouple deployment from release, enable gradual rollouts, A/B testing, and provide emergency kill switches.
Minimal working example:
interface FlagConfig {
key: string;
enabled: boolean;
description: string;
rules?: FlagRule[];
variants?: FlagVariant[];
createdAt: Date;
updatedAt: Date;
}
interface FlagRule {
type: "user" | "percentage" | "attribute" | "datetime";
operator: "in" | "equals" | "contains" | "gt" | "lt" | "between";
attribute?: string;
values: any[];
}
interface FlagVariant {
key: string;
weight: number;
value: any;
}
interface EvaluationContext {
userId?: string;
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Feature Flag Service (TypeScript) | Feature Flag Service (TypeScript) |
| React Hook for Feature Flags | React Hook for Feature Flags |
| Feature Flag with Analytics | Feature Flag with Analytics |
| LaunchDarkly-Style SDK | LaunchDarkly-Style SDK |
| Admin UI for Feature Flags | Admin UI for Feature Flags |