feature-flags-launch-config

Manages env-var feature flags, kill switches, and staged rollout patterns for the JoyJoin server.

Updated Dec 24, 2025
One-click install
npx skills add https://github.com/JoyJoin-Tech-Limited/JoyJoin_app_v0.1 --skill feature-flags-launch-config-joyjoin-tech-limited
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-flags-launch-config
Source: https://github.com/JoyJoin-Tech-Limited/JoyJoin_app_v0.1/tree/main/.github/skills/feature-flags-launch-config
Command: npx skills add https://github.com/JoyJoin-Tech-Limited/JoyJoin_app_v0.1 --skill feature-flags-launch-config-joyjoin-tech-limited

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? It prevents unsafe feature launches by enforcing safe defaults, fail-closed startup validation, server-side flag truth, and disciplined rollout and rollback procedures for env-gated features. ## Core Features & Use Cases - Feature Flag Governance: Add, change, or audit DB-backed kill switches and env-only feature gates with safe defaults and documented behavior. - Rollout & Rollback Patterns: Plan staged rollouts with staging validation, Prometheus metric monitoring, and kill-switch incident response. - Client Exposure Rules: Expose server-side flags to clients only through /api/auth/user so the client never invents its own flag state. - Use Case: When a payment incident occurs, set PAYMENTS_ENABLED=false, verify /api/readyz returns 200, and confirm payment routes return 503 with code PAYMENTS_DISABLED while the client shows a maintenance message. ## Quick Start Ask the assistant to add a new feature flag with a safe default, gate the server logic, document it in docs/LAUNCH_CONFIG.md, and expose it to the client via /api/auth/user.

Frequently Asked Questions about feature-flags-launch-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new feature flag to a Node.js Express server?

Add the env var read in the relevant server file, gate the route or service logic with an early return or fallback, document it in docs/LAUNCH_CONFIG.md, add it to .env.example, and write tests covering both enabled and disabled paths.

How do I expose a feature flag to a React client safely?

Add the boolean to the AuthUserResponse type in packages/shared/src/api.ts and resolve it in buildAuthUserResponse.ts so the client reads it from /api/auth/user. The client must never gate UI on a local env var.

How do I kill-switch a payment feature during an incident?

Set PAYMENTS_ENABLED=false and restart or redeploy the server. Verify /api/readyz still returns 200, confirm payment routes return 503 with code PAYMENTS_DISABLED, and check the client shows a maintenance message.

Why does a feature work locally but not in production?

The flag is likely unset in production or has a different default than your local environment. Check docs/LAUNCH_CONFIG.md and the deployed env values, since defaults must be safe for production.

When should I not use a feature flag approach?

Do not use this skill when implementing the feature logic itself, handling pure auth policy or RBAC questions, or adding an LLM call. Those belong to the domain, auth, or LLM integration skills respectively.