Agent skill

Feature Flag Removal

by nwjs in nwjs/chromium.src

A skill your agent uses when removing a base::Feature and its associated code

BSD-3-ClauseAuto-check passed

Install Feature Flag Removal

skills CLI
$ npx skills add nwjs/chromium.src --skill feature-flag-removal -a claude-code

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

GitHub CLI
$ gh skill install nwjs/chromium.src feature-flag-removal --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/nwjs/chromium.src.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/feature-flag-removal .claude/skills/feature-flag-removal && 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
feature-flag-removal
GitHub stars
160
Token cost
~2.1k tokens
SKILL.md length
1,048 words
Files
2
Skills in repo
64
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

A skill your agent uses when removing a base::Feature and its associated code

  • Works in 12 steps: Determine flag's default state → Remove C++ flag enablement checks → Remove obsolete base::FeatureParams → …
  • Removing a base::Feature and its associated code
  • Calls git

What it does

Feature Flag Removal is an agent skill from nwjs/chromium.src. Use when removing a base::Feature and its associated code

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It works with C++. The repository describes itself as: Chromium codebase with NW.js modifications. Based on https://chromium.googlesource.com/chromium/src.git. The licence is BSD-3-Clause.

When your agent uses it

  • Removing a base::Feature and its associated code

Example prompts

  • “/feature-flag-removal”

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Determine flag's default state
  2. Remove C++ flag enablement checks
  3. Remove obsolete base::FeatureParams
  4. Remove obsolete C++ test coverage
  5. Clean up Java code
  6. Clean up WebUI frontend code
  7. Simplify APIs and expressions
  8. Remove dead code
  9. Delete unused imports and build deps
  10. Delete flag-metadata.json entry
  11. Clean up //testing/variations/fieldtrial_testing_config.json
  12. Delete unused strings or resources

What it can do on your machine

Read from SKILL.md and the folder at commit a9e8946. 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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Feature Flag Removal loads about 2.1k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 1,048 words of instructions outside code blocks.

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

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 nwjs/chromium.src at commit a9e8946, republished under its BSD-3-Clause licence (© nwjs). 1,048 words, ~2,124 tokens.

Download SKILL.mdSave it as .claude/skills/feature-flag-removal/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
feature-flag-removal
description
Use when removing a `base::Feature` and its associated code

Your task is to clean up a base::Feature flag and its associated code.

<checklist>
  1. Determine flag's default state:

    • Search for the BASE_FEATURE that defines the flag's default state (either ENABLED_BY_DEFAULT or DISABLED_BY_DEFAULT).
    • If the default is platform-specific (i.e., guarded by #if BUILDFLAG()), ask the user to clarify which should be considered the final state.
    • If no definition exists, check //third_party/blink/renderer/platform/runtime_enabled_features.json5, which is a config that generates base::Features at build time. Treat the "stable" status as ENABLED_BY_DEFAULT and all other statuses as DISABLED_BY_DEFAULT.
    • If the flag has a uniform default state but is explicitly overridden (e.g., force-disabled) for specific platforms via runtime overrides, bring this discrepancy to the user's attention before cleaning it up.
  2. Remove C++ flag enablement checks:

    • Find C++ callsites where the feature enablement is checked. This usually takes the form of base::FeatureList::IsEnabled(kFeature) calls or a free Is<X>Enabled() helper function that wraps the former.
    • Simplify each enablement check as if the default state were inlined. Usually, you will need to delete one branch of an if-else condition and dedent the other.
    • The final code should almost never contain true or false literals. Any true or false in a larger boolean expression should be simplified as much as possible.
  3. Remove obsolete base::FeatureParams:

    • Search for BASE_FEATURE_PARAMs that are linked to the obsolete feature flag.
    • Replace each retrieval of the parameter's value with the default value. Improve readability by using a constant (if the same value needs to be shared in multiple places) or a named call parameter (e.g., FunctionCall(/*param=*/67)).
  4. Remove obsolete C++ test coverage:

    • Remove base::test::ScopedFeatureLists that explicitly set the feature in the default state.
    • If keeping the enabled state (deleting the disabled path):
      • Remove tests that only exercise the disabled state.
      • Remove base::test::ScopedFeatureLists that forced-enable the feature.
    • If keeping the disabled state (deleting the enabled path):
      • Remove tests that only exercise the enabled state and are no longer relevant.
      • Update tests that previously forced-enabled the feature to verify the permanent disabled behavior (instead of deleting them, if the test covers general functionality).
      • Ensure helper test listener/observer implementations handle the absence of feature-specific events safely (e.g., check for null pointers when casting events).
    • Remove references to the obsolete feature in test names.
  5. Clean up Java code:

    • Check if the base::Feature is used in Java code by searching for the constant case version of the base::Feature name (e.g., FOO_BAR for kFooBar).
    • Simplify the Java code in the same way as the C++ case (enablement checks, parameters, tests).
  6. Clean up WebUI frontend code:

    • If the base::Feature state was formerly sent to a WebUI frontend (e.g., with AddBoolean("isFooEnabled", base::FeatureList::IsEnabled(kFoo))), clean up isFooEnabled flags from WebUI frontend files (TypeScript/HTML/CSS) in the same way as the C++ case.
  7. Simplify APIs and expressions:

    • Try to simplify APIs or expressions. For example:
      • Suppose a method takes a std::optional<T> that's std::nullopt with the feature disabled, and T with the feature enabled. If the feature-disabled case is being removed, then the parameter can just become a value of type T.

      • Inline trivial local variable assignments. For example,

        cpp
        const auto x = base::FeatureList::IsEnabled(kFoo) ? Enum::A : Enum::B;
        Bar(x);

        ... will become:

        cpp
        const auto x = Enum::A;
        Bar(x);

        ... if one naively removes an ENABLED_BY_DEFAULT flag kFoo, but this can be simplified further as:

        cpp
        Bar(Enum::A);

        ... since the assignment to x is adding unnecessary indirection.

  8. Remove dead code:

    • In all removed lines, check for functions, classes, and constants that are no longer referenced and delete their declarations and definitions. You may need to delete entire source files.
    • Continue this process for all code that becomes unreferenced.
    • Remove declarations and definitions for the obsolete flag and its parameters.
  9. Delete unused imports and build deps:

    • Remove #includes, #imports, and forward declarations that are no longer needed.
    • Remove BUILD.gn deps that are no longer needed.
    • Remove deleted source files from BUILD.gn.
  10. Delete flag-metadata.json entry:

    • If you modified //chrome/browser/about_flags.cc or //ios/chrome/browser/flags/about_flags.mm, remove the corresponding entry from //chrome/browser/flag-metadata.json. By convention, a base::Feature declared as kFooBar has foo-bar as its about:flags name.
  11. Clean up //testing/variations/fieldtrial_testing_config.json:

    • Remove references to the obsolete feature flag and its parameters.
    • Delete any experiments or studies that become empty.
  12. Delete unused strings or resources:

    • At build time, .grd and .grdp files generate identifiers starting with IDR_ and IDS_ for resources and localized strings, respectively. In Java, these are static members on an R class (e.g., R.string.foo corresponds to IDS_FOO).
    • If any string or resource has no more users in either C++ or Java:
      • Delete its definition in a .grd(p) file.
      • Delete orphaned resource files.
      • For an orphaned string IDS_FOO, delete its corresponding IDS_FOO.png.sha1 file, which references a screenshot to help translators.
  13. Update metrics:

    • If an enumerated histogram no longer emits certain values, find the obsolete values in a enums.xml file under //tools/metrics/histograms/ and prepend (Obsolete) to the <int label=...>.
    • If an entire histogram is no longer emitted, remove it from its histograms.xml file under //tools/metrics/histograms/.
    • Never rename histograms or renumber enum <int> values.
    • Do not touch the flag enums in //tools/metrics/histograms/enums.xml. The entries are still needed for decoding data in future Chrome versions.
  14. Update comments:

    • Check immediately above each modified code block for obsolete comments.
    • If a comment still partially applies, reword it. Otherwise, delete it.
    • Search the codebase for references to the feature flag name in other comments (e.g., both the C++ constant kMyFeature and the user-facing name MyFeature) to clean up obsolete discussions, TODOs, or design notes.
  15. Verify the build is not broken:

    • Determine what build directory the user wants to use (either from system context, or by asking).
    • Build everything with autoninja -C <dir>.
    • Fix any breakages.
  16. Verify all tests still pass:

    • Determine what build directory the user wants to use.
    • Use git diff to determine modified test files.
    • Run each test file with tools/autotest.py -C <dir> <test-file> to confirm the tests still pass.
    • Fix any failures.
  17. Format the code:

    • Run git cl format.
    • Remove extraneous whitespace (more than one consecutive blank lines, or whitespace starting or ending a class or method).
Show full SKILL.md (54 more words)Show less
</checklist>
<constraints>
  • Adhere strictly to existing naming conventions. Do not rename variables or constants for stylistic preference. The goal is removal and simplification, not renaming.
  • Do not modify any logic for unrelated features. You'll often see families of related features that share a prefix, but you should only focus on the stale feature.
</constraints>

© nwjs, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in agents/skills/feature-flag-removal of nwjs/chromium.src.

  • SKILL.md
  • OWNERS

Open the folder on GitHubat commit a9e8946

Compare with similar skills

Feature Flag Removal 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.

Feature Flag Removal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Feature Flag Removal this skillnwjs/chromium.src160—~2.1kAutomated safety check: PassBSD-3-Clause
Paddle BuildPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
ONNX Runtime Shape Inference Safety Auditmicrosoft/onnxruntime22k—~3.3kAutomated safety check: PassMIT
Code Audit3stoneBrother/code-audit8921 repos~2.7kAutomated safety check: PassNone
Qt C++ Code Reviewx-tools-author/x-tools1.1k2 repos~4.3kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Paddle Build

    PaddlePaddle/Paddle

    A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

    24k GitHub stars~1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Official

    Finds and fixes out-of-range output writes in ONNX Runtime operator shape-inference functions where a getNumOutputs guard admits too few outputs.

    22k GitHub stars~3.3k tokensUpdated today
    SecurityAuto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    892 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Translation

    doxygen/doxygen

    Keeps all Doxygen and Doxywizard translations up to date across three mechanisms: translator C++ classes (src/translatorxx.h), Qt .ts locale files for the Doxywizard GUI (addon/doxywizard/i18n/)…

    6.6k GitHub stars~5.2k tokensUpdated 8 days ago
    Writing & ContentAuto-check passed

More from nwjs/chromium.src

All 64 skills in this repo
  • Analyzing SQL Traces

    nwjs/chromium.src

    Extracts raw trace data from Perfetto traces, runs arbitrary SQL queries for custom follow-up analysis, and applies expert cognitive principles (Tiered Flow Analysis, Semantic Mismatch, Redundancy)…

    160 GitHub stars~2.9k tokensUpdated 5 days ago
    Auto-check passed
  • Autonomous multi-agent performance optimization loop for Chromium and V8.

    160 GitHub stars~4.2k tokensUpdated 5 days ago
    Auto-check passed
  • Automated Tracing

    nwjs/chromium.src

    Automated Tracing & Performance Telemetry in Chromium using Perfetto and Telemetry benchmarks.

    160 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Chrome Releases

    nwjs/chromium.src

    Queries Chrome commit, version, release, and milestone metadata.

    160 GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Chromium Docs

    nwjs/chromium.src

    Search and reference Chromium documentation from the local docs index, including design docs, APIs, and development guides.

    160 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Gn Deps Debugging

    nwjs/chromium.src

    Diagnose Chromium GN dependency and include-visibility failures, including BUILD.gn deps/publicdeps, DEPS include rules, private headers, and circular dependencies.

    160 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Feature Flag Removal

What does Feature Flag Removal do?

A skill your agent uses when removing a base::Feature and its associated code. src.

When should I use Feature Flag Removal?

Feature Flag Removal fits situations like: removing a base::Feature and its associated code.

How do I install Feature Flag Removal in Claude Code?

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

How do I install Feature Flag Removal in Codex?

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

Can I use Feature Flag Removal 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 nwjs/chromium.src --skill feature-flag-removal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/feature-flag-removal, .gemini/skills/feature-flag-removal, .github/skills/feature-flag-removal and .opencode/skills/feature-flag-removal in your project.

What does Feature Flag Removal need to run?

Going by SKILL.md and its folder, Feature Flag Removal needs the command-line tools its instructions call (git).

Does Feature Flag Removal access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Feature Flag Removal 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 Feature Flag Removal use?

Feature Flag Removal is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Feature Flag Removal use?

About 2.1k tokens (SKILL.md is roughly 8.5k 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 Feature Flag Removal?

Skills that share tags, products or a category with Feature Flag Removal: Paddle Build (PaddlePaddle/Paddle, 24k stars), Fory Release (apache/fory, 4.6k stars), ONNX Runtime Shape Inference Safety Audit (microsoft/onnxruntime, 22k stars) and Code Audit (3stoneBrother/code-audit, 892 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Feature Flag Removal?

nwjs (a GitHub organization) maintains it in nwjs/chromium.src, which has 160 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 3, 2026.

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