redis/feature-flags
>- Create, modify, and remove feature flags in RedisInsight. Use when adding a new feature flag, introducing a dev flag, promoting a dev flag to regular, cleaning up old flags, or the user mentions feature flags, feature toggles, or gating features.
npx skills add https://github.com/redis/RedisInsight --skill feature-flags
RedisInsight has its own feature flag system. Flags are defined in a remote JSON config, fetched by the backend, and served to the frontend via API. This skill covers how to add, promote, and remove flags.
| Type | Naming | flag value | Strategy | Purpose |
| ---------------------------- | --------------------------------- | ------------ | ------------------------ | ------------------------------------------------------------ |
| Dev flag | dev-<name> (e.g. dev-browser) | false | CommonFlagStrategy | Hide incomplete features during development |
| Regular flag | camelCase (e.g. azureEntraId) | true | CommonFlagStrategy | Standard on/off toggle |
| Regular with data | camelCase | true | WithDataFlagStrategy | Flag + extra config payload in data |
| Switchable (overridable) | camelCase | true | SwitchableFlagStrategy | User can override locally via ~/.redis-insight/config.json |
Every new flag touches these files (in order):
redisinsight/api/config/features-config.jsonAdd the flag entry with flag, perc, optional filters and data. Bump the version number.
redisinsight/api/src/modules/feature/constants/index.tsAdd to the KnownFeatures enum.
redisinsight/api/src/modules/feature/constants/known-features.tsAdd entry to the knownFeatures record with name and storage (usually FeatureStorage.Database).
redisinsight/api/src/modules/feature/providers/feature-flag/feature-flag.provider.tsRegister the flag with its strategy (see Strategy Types below).
redisinsight/ui/src/constants/featureFlags.tsAdd to the FeatureFlags enum.
redisinsight/ui/src/slices/app/features.tsAdd default state entry in initialState.featureFlags.features with { flag: false }.
Choose the strategy based on what the flag needs:
CommonFlagStrategy → Most flags (dev and regular on/off)
WithDataFlagStrategy → Flag needs to carry extra data payload
SwitchableFlagStrategy → Flag should be overridable via local config.json
Register in feature-flag.provider.ts:
this.strategies.set(
KnownFeatures.YourFeature,
new CommonFlagStrategy(this.featuresConfigService, this.settingsService),
);
"dev-myFeature": {
"flag": false,
"perc": [[0, 100]]
}
"myFeature": {
"flag": true,
"perc": [[0, 100]],
"filters": [
{ "name": "config.server.buildType", "value": "ELECTRON", "cond": "eq" }
]
}
"myFeature": {
"flag": true,
"perc": [[0, 10]]
}
"myFeature": {
"flag": true,
"perc": [[0, 100]],
"data": { "strategy": "ioredis" }
}
Filters compare a value from server state against the filter value.
| Condition | Meaning |
| ------------ | ------------------------------- |
| eq | equals |
| neq | not equals |
| gt / gte | greater than / greater or equal |
| lt / lte | less than / less or equal |
Common name paths: config.server.buildType (ELECTRON, DOCKER_ON_PREMISE, REDIS_STACK), config.server.packageVersion (uses semver), agreements.analytics, env.<VAR_NAME>.
Filters support and/or composition for complex conditions.
Use for features under active development that should not be visible in production.
features-config.json → add "dev-myFeature": { "flag": false, "perc": [[0, 100]] }constants/index.ts → add DevMyFeature = 'dev-myFeature' to KnownFeaturesconstants/known-features.ts → add record entryfeature-flag.provider.ts → register with CommonFlagStrategyui/src/constants/featureFlags.ts → add devMyFeature = 'dev-myFeature'ui/src/slices/app/features.ts → add default { flag: false }When the feature is complete and ready for rollout.
dev-myFeature → myFeature in all the files aboveflag: true in features-config.jsonperc for gradual rollout (e.g. [[0, 10]])SwitchableFlagStrategy for overridable)versionWhen a feature is fully rolled out and the flag is no longer needed.
features-config.jsonKnownFeatures enumknownFeatures recordfeature-flag.provider.tsFeatureFlags enumfeatures.tsFeatureFlagComponent wrappers) in consuming componentsimport { FeatureFlags } from 'uiSrc/constants';
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features';
const features = useSelector(appFeatureFlagsFeaturesSelector);
const isEnabled = features[FeatureFlags.myFeature]?.flag;
export const isMyFeatureEnabledSelector = (state: RootState): boolean => {
const features = state.app.features.featureFlags.features;
return features[FeatureFlags.myFeature]?.flag ?? false;
};
Take redis/feature-flags from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.