Agent skill

Preference Deprecation

by nwjs in nwjs/chromium.src

Safely deprecate, clean up, or migrate Chrome browser and local state preferences following Chromium Prefs owners' guidelines across Desktop, Android, and iOS.

BSD-3-ClauseAuto-check passedMobile

Install Preference Deprecation

skills CLI
$ npx skills add nwjs/chromium.src --skill preference-deprecation -a claude-code

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

GitHub CLI
$ gh skill install nwjs/chromium.src preference-deprecation --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/preference-deprecation .claude/skills/preference-deprecation && 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
preference-deprecation
GitHub stars
160
Token cost
~3.1k tokens
SKILL.md length
1,190 words
Files
2
Skills in repo
64
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Safely deprecate, clean up, or migrate Chrome browser and local state preferences following Chromium Prefs owners' guidelines across Desktop, Android, and iOS.

  • Works in 5 steps: Audit Preference Properties & Scope → Code Cleanup in Feature Code → Add Delete-Self Registration & Cleanup /… → …
  • Migrating an obsolete Chromium preference
  • SKILL.md covers Core Principles & Overview and Step-by-Step Execution Checklist
  • Calls git

What it does

Preference Deprecation is an agent skill from nwjs/chromium.src. Safely deprecate, clean up, or migrate Chrome browser and local state preferences following Chromium Prefs owners' guidelines across Desktop, Android, and iOS. Use when removing, deprecating, or migrating an obsolete Chromium preference.

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

It sits in Mobile. It works with iOS and Android. 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

  • Migrating an obsolete Chromium preference

Example prompts

  • “/preference-deprecation”

Workflow steps

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

  1. Audit Preference Properties & Scope
  2. Code Cleanup in Feature Code
  3. Add Delete-Self Registration & Cleanup / Migration Logic
  4. 1+ Year Old Migration Pruning (Independent Maintenance)
  5. Verification, Self-Review & Formatting

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

Preference Deprecation loads about 3.1k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 1,190 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~3.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,190 words, ~3,119 tokens.

Download SKILL.mdSave it as .claude/skills/preference-deprecation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
preference-deprecation
description
Safely deprecate, clean up, or migrate Chrome browser and local state preferences following Chromium Prefs owners' guidelines across Desktop, Android, and iOS. Use when removing, deprecating, or migrating an obsolete Chromium preference.

Preference Deprecation and Cleanup Workflow

Use this skill when asked to deprecate, clean up, remove, or migrate an obsolete Chromium preference (Profile Pref or Local State Pref).

Core Principles & Overview

When removing a Chromium preference from feature code, never simply delete registration calls or constants from feature code without migrating to a delete-self state. Preferences saved on disk in User Pref JSON files must be explicitly cleaned up to prevent leaving abandoned, unread data in user profiles indefinitely.

Deleted preferences must remain in a "delete-self" state for 1 year before the cleanup logic itself is pruned.


Step-by-Step Execution Checklist

Step 1: Audit Preference Properties & Scope
  1. Scope Check: Determine if the pref is a Profile Pref (Profile::GetPrefs()) or Local State Pref (g_browser_process->local_state()).
  2. Platform & Embedder Scope Check: Determine which platforms and embedders register and use the preference (e.g., Desktop, Android, iOS, ChromeOS, or shared components/). This determines which platform migration hubs will require delete-self cleanup in Step 3.
  3. Syncable Pref Check: Check if the pref had any SYNCABLE_* flag (such as user_prefs::PrefRegistrySyncable::SYNCABLE_PREF, SYNCABLE_PRIORITY_PREF, or the ChromeOS-only counterparts SYNCABLE_OS_PREF / SYNCABLE_OS_PRIORITY_PREF) or was present in a syncable prefs database:
    • components/sync_preferences/common_syncable_prefs_database.cc
    • chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
    • ios/chrome/browser/sync/model/prefs/ios_chrome_syncable_prefs_database.cc
    • Syncable Database Handling:
      • Reserved IDs: In syncable_prefs_ids inside the database .cc file (e.g., common_syncable_prefs_database.cc), do NOT delete the ID constant. Instead, comment out the entry so the numeric ID remains reserved (e.g. // kMyPref = 123, (deprecated)).
      • Remove from Allowlist Map: Delete the entry completely from the corresponding allowlist map (e.g., kCommonSyncablePrefsAllowlist, kChromeSyncablePrefsAllowlist, or kIOSChromeSyncablePrefsAllowlist).
      • Histogram Enum & Presubmit Check: Add (obsolete) to the corresponding entry label in tools/metrics/histograms/metadata/sync/enums.xml (within the SyncablePref enum, e.g., <int value="49" label="(obsolete) SyncedPrefName"/>), satisfying the change coupling presubmit check (CommonSyncablePref, ChromeSyncablePref, or IosSyncablePref).
      • Registration Flags: Remove any SYNCABLE_* flag from any active registrations.
  4. Policy Check: Check if the pref is backed by an Enterprise Policy.
    • Policy-Only Exception: If the pref was only exposed via Enterprise Policy in Managed Prefs (with no UI allowing end-users to change it), it was never written to User Prefs JSON on disk. Migration/ClearPref() in browser_prefs.cc is not required.
    • If the policy pref was user-modifiable, follow docs/enterprise/add_new_policy.md to deprecate the policy for several milestones before removing pref logic.

Step 2: Code Cleanup in Feature Code
  1. Delete call sites that read/write the obsolete pref from feature logic and UI code (including Android Java callsites such as Pref.java, PrefNames.java, or ChromePreferenceKeys where applicable).
  2. Remove pref name declarations/definitions from their original locations (common locations include component pref headers such as components/<component>/.../pref_names.h, feature headers like chrome/browser/<feature>/..._prefs.h, chrome/common/pref_names.h, ash/constants/ash_pref_names.h, ios/chrome/.../pref_names.h, or local .cc/.h files).
  3. Remove the registration call from the component's RegisterProfilePrefs() or RegisterLocalState() method.
  4. Update or remove feature unit tests (e.g. ..._unittest.cc and Android unit or instrumentation tests) that asserted pref registration, default values, or syncability.

Step 3: Add Delete-Self Registration & Cleanup / Migration Logic

When removing a pref from feature code, the raw string constant must be relocated/added into the migration files (browser_prefs.cc / browser_prefs.mm) so browser_prefs can clear leftover disk data.

A. Desktop / Android / ChromeOS (chrome/browser/prefs/browser_prefs.cc)

If the pref was registered on Desktop, Android, or ChromeOS (either shared across platforms or exclusive to any of them):

  1. Chronological Ordering (Primary Invariant - Year then Month):

    • All deprecation registrations and ClearPref() calls must be ordered chronologically by date (MM/YYYY).
    • Respect Year Ordering: When sorting entries, ensure the full date is considered (e.g., 08/2026 must be placed after 11/2025 and 07/2026, never sorted alphabetically by month alone).
    • Respect PRESUBMIT Markers:
      • Profile Prefs:
        • Register in RegisterProfilePrefsForMigration().
        • Clear/migrate in MigrateObsoleteProfilePrefs() within the // BEGIN_MIGRATE_OBSOLETE_PROFILE_PREFS and // END_MIGRATE_OBSOLETE_PROFILE_PREFS markers.
      • Local State Prefs:
        • Register in RegisterLocalStatePrefsForMigration().
        • Clear/migrate in MigrateObsoleteLocalStatePrefs() within the // BEGIN_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS and // END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS markers.
      • Never delete or modify the marker lines as they are enforced by presubmit checks (PRESUBMIT.py).
  2. Relocate Constant: Move the pref name string constant to the anonymous namespace of chrome/browser/prefs/browser_prefs.cc under // Deprecated MM/YYYY.:

    cpp
    // Deprecated MM/YYYY.
    constexpr char kObsoletePrefName[] = "path.to.obsolete_pref";
  3. Register Obsolete Pref:

    • Register the pref in RegisterProfilePrefsForMigration() (Profile Prefs) or RegisterLocalStatePrefsForMigration() (Local State Prefs).
    • MUST match the original pref type (Boolean, Integer, String, List, Dictionary, Time, etc.) without any SYNCABLE_* flags (e.g. SYNCABLE_PREF, SYNCABLE_PRIORITY_PREF, SYNCABLE_OS_PREF, SYNCABLE_OS_PRIORITY_PREF):
      cpp
      // Deprecated MM/YYYY.
      registry->RegisterBooleanPref(kObsoletePrefName, false);
      registry->RegisterTimePref(kObsoleteTimePrefName, base::Time());
      registry->RegisterDictionaryPref(kObsoleteDictPrefName);
  4. Clear Leftover Data or Migrate:

    • For Deletion: Add profile_prefs->ClearPref() in MigrateObsoleteProfilePrefs() or local_state->ClearPref() in MigrateObsoleteLocalStatePrefs() with the matching date comment:
      cpp
      // Added MM/YYYY.
      profile_prefs->ClearPref(kObsoletePrefName);
    • For Migration (moving old pref value to a new key): Use GetUserPrefValue() (NOT Get*()) to avoid migrating default/policy values:
      cpp
      // Added MM/YYYY.
      const base::Value* value =
          profile_prefs->GetUserPrefValue(kObsoletePrefName);
      if (value) {
        profile_prefs->Set(kNewPrefName, *value);
        profile_prefs->ClearPref(kObsoletePrefName);
      }
Show full SKILL.md (477 more words)Show less
B. iOS Chrome (ios/chrome/browser/shared/model/prefs/browser_prefs.mm)

If the pref was registered on iOS Chrome (either shared across platforms or exclusive to iOS):

  1. Chronological Ordering:
    • Maintain chronological date ordering (MM/YYYY respecting year), placing new deprecations under the latest date block in RegisterProfilePrefs(), RegisterLocalStatePrefs(), MigrateObsoleteProfilePrefs(), and MigrateObsoleteLocalStatePrefs().
  2. Relocate Constant: Prefer defining the pref name string constant as constexpr char (or inline constexpr char) in the anonymous namespace { ... } of browser_prefs.mm under // Deprecated MM/YYYY.:
    cpp
    // Deprecated MM/YYYY.
    constexpr char kObsoletePrefName[] = "path.to.obsolete_pref";
  3. Register Obsolete Pref: Add registration under // Deprecated MM/YYYY. in RegisterProfilePrefs() or RegisterLocalStatePrefs() matching the original type (without sync flags):
    mm
    // Deprecated MM/YYYY.
    registry->RegisterBooleanPref(kObsoletePrefName, false);
  4. Clear Leftover Data: Add prefs->ClearPref() under // Added MM/YYYY. in MigrateObsoleteProfilePrefs() or MigrateObsoleteLocalStatePrefs():
    mm
    // Added MM/YYYY.
    prefs->ClearPref(kObsoletePrefName);
  5. iOS Helpers & NSUserDefaults Cleanup:
    • Use iOS helper functions like RenameBooleanPref() where applicable.
    • If applicable, remove iOS-specific user defaults in MigrateObsoleteUserDefault().

Step 4: 1+ Year Old Migration Pruning (Independent Maintenance)

Per chrome/browser/prefs/README.md, pruning 1+ year old migrations is an independent maintenance task and must NOT be bundled into a feature deprecation change.

  1. When Deprecating a Preference:

    • Do not prune older migrations in the same change.
    • If you observe entries in browser_prefs.cc or browser_prefs.mm with dates 1+ years old, optionally note them in your final summary to the user as candidates for an independent follow-up cleanup patch.
  2. When Explicitly Asked to Prune Obsolete Migrations:

    • Locate ClearPref() calls and migration registrations in browser_prefs.cc and browser_prefs.mm commented with dates 1+ years old.
    • Check for Retention Exceptions: Inspect surrounding comments before removing. Do NOT remove migrations annotated with explicit retention exceptions (e.g., // Added MM/YYYY, but DO NOT REMOVE after the usual year) or custom migration delegates (e.g., MigrateDeprecatedAutofillPrefs()).
    • Safely remove the constant, registration, and ClearPref() call.

Step 5: Verification, Self-Review & Formatting
  1. Code Formatting & Verification:

    • Format code using git cl format.
    • Build and verify affected test targets locally or run presubmit checks (git cl presubmit -u) to ensure no regressions.
    • If syncable preferences or enums.xml were modified, verify syncable prefs unit tests (e.g., unit_tests --gtest_filter="*SyncablePrefsDatabaseTest*").
  2. Commit Description & Trailer Formatting:

    • Subject Prefix Conventions: Follow the contributor's established prefix convention (e.g., [component] or component:, checking existing CL history or team preferences).
    • Focus on Rationale & Architectural Impact: Write a descriptive commit message that explains the why, what it achieves, and any non-obvious context (e.g., why an obsolete migration lingered, memory or performance tradeoffs, disk state cleanup invariants) rather than merely restating the code delta.
    • Contiguous Trailer Formatting: All metadata tags (Bug:, Fixed:, TAG=, CONV=, Change-Id:) must be placed in a single contiguous trailer block at the very bottom of the description without intervening blank lines.
    • Use Bug: <id> for incremental changes on umbrella/tracking bugs, and Fixed: <id> only when the change fully resolves the underlying issue.
  3. Fresh-Eye Self-Review:

    • Before completing the work, perform a thorough, fresh-eye code quality self-review to audit for cosmetic flaws, unintended diffs, redundant headers, and description formatting.

© 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/preference-deprecation of nwjs/chromium.src.

  • SKILL.md
  • OWNERS

Open the folder on GitHubat commit a9e8946

Compare with similar skills

Preference Deprecation 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.

Preference Deprecation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Preference Deprecation this skillnwjs/chromium.src160—~3.1kAutomated safety check: PassBSD-3-Clause
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
Mobilerun Docs Referencedroidrun/mobilerun9.6k—~943Automated safety check: PassMIT
App Store Screenshots GeneratorParthJadhav/app-store-screenshots7.2k—~14kAutomated safety check: PassMIT
Rnn Codebasewix/react-native-navigation13k—~2kAutomated safety check: PassMIT
Building Native UICherryHQ/cherry-studio-app4k8 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • Mobilerun Docs Reference

    droidrun/mobilerun

    Answers questions about Mobilerun, the LLM-agent framework for automating Android and iOS devices, by pointing the agent to the right page of its v5 documentation.

    9.6k GitHub stars~943 tokensUpdated 3 days ago
    MobileAuto-check passed
  • App Store Screenshots Generator

    ParthJadhav/app-store-screenshots

    Scaffolds a Next.js editor for designing App Store and Google Play screenshots as ads and exporting them at every required size, for iOS, Mac and Android.

    7.2k GitHub stars~14k tokensUpdated yesterday
    MobileAuto-check passed
  • Rnn Codebase

    wix/react-native-navigation

    Official

    Navigate and work with the react-native-navigation (RNN) codebase.

    13k GitHub stars~2k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Building Native UI

    CherryHQ/cherry-studio-app

    Complete guide for building beautiful apps with Expo Router.

    4k GitHub starsUsed in 8 repos~2.6k tokens
    MobileAuto-check passed
  • Sim Use

    lycorp-jp/sim-use

    Drive iOS Simulator, Android emulator/device, and physical iPhone/iPad screens for AI agents.

    1.4k GitHub stars~3.2k tokensUpdated today
    MobileAuto-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

Categories

Questions about Preference Deprecation

What does Preference Deprecation do?

Safely deprecate, clean up, or migrate Chrome browser and local state preferences following Chromium Prefs owners' guidelines across Desktop, Android, and iOS. src. Safely deprecate, clean up, or migrate Chrome browser and local state preferences following Chromium Prefs owners' guidelines across Desktop, Android, and iOS.

When should I use Preference Deprecation?

Preference Deprecation fits situations like: migrating an obsolete Chromium preference.

How do I install Preference Deprecation in Claude Code?

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

How do I install Preference Deprecation in Codex?

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

Can I use Preference Deprecation 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 preference-deprecation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/preference-deprecation, .gemini/skills/preference-deprecation, .github/skills/preference-deprecation and .opencode/skills/preference-deprecation in your project.

What does Preference Deprecation need to run?

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

Does Preference Deprecation 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 Preference Deprecation 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 Preference Deprecation use?

Preference Deprecation 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 Preference Deprecation use?

About 3.1k tokens (SKILL.md is roughly 12k 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 Preference Deprecation?

Skills that share tags, products or a category with Preference Deprecation: Engine Whats New (flutter/flutter, 179k stars), Mobilerun Docs Reference (droidrun/mobilerun, 9.6k stars), App Store Screenshots Generator (ParthJadhav/app-store-screenshots, 7.2k stars) and Rnn Codebase (wix/react-native-navigation, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Preference Deprecation?

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.