feature-flags

Implement feature toggles in Java and Spring Boot to decouple deployment from release.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/oriddd/ai-toolkit --skill feature-flags-oriddd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-flags
Source: https://github.com/oriddd/ai-toolkit/tree/main/copilot/public/skills/feature-flags
Command: npx skills add https://github.com/oriddd/ai-toolkit --skill feature-flags-oriddd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Shipping incomplete features safely is hard when every merge to main goes straight to production. This Skill shows how to hide unfinished or risky functionality behind feature flags so code can be deployed without being released to users. ## Core Features & Use Cases - Toggle Patterns: Covers release, experiment, ops, and permission toggles, plus the Toggle-in-Logic pattern and structural toggles using Spring's @ConditionalOnProperty to swap entire bean implementations. - Remote Flag Providers: Guidance on using Unleash, LaunchDarkly, or Spring Cloud Config for dynamic, runtime flag updates without restarts. - Lifecycle Management: Rules for retiring flags to prevent zombie flags and technical debt, plus testing strategies for both flag states. - Use Case: You are building a new storage backend. Wrap it in a features.storage.use-s3 flag, deploy to production with the flag off, enable it for internal users, then remove the flag once rollout reaches 100%. ## Quick Start Apply the feature-flags skill to add a toggle around the new algorithm in the current Spring Boot service.

Frequently Asked Questions about feature-flags

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

FAQPage Schema
How do I implement feature flags in Spring Boot?

Use a FeatureStore or client library to check flags in code, or use @ConditionalOnProperty to swap entire bean implementations based on a property like features.storage.use-s3. Always define a default value, usually false, in case the provider is unreachable.

Unleash vs LaunchDarkly for feature toggles?

Both Unleash and LaunchDarkly provide SDKs for real-time flag updates without application restarts, unlike static application.yaml toggles. Spring Cloud Config is another option when you need refreshable beans rather than a dedicated flag platform.

When should I use @ConditionalOnProperty instead of if-else toggles?

Use @ConditionalOnProperty for structural toggles that switch entire bean implementations, such as swapping a local storage client for an S3 client. Use in-logic if-else checks for smaller behavioral branches close to the business logic.

How do I test code that uses feature flags?

Test both states of every flag. Mock the FeatureToggleProvider to return true and false in unit tests, and run component tests with the flag set to the expected state for that environment.

When should feature flags be removed?

Remove a flag once the feature is 100% rolled out and stable. Create a removal task in the backlog the moment the flag is created, since zombie flags that stay fully on or off for months become technical debt.