Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Refactor user-facing UIStrings and localization comments in a DevTools module folder according to UX writing guidelines (child task of b/40799900). Use when simplifying wording, checking sentence case, or improving L10n comments in UIStrings for a specific folder or issue. Don’t use for general code changes or non-UIStrings files.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 189% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 134% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 115% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 122% | 0% |
Use this skill when addressing a single UX writing refactoring task (one module folder or child issue under tracking bug b/40799900).
In DevTools Linux workspaces, depot_tools and node/npm may not be in PATH in non-interactive agent shells. Before you run Git, gclient, npm, or git cl commands, ensure that your environment is set up:
bashexport PATH=$HOME/depot_tools:$PATH source ~/.nvm/nvm.sh # Or export PATH=$(pwd)/third_party/node/linux/node-linux-x64/bin:$PATH
Before you write code or modify files, check the status of the associated Buganizer issue:
bash$ISSUES render <issue_number> # Or use buganizer MCP tools: render_issue / render_issue_with_external
b/40799900.FIXED, VERIFIED, or CLOSED, is assigned to another active developer, or has an attached Change List (CL), stop immediately and verify whether you need to address it. Ask the user for confirmation before you override existing work.render_issue returns an external redaction notice, use render_issue_with_external to view the full bug description. The bug description typically lists the exact Target Files to refactor for this child task. Focus exclusively on those target files.Create a branch dedicated to this issue from the latest origin/main (after you run gclient sync) using the DevTools version control tool:
bashgit fetch origin git checkout origin/main gclient sync git new-branch fix-<issue_number>
git checkout -b or git switch -c. Always use git new-branch so that depot_tools and Gerrit configure tracking information correctly.fix-531625399).Locate all TypeScript files in the target folder that define const UIStrings = { ... } and apply the 8-point UX writing checklist (cross-check with official DevTools documentation at https://developer.chrome.com/docs/devtools).
> !IMPORTANT] > Ignore non-localized or experimental strings: Don’t modify strings in const UIStringsNotTranslate = { ... }, lockedString, or i18n.i18n.lockedString. These strings are for early-stage or experimental features that you mustn’t localize or alter during UX refactoring.
preserve -> keep | additional -> more | prevent -> stop | receive -> getsubmit -> send | modification -> change | create -> add | suitable -> fitplease, sorry), filler (very, strongly, there is or there are), and marketing fluff (seamless, awesome, fast, quick).don’t, can’t, isn’t, won’t) instead of formal spellings (do not, cannot, is not, will not).’) in user-facing UIStrings values for contractions and possessives. Double quotes should be straight (") to avoid usability issues when users want to copy string literals, though consider not using double quotes at all where not necessary. Note that using both double quotes and backticks (for example, "Permissions-Policy") is valid and useful when a fixed term needs to be visually enclosed in quotes in the UI, as backticks are used for localization locking and are often not rendered visually. Use the ellipsis character (…) instead of three periods (...). Use prime (′) and double prime (″) symbols as needed for measurements like length or coordinates.Chrome DevTools), and web APIs (Background Fetch API).conditional breakpoint or command menu).Show Application, Toggle Console, Console sidebar, or Styles).Developer resources panel).Console view or DevTools Console).console, issue, or network. Decide based on the surrounding context and code (for example, Console view, Console sidebar, and Console prompt versus console message, console warning, console log, copy console, clear console, and console history; Show Network versus network log and network filter).@description comments: Apply the same capitalization rules to @description comments: ONLY panel names use sentence case (for example, Memory panel, Console panel, Performance panel). Feature names, view names, tool names, and sub-components MUST be all lowercase unless they appear at the very start of the description sentence or phrase (for example, heap profiler, heap snapshot view, isolate selector, allocation sampling, command menu, summary view).Shorten filename to 64 characters or less instead of Invalid filename). Ensure that ARIA labels and multi-sentence tooltips have consistent terminal punctuation.panel, tab, drawer, sidebar, datagrid or table, action bar, status bar, and live expressions section). Never use pane or call tabs panes in UI strings or localization (L10n) comments.UIStrings has a preceding @description comment that explains where and when it appears. This information is used for translators who need to understand the context in which the string is used.@description comments, always research where the string key (for example, UIStrings.keyName) is used in the codebase (grep_search or view surrounding code). Determine the exact UI element type (for example, button label, tooltip, table column header, context menu item, checkbox label, aria label, status bar message, or dropdown option) and location (panel, view, sidebar, or dialog).@description Text for clear all profiles for 'Clear all profiles'). Instead, describe the UI role, element type, and location (for example, @description Tooltip text for the clear button in the profiles sidebar of the Memory panel.).Tooltip text for the <action> button in <location>. or Column header in <table_name> datagrid for <purpose>.).Memory panel, Console panel, Profiles panel), while feature names, views, tools, and sub-components are ALL LOWERCASE (for example, heap profiler, heap snapshot view, isolate selector, allocation sampling, summary view), unless appearing at the start of the description sentence or phrase.') in code comments (such as @description comments and L10n annotations), even if the UI string itself uses curly apostrophes (’).{PH1}, {url}, {index}) with runtime data examples (for example, @example {https://example.com} url).n in {n, plural, =0 {No issues} ...}) as numeric counts, so they don’t require an @example tag in the @description comment.@description comment must end with a period (.), even if it is a single phrase or sentence.Also consult the style guides at google3/experimental/users/rachelandrew/tools/chrome_writing/knowledge/style/ for applicable guidelines.
Before running tests or pausing for user review, enter an iterative critique loop with a subagent:
invoke_subagent with TypeName: "self" and Role: "UX Writing Reviewer".git diff of your changes and instruct it to critique the refactoring against the 8-point UX writing checklist:@description comments specific, informative, and non-redundant (not restating string values)?@description comments and string values strictly follow the casing rule (ONLY panel names in sentence case, feature/view names in all lowercase unless starting a phrase)?{PH1}) correctly formatted?git diff to re-critique the changes.Ask the user for a preliminary review of the proposed changes before proceeding. If the user has feedback, address feedback and pause again for confirmation.
Don’t finish an edit without running the linter and test suite. In DevTools, i18n placeholder changes or string edits can easily break tests or linter rules.
Unit test files (*.test.ts) alongside the implementation often assert exact UIString values (such as error messages or warnings). When you refactor a string, check sibling *.test.ts files for assertions that match the old string value, and update them to prevent test failures.
bash npm run lint -- <folder_path>
You MUST run the full test suite using npm run test to verify that no cross-module regressions, e2e test failures, or snapshot regressions occurred. Do not only run a subset of tests: bash npm run test (Optionally, you may run `npm run test -- <folder_path>` first for rapid initial feedback during iterative development, but running `npm run test` for full test suite coverage is required before completing the task.)
Ensure that you commit or stage all changes before you run presubmit checks: bash git cl presubmit -u
When all tests and presubmit checks pass, commit your changes and upload the CL to Gerrit. Don’t use [uxw] as a prefix.
bash git add <modified_files> git commit -m "Ensure consistent UI Strings in <folder_path>" (If you update an existing commit on this branch, use `git commit --amend`).
Upload the CL using git cl upload -f. Always pass -f (--force) to prevent git cl upload from prompting or opening an interactive text editor in background agent shells: bash git cl upload -f -d --commit-description="Ensure consistent UI Strings in <folder_path>
Summary of changes:
Fixed: <issue_number>"
Fixed: <issue_number> on a separate line at the bottom of the description so that automation closes the issue.Other measured skills in the registry, with their headline benchmark lift.