remove-option-or-flag

Removes Sentry options and FlagPole feature flags through an ordered three-PR deployment sequence.

44.7k|4.8k|Updated Aug 30, 2010
One-click install
npx skills add https://github.com/getsentry/sentry --skill remove-option-or-flag
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remove-option-or-flag
Source: https://github.com/getsentry/sentry/tree/main/.agents/skills/remove-option-or-flag
Command: npx skills add https://github.com/getsentry/sentry --skill remove-option-or-flag

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deleting a Sentry option or FlagPole feature flag in the wrong order flips production behavior or turns the options automator red on main for everyone. This Skill encodes the fixed three-PR removal order across sentry, getsentry, and sentry-options-automator so removals land safely.

Core Features & Use Cases

  • Ordered removal plan: Produces a three-PR sequence — collapse call sites, remove the automator value, then remove the registration — with each step gated on the previous one being deployed, not just merged.
  • Precondition checks: Verifies the option is automator-managed, finds every read across sentry and getsentry, and reads the current value from the automator at HEAD before collapsing branches.
  • Failure diagnosis: Explains unregistered-option errors, options drift, stuck sentry_option rows, and behavior flips, with the correct fix for each.
  • Use Case: A flag reached 100% rollout and you ask to clean it up; the Skill plans the frontend and backend collapse PRs, the automator YAML removal, and the registration deletion in the correct order.

Quick Start

Ask the agent to remove the fully rolled-out feature flag or option by name and have it produce the ordered PR plan.

Frequently Asked Questions about remove-option-or-flag

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

FAQPage Schema
How do I remove a Sentry feature flag after full rollout?

Remove a Sentry feature flag in three deployed PRs: first collapse every call site to the rolled-out outcome, then delete the flag block from the automator's flagpole.yaml, and finally remove the manager.add registration from temporary.py. Each step must be deployed before the next merges.

What is the correct order to delete a Sentry option?

Delete usage first, then the automator value, then the registration in defaults.py. Reversing the order either reverts production to the pre-rollout default or leaves the automator reporting an unregistered option on main.

Why does the options automator report an unregistered option?

The unregistered-option error means the registration was removed from defaults.py while values still exist in the automator YAML. Land the step-2 removal of the value, or re-register the option so the automator can unset it before deregistering.

Does this apply to FlagPole flags as well as options?

Yes, FlagPole flags follow the same order because registering a flag auto-registers an option feature.<name> with FLAG_AUTOMATOR_MODIFIABLE. Flags live only in options/default/flagpole.yaml with no per-region files.

When should a feature flag not be deleted?

Do not delete a flag that gates a plan or tier entitlement, since it is permanent. Move its manager.add from temporary.py to permanent.py and keep the automator entry instead of removing it.