Akvelon built a production AI skill that removes obsolete feature flags from production code and tests, handles multiple flag types, and prepares changes for engineer review within the existing GitHub Copilot workflow.
The challenge: repetitive cleanup across production code and tests
In a large enterprise codebase, obsolete feature flags had accumulated across production code and test files. Each cleanup required engineers to locate the relevant references, identify the flag type, apply the correct removal logic, and prepare the changes for review.
The work was repetitive but not uniform. Disabled, enabled, kill switch, and inverted flags each required different handling. The team estimated that one cleanup required approximately two to four hours of engineering effort.

Technical approach: one AI skill for flag logic, production code, and tests
Akvelon built a feature flag cleanup skill for GitHub Copilot that automates the preparation stages of the removal workflow. An engineer assigns a cleanup ticket to GitHub Copilot in the existing Azure DevOps repository, and the skill processes the task within the team’s current engineering environment.
The skill identifies the flag type, prepares the required changes in production code, removes corresponding references from test files, and creates pull-request changes for engineer review.
The team also found that sending multiple cleanup tickets to the agent at once – rather than one at a time – worked well in practice. The agent processes them in sequence, prepares the code changes for each flag, and delivers all results ready for engineer review as a batch.
Because feature flags are not uniform, the skill includes separate handling for disabled, enabled, kill switch, and inverted patterns. This allowed the team to use it as a recurring cleanup workflow rather than a one-time automation.
No separate standalone tool was required. Ticket assignment within the existing GitHub Copilot and Azure DevOps workflow acts as the trigger.
Measured operational impact
The team used the skill to remove 13 feature flags during a 3-week sprint. Time per cleanup dropped from 2–4 hours to 20–40 minutes. 10 out of 13 pull requests required no major rework. Cases where Copilot proposed incorrect or incomplete logic that engineers had to discard and redo manually.
The skill is now the default tool for feature flag cleanup across the codebase.
The solution was also productionized and made available through a shared enterprise engineering platform, supporting broader reuse beyond the initial team.
Beyond the time reduction, consistent flag removal supports technical debt reduction and a cleaner, more maintainable codebase.
Where this approach delivers value
The skill is most relevant where feature flag cleanup is recurring, flag patterns vary, and teams want to reduce repetitive technical debt work without removing engineer control.
Estimated setup time: 1–2 days. Once configured, the skill can support recurring cleanup as additional feature flags become obsolete.




