Turn stale feature flags into weekly Jira cleanup tickets

Every Monday, we find the feature flags your team has outgrown, open a cleanup ticket for each one, and post a single summary to Slack.

Agentic Task
LaunchDarklyJiraSlackEngineeringAI ReportsNotifications & Alerts
PromptCreate

Every Monday at 9am, audit our LaunchDarkly feature flags for ones that have turned into technical debt, and open a Jira cleanup ticket for each one.

Start in LaunchDarkly with "List feature flag statuses" against the production environment. A flag is a cleanup candidate when its status is launched or inactive and its last requested date is more than 30 days ago. Launched means the flag is fully rolled out and is no longer making a decision; inactive means nothing has evaluated it recently. Both are signals the flag can probably come out of the codebase. Treat the 30 day window as a setting I may want to change.

For every candidate, gather the flag's details using "List feature flags" and "Get feature flag" so you have its name, key, description, tags, maintainer, creation date, and per-environment configuration.

Skip any flag tagged permanent or ops. Those tags mark kill switches and long-lived operational toggles that are supposed to stay in place, so they must never be proposed for removal even when they look inactive. Skip them silently, but keep a count so you can mention how many were excluded.

Before creating anything, use Jira "Search Issues (JQL)" to look for an open cleanup ticket that already references the flag key in our engineering project. If one exists, skip that flag. This runs every week, so it must not reopen the same ticket each Monday.

For each remaining flag, create a ticket with Jira "Create Issue" in our engineering project. Lead the title with the flag key so it is searchable, for example "Remove stale flag: checkout-new-payment-form". In the description cover when the flag was created, when it was last evaluated and how many days ago that was, which environments still have it enabled, and the flag's own description and tags for context. Where LaunchDarkly records a maintainer, assign the ticket to that person by matching their email with "Find Users Assignable to Issue". If there is no maintainer or no matching Jira user, leave it unassigned rather than guessing.

Finish by posting a single roundup to Slack with "Send a Message". One message for the whole run, not one per flag. Include how many stale flags were found, the tickets that were opened with their keys and links alongside the flag each covers, and call out the three oldest offenders by how long they have gone unevaluated. If nothing qualified, post a short all clear instead so we know the audit ran.

What does this prompt do?

  • Checks your production feature flags every Monday morning and spots the ones that are fully rolled out or have not been used in more than 30 days.
  • Opens a Jira ticket for each stale flag, titled with the flag key, explaining when it was created, when it was last used and where it is still switched on, and assigning it to the engineer who owns it when that is on record.
  • Leaves anything tagged permanent or ops alone, so kill switches and long-lived operational toggles are never proposed for removal.
  • Posts one Slack roundup with the total number of stale flags found, the tickets it opened, and the three oldest offenders.

What do I need to use this?

  • A LaunchDarkly account with access to the project and production environment you want audited
  • A Jira project where your engineering team tracks cleanup work
  • A Slack workspace and a channel for the weekly roundup
  • Flag maintainers filled in on LaunchDarkly, if you want tickets assigned to owners automatically

How can I customize it?

  • Change the staleness window. Thirty days is the default, but teams on slower release cycles often move it to sixty or ninety.
  • Adjust which flags get skipped. The default leaves anything tagged permanent or ops untouched, and you can add your own tags such as killswitch or compliance.
  • Change the day and time it runs, the Jira project tickets land in, or the Slack channel that gets the roundup.

FAQs

Will this turn off or delete any of my feature flags?
No. It only reads your flag data and opens tickets. Deciding whether a flag really comes out of the code, and actually removing it, stays with your engineers.
How does it decide a flag is stale?
A flag qualifies when it is either fully rolled out or has had no activity, and it has not been evaluated in more than 30 days. Both are strong signals the flag is finished doing its job. You can change the 30 day window.
What stops it from flagging our kill switches?
Any flag tagged permanent or ops is skipped automatically. Those tags are the usual home for kill switches and operational toggles that are meant to live forever, and you can add more tags to the skip list.
Will it open the same ticket again every week?
No. Before creating anything it checks your Jira project for an open cleanup ticket for that flag key, and skips the ones already tracked. You get one ticket per flag, not a new one every Monday.
What happens if nobody is listed as the flag's owner?
The ticket still gets created, just left unassigned so your team can triage it. It never guesses at an owner.

Related templates

Auto-fix your calendar when a flight slips, and flag what's at risk

When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.

Google Calendar
AviationStack
Slack
Agentic Task
Build a credential rotation checklist when someone leaves

When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.

1Password
Rippling
Slack Bot
+1
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Turn procurement portal tenders into CRM deals each morning

Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.

Anchor Browser
Google Sheets
HubSpot
+1
Agentic Task
Turn each week's football fixtures into a venue staffing plan

Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.

API-Sports
Google Calendar
Slack
Agentic Task
Turn 5 star Yotpo reviews into a weekly marketing content queue

Every Tuesday we pull your best new reviews, draft social captions, email testimonials and product page quotes, then stage them in Notion for approval.

Yotpo
Notion
Slack
Agentic Task

Stop paying interest on flags nobody uses.

Put flag cleanup on a schedule so old toggles get a ticket and an owner instead of a spreadsheet and good intentions.