Agent skill

Lint Sync

by nwjs in nwjs/chromium.src

Add missing LINT.IfChange(...) / LINT.ThenChange(...) guards to enums in C++/Java and XML to keep them in sync.

BSD-3-ClauseAuto-check passedDevelopment

Install Lint Sync

skills CLI
$ npx skills add nwjs/chromium.src --skill lint-sync -a claude-code

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

GitHub CLI
$ gh skill install nwjs/chromium.src lint-sync --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/projects/code-health/lint-sync .claude/skills/lint-sync && 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
lint-sync
GitHub stars
160
Token cost
~1.8k tokens
SKILL.md length
828 words
Files
4 (incl. scripts, references)
Skills in repo
64
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Add missing LINT.IfChange(...) / LINT.ThenChange(...) guards to enums in C++/Java and XML to keep them in sync.

  • Works in 6 steps: Workspace Preparation → Discovery & Batch Selection → Refactoring & Implementation → …
  • This skill ONLY when a contributor explicitly asks to add lint guards
  • SKILL.md covers Overview, Relevant Resources & Style… and Workflow
  • Runs Python scripts from its folder; calls python3 and git

What it does

Lint Sync is an agent skill from nwjs/chromium.src. Add missing LINT.IfChange(...) / LINT.ThenChange(...) guards to enums in C++/Java and XML to keep them in sync. Trigger this skill ONLY when a contributor explicitly asks to add lint guards or synchronize enums using LINT guards.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/automated_review.md`, `references/patterns.md` and `scripts/find_candidates.py`).

It sits in Development, covering Linting and formatting and Code quality. It works with C++ and Java. 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

  • This skill ONLY when a contributor explicitly asks to add lint guards
  • Synchronize enums using LINT guards

Example prompts

  • “/lint-sync”

Requirements

  • Python 3

Workflow steps

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

  1. Workspace Preparation
  2. Discovery & Batch Selection
  3. Refactoring & Implementation
  4. Validation
  5. Verification
  6. Submission

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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • git

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

  • Network

    Links to these hosts (documentation or services it may open):

    • chromium.googlesource.com

    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

Lint Sync loads about 1.8k tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 828 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.4k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from nwjs/chromium.src at commit a9e8946, republished under its BSD-3-Clause licence (© nwjs). 828 words, ~1,763 tokens.

Download SKILL.mdSave it as .claude/skills/lint-sync/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
lint-sync
description
Add missing LINT.IfChange(...) / LINT.ThenChange(...) guards to enums in C++/Java and XML to keep them in sync. Trigger this skill ONLY when a contributor explicitly asks to add lint guards or synchronize enums using LINT guards.

Code Health: Lint Sync Guards

Identify enums in the codebase that are persisted to logs (e.g., recorded in enums.xml) but are missing the LINT.IfChange(...) and LINT.ThenChange(...) guards that enforce synchronization between the source code and the XML metadata.

Overview

When developers modify an enum in C++ or Java but forget to update the corresponding entry in enums.xml, it breaks downstream metrics pipelines. Adding IfThisThenThat lint guards prevents this by generating Gerrit warnings if one side is modified without the other. Act as an expert Chromium contributor to add these missing guards.

Goal: Add LINT.IfChange/ThenChange sync guards to enums in C++/Java and XML files to enforce synchronization.

Relevant Resources & Style Guides

Workflow

[!IMPORTANT] Execution Protocol: Execute all steps sequentially one by one. Do not skip any step. Do not use edit-code or grep. Use rg (ripgrep) for searches.

Step 1: Workspace Preparation

Follow the workspace preparation steps in workspace_preparation.md to ensure a clean and updated environment.

Step 2: Discovery & Batch Selection

Follow the Discovery & Batch Selection workflow.

Step 3: Refactoring & Implementation

Process the candidates by handling them one file at a time, and applying modifications inside each file one enum at a time (rather than refactoring all files or enums at once). This ensures stability and allows for precise verification. Refer to patterns.md for sync guard syntax rules and examples before making replacements.

  1. Process Enum: For each enum in the list:

    • Sync Verification: Delegate to the generalist sub-agent with this exact prompt:

      "Compare the enum <EnumName> in <SourcePath> with its metadata entry in <XMLPath>. Verify that all valid enum entries in the source have corresponding <int value="..." label="..."> entries in the XML. IMPORTANT: Ignore/skip sentinel values like kMaxValue, kCount, COUNT, or NUM_ENTRIES in the comparison; they are not expected to be in the XML. Return 'SYNCED' or a concise list of missing entries that need to be added to the XML. Ensure any suggested labels reflect the enum constant name and any suggested <summary> tags are concise descriptions of the enum's purpose."

    • Fix & Proceed: If the generalist returns missing entries, add them to the XML file before proceeding with the guards. Only append missing entries to the XML. Never modify existing names or values in either file. Do not shift the numeric values of an enum. When adding new values to the XML enum, check the format of the existing <int> entries and ensure new entries match that format. Labels added to the XML MUST be concise (matching the enum constant name) and any <summary> tags MUST be brief descriptions of what the enum tracks.
    • Source:
      • Append-Only Logging Comment: Check if the enum's preceding comment already contains a warning about append-only histogram logging. If it does not, add the standard Chromium metric comment: // These values are persisted to logs. Entries should not be renumbered and numeric values should never be reused.
      • Clean up legacy sync comments (CRITICAL): Search the enum's preceding comments for manual synchronization reminders (e.g., // Please keep in sync with... or // Always keep this enum in sync with...). Remove ONLY the specific sentence or line referencing the manual synchronization. Preserve all other parts of the comment (e.g., descriptions of what the enum represents, renumbering warnings, or usage instructions). If the entire comment block only contains a sync reminder, the whole block may be removed.
      • Add // LINT.IfChange(<SourceName>) immediately before the enum definition.
      • Add // LINT.ThenChange(<XML Path>:<XmlName>) immediately after the enum.
    • XML:
      • Add the <!-- LINT.IfChange(<XmlName>) --> immediately before the <enum> tag.
      • Add <!-- LINT.ThenChange(<Source Path>:<SourceName>) --> immediately after the </enum> tag.
    • Handling Mismatched Names: If the name in the Source file (SourceName) differs from the name in the XML file (XmlName), ensure the correct name is used in each respective IfChange and ThenChange tag as shown in the Syntax Rules.
  2. Iterate: Once the enum is fully synced and verified, move to the next one in the list and repeat. Do not attempt to batch multiple enums in a single file-write operation to ensure accuracy. Once all enums have been processed, proceed immediately to the Review & Validation phase.

Show full SKILL.md (149 more words)Show less
Step 4: Validation
  1. Linting & Formatting:
    • XML Linting: Execute python3 tools/metrics/histograms/validate_format.py to validate all metadata changes. Address any errors that are reported.
    • Code Formatting: Execute git cl format to format the modified source code. Address any errors that are reported.
  2. Mandatory Final Review: Follow the Automated Review Protocol to delegate a final review of the patch to the generalist sub-agent. Proceed to the Verification phase only after the review returns PASS.
Step 5: Verification

Follow the Verification workflow.

Step 6: Submission

Invoke the Submission workflow. Pass the following context variables to the workflow:

  • Skill Name: lint-sync
  • Branch Name: lint-sync-<EnumName>
  • Commit Hashtag: lint-sync
  • Cleanup Title: Add missing LINT guards in <SourceFilePath>
  • Cleanup Description: Adding IfThisThenThat lint guards to ensure synchronization between the following source code enums and their metadata representation in enums.xml: <EnumNamesList (comma-separated)>
  • Parent Bug: 498775295
  • Cleaned Component: The source file path.
  • File Count: Number of files modified.

© 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 3 other files (scripts, references) in agents/projects/code-health/lint-sync of nwjs/chromium.src.

  • SKILL.md
  • references/automated_review.md
  • references/patterns.md
  • scripts/find_candidates.py

Open the folder on GitHubat commit a9e8946

Compare with similar skills

Lint Sync 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.

Lint Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lint Sync this skillnwjs/chromium.src160—~1.8kAutomated safety check: PassBSD-3-Clause
Android Code Quality Checkerwordpress-mobile/WordPress-Android3.2k—~587Automated safety check: PassGPL-2.0
WebRTC Include Cleanerwebrtc-sdk/webrtc4461 repos~545Automated safety check: PassBSD-3-Clause
Code Review Excellenceandrew-yangy/gru-ai155—~1.7kAutomated safety check: NotesMIT
ONNX Runtime Lintmicrosoft/onnxruntime22k—~392Automated safety check: PassMIT
Code Revieweralirezarezvani/claude-skills28k1 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • Android Code Quality Checker

    wordpress-mobile/WordPress-Android

    Runs detekt, checkstyle, and Android lint together, reads their reports, and proposes approved fixes grouped by file.

    3.2k GitHub stars~587 tokensUpdated today
    DevelopmentAuto-check passed
  • WebRTC Include Cleaner

    webrtc-sdk/webrtc

    Runs the WebRTC include-cleaner tool to add missing and remove unused C++ include directives before uploading a CL or after refactoring.

    446 GitHub starsUsed in 1 repo~545 tokens
    DevelopmentAuto-check passed
  • Code Review Excellence

    andrew-yangy/gru-ai

    Provides comprehensive code review guidance for React 19, Vue 3, Rust, TypeScript, Java, Python, and C/C++.

    155 GitHub stars~1.7k tokensUpdated 7 mo ago
    DevelopmentAuto-check: notes
  • ONNX Runtime Lint

    microsoft/onnxruntime

    Official

    Lints and formats C++ and Python code in the ONNX Runtime repository with lintrunner, clang-format and ruff, preferring a pass over only the changed files.

    22k GitHub stars~392 tokensUpdated today
    DevelopmentAuto-check passed
  • Code Reviewer

    alirezarezvani/claude-skills

    Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin, C, .NET, Java, C, C++, Rust, Ruby, PHP, and Dart/Flutter.

    28k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub stars~2.2k tokensUpdated 29 days ago
    DevelopmentAuto-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 Lint Sync

What does Lint Sync do?

Add missing LINT.IfChange(...) / LINT.ThenChange(...) guards to enums in C++/Java and XML to keep them in sync. src.) guards to enums in C++/Java and XML to keep them in sync.

When should I use Lint Sync?

Lint Sync fits situations like: this skill ONLY when a contributor explicitly asks to add lint guards; synchronize enums using LINT guards.

How do I install Lint Sync in Claude Code?

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

How do I install Lint Sync in Codex?

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

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

What does Lint Sync need to run?

Going by SKILL.md and its folder, Lint Sync needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and git). Our summary lists: Python 3.

Does Lint Sync access the network?

SKILL.md names 1 domain. As links in the text: chromium.googlesource.com. This is read from the text; nothing was executed.

Is Lint Sync 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Lint Sync use?

Lint Sync 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 Lint Sync use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 639 tokens, read only when the agent opens those files.

What are the alternatives to Lint Sync?

Skills that share tags, products or a category with Lint Sync: Android Code Quality Checker (wordpress-mobile/WordPress-Android, 3.2k stars), WebRTC Include Cleaner (webrtc-sdk/webrtc, 446 stars), Code Review Excellence (andrew-yangy/gru-ai, 155 stars) and ONNX Runtime Lint (microsoft/onnxruntime, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lint Sync?

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.