Gate a Sentry feature behind a FlagPole feature flag. Use when adding a feature flag, registering a flag in temporary.py, checking a flag from Python or the frontend, enabling a flag in tests, or asking where FlagPole rollout config lives. Trigger on "add a feature flag", "gate this behind a flag", "register a flag", "features.has", "api_expose", "OrganizationFeature", "ProjectFeature", "FlagPole".
77
97%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
New features should be gated behind a feature flag.
Register the flag in src/sentry/features/temporary.py:
manager.add("organizations:my-feature", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)Use api_expose=True if the frontend needs to check the flag. Use ProjectFeature and a projects: prefix for project-scoped flags.
Python check:
if features.has("organizations:my-feature", organization, actor=user):Frontend check (requires api_expose=True):
organization.features.includes('my-feature');Tests:
with self.feature("organizations:my-feature"):
...Rollout: FlagPole YAML config lives in the sentry-options-automator repo, not here.
Removal: once the rollout is finished, the flag comes out in a fixed three-PR order — see the remove-option-or-flag skill.
See https://develop.sentry.dev/feature-flags/ for full docs.
getsentry/sentry
25548ea
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.