Agent skill

Keep Sorted

by nwjs in nwjs/chromium.src

Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs.

BSD-3-ClauseAuto-check passedDevelopment

Install Keep Sorted

skills CLI
$ npx skills add nwjs/chromium.src --skill keep-sorted -a claude-code

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

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

At a glance

Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs.

  • Works in 5 steps: Identify Target Files → Detect Block Violations → Inject Directives & Sort → …
  • Tasks that involve Code quality
  • SKILL.md covers 🎯 When to Use This Skill and 🛠️ Step-by-Step Instructions
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Keep Sorted is an agent skill from nwjs/chromium.src. Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs.

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

It sits in Development, covering Code quality. It works with 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

  • Tasks that involve Code quality

Example prompts

  • “/keep-sorted”

Workflow steps

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

  1. Identify Target Files
  2. Detect Block Violations
  3. Inject Directives & Sort
  4. Create Tracking Bugs
  5. Upload Code Health CL

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

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

    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

Keep Sorted loads about 727 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 330 words of instructions outside code blocks.

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

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). 330 words, ~727 tokens.

Download SKILL.mdSave it as .claude/skills/keep-sorted/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
keep-sorted
description
Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs.

🧹 Keep-Sorted Finder & Fixer

This skill empowers AI agents to proactively maintain Chromium's code health by identifying lists that should be alphabetically sorted, injecting go/keep-sorted presubmit directives, and automatically fixing the order of elements.

🎯 When to Use This Skill

  • Code Reviews: When you notice unsorted lists during a CL review.
  • Code Health Audits: When you are proactively looking for technical debt or running a cleanup sidecar.
  • Explicit Requests: When the user explicitly requests to "find keep-sorted issues" or clean up resource files.

🛠️ Step-by-Step Instructions

1. Identify Target Files

You should scan for files that conventionally require sorted lists but are missing the block tags. Use tools like grep_search or find_by_name. Common Target Types:

  • strings.xml (e.g., android/java/res/values/strings.xml)
  • colors.xml
  • dimens.xml
  • ids.xml
  • BUILD.gn (for dependency lists)
2. Detect Block Violations

Look for contiguous blocks of similar elements (like <string name="...">, <dimen name="...">, <color name="..."> or deps = [ ... ]) that are naturally suited for alphabetical sorting. Pay close attention to blocks that lack the <!-- go/keep-sorted start --> and <!-- go/keep-sorted end --> tags.

Pattern Examples

Bad (Unsorted, missing tags):

xml
<dimen name="margin_top">16dp</dimen>
<dimen name="margin_bottom">8dp</dimen>

Good (Sorted, with tags):

xml
<!-- go/keep-sorted start -->
<dimen name="margin_bottom">8dp</dimen>
<dimen name="margin_top">16dp</dimen>
<!-- go/keep-sorted end -->
3. Inject Directives & Sort
  1. Inject Tags: Manually inject the go/keep-sorted start tag before the first item and the go/keep-sorted end tag after the last item. Use the appropriate comment syntax for the file type (e.g., <!-- --> for XML, # for GN).
  2. Alphabetize: Sort the block alphabetically. If available, you can run the local keep-sorted formatter over the file; otherwise, sort the items manually in your script or output.
4. Create Tracking Bugs

Every cleanup CL must be associated with a tracking bug.

  • If the user provides a bug ID: Use that bug ID in the CL description.
  • If NO bug ID is provided: You MUST first file a new child bug under the parent tracker Bug 544831881 ([Code Health] Maintain keep-sorted). Use this newly created child bug's ID for your CL.
5. Upload Code Health CL

Create a new branch and upload your changes to Gerrit. Your CL commit message must include the [Code Health] tag and reference the tracking bug:

[Code Health] Add keep-sorted for <file_context>

Bug: <BUG_ID>

© 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/projects/code-health/keep-sorted of nwjs/chromium.src.

  • SKILL.md
  • OWNERS

Open the folder on GitHubat commit a9e8946

Compare with similar skills

Keep Sorted 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.

Keep Sorted compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Keep Sorted this skillnwjs/chromium.src160—~727Automated safety check: PassBSD-3-Clause
Codebase Comparison with jscpdkucherenko/jscpd6.4k—~3.2kAutomated safety check: PassMIT
Android Code Quality Checkerwordpress-mobile/WordPress-Android3.2k—~587Automated safety check: PassGPL-2.0
Composewebview Code Reviewparkwoocheol/compose-webview103—~2kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k1 repos~2.2kAutomated safety check: PassMIT
WooCommerce Code Reviewwoocommerce/woocommerce11k3 repos~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Compares two folders function by function with jscpd --compare, across languages if needed, and explains which functions match and which have no counterpart.

    6.4k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check passed
  • 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
  • Composewebview Code Review

    parkwoocheol/compose-webview

    Performs code quality checks and reviews for ComposeWebView.

    103 GitHub stars~2k tokensUpdated 1 mo ago
    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 starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 8 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 4 days ago
    Auto-check passed
  • Autonomous multi-agent performance optimization loop for Chromium and V8.

    160 GitHub stars~4.2k tokensUpdated 4 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 4 days ago
    Auto-check passed
  • Chrome Releases

    nwjs/chromium.src

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

    160 GitHub stars~1.3k tokensUpdated 4 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 4 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 4 days ago
    Auto-check passed

Works with

Categories

Questions about Keep Sorted

What does Keep Sorted do?

Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs. src. Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs.

When should I use Keep Sorted?

Keep Sorted fits situations like: tasks that involve Code quality.

How do I install Keep Sorted in Claude Code?

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

How do I install Keep Sorted in Codex?

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

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

What does Keep Sorted need to run?

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

Does Keep Sorted 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 Keep Sorted 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 Keep Sorted use?

Keep Sorted 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 Keep Sorted use?

About 727 tokens (SKILL.md is roughly 2.9k 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 Keep Sorted?

Skills that share tags, products or a category with Keep Sorted: Codebase Comparison with jscpd (kucherenko/jscpd, 6.4k stars), Android Code Quality Checker (wordpress-mobile/WordPress-Android, 3.2k stars), Composewebview Code Review (parkwoocheol/compose-webview, 103 stars) and Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Keep Sorted?

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.