Agent skill

Remove Feature Flag

by androidx in androidx/androidx

A skill your agent uses to remove a feature flag when the flag is no longer needed and its current state must be made permanent.

Apache-2.0Auto-check passedDevelopment

Install Remove Feature Flag

skills CLI
$ npx skills add androidx/androidx --skill remove-feature-flag -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install androidx/androidx remove-feature-flag --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/androidx/androidx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/remove-feature-flag .claude/skills/remove-feature-flag && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
remove-feature-flag
GitHub stars
6.1k
Token cost
~1.2k tokens
SKILL.md length
589 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses to remove a feature flag when the flag is no longer needed and its current state must be made permanent.

  • Works in 6 steps: Identify the current value → Replace usages of the feature flag with… → Remove dead code → …
  • Remove a feature flag when the flag is no longer needed and its current state must be made permanent
  • SKILL.md covers Glossary, Prerequisites, Limitations and Workflow: How to Remove a…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Remove Feature Flag is an agent skill from androidx/androidx. Use this skill to remove a feature flag when the flag is no longer needed and its current state must be made permanent. This skill provides a step-by-step workflow for safely removing obsolete feature flags and their associated dead code without introducing regressions or observable behavior changes.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: Development environment for Android Jetpack extension libraries under the androidx namespace. Synchronized with Android Jetpack's primary development branch on AOSP. The licence is Apache-2.0.

When your agent uses it

  • Remove a feature flag when the flag is no longer needed and its current state must be made permanent

Example prompts

  • “/remove-feature-flag”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Identify the current value
  2. Replace usages of the feature flag with the current value
  3. Remove dead code
  4. Update tests
  5. Remove the feature flag
  6. Validate the removal

What it can do on your machine

Read from SKILL.md and the folder at commit 40ff481. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Remove Feature Flag loads about 1.2k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 589 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from androidx/androidx at commit 40ff481, republished under its Apache-2.0 licence (© androidx). 589 words, ~1,203 tokens.

Download SKILL.mdSave it as .claude/skills/remove-feature-flag/SKILL.md (or your agent's skills folder).
name
remove-feature-flag
description
Use this skill to remove a feature flag when the flag is no longer needed and its current state must be made permanent. This skill provides a step-by-step workflow for safely removing obsolete feature flags and their associated dead code without introducing regressions or observable behavior changes.

Glossary

TermDefinition
Feature FlagA mechanism to toggle functionality without deploying new code. The value can be a boolean, enum, or similar type.
RefactoringThe process of restructuring existing computer code without changing its external, observable behavior. Removing a feature flag is a refactoring change.
Dead CodeCode that is part of the source but is unreachable and can never be executed.

Prerequisites

  • The feature flag to be removed has a determined static value that is permanently enabled or disabled.
  • The project has a standard validation process including tests and linting.

Limitations

  • This skill only covers the removal of the flag and its associated code. It does not cover the process of rolling out or rolling back the feature itself.

Workflow: How to Remove a Feature flag

The primary goal is to remove the feature flag and codepaths related to the feature flag without any observable impact on library behavior.

Step 1: Identify the current value

Determine the final, permanent, static value of the feature flag, which will be used to replace all usages of the feature flag. For a boolean flag, this will either be true or false.

Step 2: Replace usages of the feature flag with the current value

In the codebase, find all instances where the feature flag is used, and replace the usage of the feature flag with the static value from Step 1.

Example:

ComposeUiFlags.isMyFeatureEnabled is a boolean feature flag that being replaced with true.

Before:

kotlin
if (myState && ComposeUiFlags.isMyFeatureEnabled) {
    newBehavior()
} else {
    oldBehavior()
}

After:

kotlin
if (myState) {
    newBehavior()
} else {
    oldBehavior()
}
Step 3: Remove dead code

After replacing the feature flag with a static value, some code paths will become unreachable. This dead code must be removed.

For example:

  • If the static value is true, then a codepath that is only used when the feature flag was false is dead code and must be removed.
  • If the static value is false, then a codepath that is only used when the feature flag was true is dead code and must be removed.
Example:

ComposeUiFlags.isMyFeatureEnabled is a boolean feature flag that is being replaced with true.

Before:

kotlin
if (ComposeUiFlags.isMyFeatureEnabled) {
    newBehavior()
} else {
    oldBehavior()
}

After:

kotlin
newBehavior()
Show full SKILL.md (251 more words)Show less
Step 4: Update tests

Find any tests that are related to the feature flag. If a test was validating a codepath that was removed in Step 3, then that test must be removed. If the only place where code is used is in a test, then that code can still be considered unreachable, and must be removed.

Step 5: Remove the feature flag

All places where the feature flag is being read to or written should now be removed. Remove the declaration of the feature flag.

Step 6: Validate the removal
  1. Run All Checks: The project must be validated in the normal manner. Execute all tests and lint checks. All checks must pass.
  2. Handle API Changes: The removal of a feature flag can often cause an API change. If it does, the API files must be updated according to project standards.

Antipatterns

DO
  • DO replace the feature flag check with its static, constant value.
  • DO remove all code paths that have become unreachable (dead code) as a result of the flag's removal.
  • DO remove any tests that were specifically written to cover the deleted, unreachable code.
  • DO run all standard project validations (tests, linting) to confirm that the change has no observable impact.
  • DO update API files if the removal resulted in an API surface change.
DON'T
  • DON'T introduce any change to the application's observable behavior. The removal must be a pure refactoring.
NEVER
  • NEVER leave dead code or obsolete tests in the codebase after removing a feature flag.

© androidx, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/remove-feature-flag of androidx/androidx.

Open the folder on GitHubat commit 40ff481

Compare with similar skills

Remove Feature Flag next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Remove Feature Flag compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Remove Feature Flag this skillandroidx/androidx6.1k—~1.2kAutomated safety check: PassApache-2.0
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from androidx/androidx

  • Find My Flags

    androidx/androidx

    A skill your agent uses to find Compose feature flags introduced by a specific git user or email and map them to the library version in which they were added.

    6.1k GitHub stars~664 tokensUpdated today
    Auto-check passed
  • Benchmark

    androidx/androidx

    Benchmarking and improving the performance of Jetpack Compose.

    6.1k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Webkit API Development

    androidx/androidx

    Step-by-step guide for implementing AndroidX WebKit APIs in frameworks/support/webkit/ after boundary interface roll.

    6.1k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Compose Catalog

    androidx/androidx

    Build, install, and run the Compose Material Catalog application on connected devices or emulators.

    6.1k GitHub stars~499 tokensUpdated today
    Auto-check passed
  • Health Connect

    androidx/androidx

    Comprehensive guide for Health Connect Jetpack SDK development.

    6.1k GitHub stars~1k tokensUpdated today
    Auto-check passed

Categories

Questions about Remove Feature Flag

What does Remove Feature Flag do?

A skill your agent uses to remove a feature flag when the flag is no longer needed and its current state must be made permanent. Remove Feature Flag is an agent skill from androidx/androidx. Use this skill to remove a feature flag when the flag is no longer needed and its current state must be made permanent.

When should I use Remove Feature Flag?

Remove Feature Flag fits situations like: remove a feature flag when the flag is no longer needed and its current state must be made permanent.

How do I install Remove Feature Flag in Claude Code?

Run `npx skills add androidx/androidx --skill remove-feature-flag -a claude-code`. Or copy the skill folder (.agents/skills/remove-feature-flag in androidx/androidx) into .claude/skills/remove-feature-flag in your project. Claude Code loads it when a task matches its description.

How do I install Remove Feature Flag in Codex?

Run `npx skills add androidx/androidx --skill remove-feature-flag -a codex`. Or copy the skill folder (.agents/skills/remove-feature-flag in androidx/androidx) into .agents/skills/remove-feature-flag in your project. Codex loads it when a task matches its description.

Can I use Remove Feature Flag in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add androidx/androidx --skill remove-feature-flag -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/remove-feature-flag, .gemini/skills/remove-feature-flag, .github/skills/remove-feature-flag and .opencode/skills/remove-feature-flag in your project.

What does Remove Feature Flag need to run?

SKILL.md names no scripts, command-line tools or credentials: Remove Feature Flag is instructions for the agent only.

Does Remove Feature Flag access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Remove Feature Flag safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Remove Feature Flag use?

Remove Feature Flag is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Remove Feature Flag use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Remove Feature Flag?

Skills that share tags, products or a category with Remove Feature Flag: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Remove Feature Flag?

androidx (a GitHub organization) maintains it in androidx/androidx, which has 6,107 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: androidx/androidx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.