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.
Identify and safely remove expired Chromium histograms (dead metrics/technical debt).
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add nwjs/chromium.src --skill histogram-cleanup -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nwjs/chromium.src histogram-cleanup --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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/histogram-cleanup .claude/skills/histogram-cleanup && rm -rf skills-srcUse ~/.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/
Install the "histogram-cleanup" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/projects/code-health/histogram-cleanup into .claude/skills/histogram-cleanup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "histogram-cleanup", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nwjs/chromium.src/tree/main/agents/projects/code-health/histogram-cleanupType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nwjs/chromium.src --skill histogram-cleanup -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nwjs/chromium.src histogram-cleanup --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/projects/code-health/histogram-cleanup .agents/skills/histogram-cleanup && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "histogram-cleanup" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/projects/code-health/histogram-cleanup into .agents/skills/histogram-cleanup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "histogram-cleanup", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nwjs/chromium.src --skill histogram-cleanup -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nwjs/chromium.src histogram-cleanup --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/projects/code-health/histogram-cleanup .cursor/skills/histogram-cleanup && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "histogram-cleanup" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/projects/code-health/histogram-cleanup into .cursor/skills/histogram-cleanup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "histogram-cleanup", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nwjs/chromium.src.git --path agents/projects/code-health/histogram-cleanup--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nwjs/chromium.src --skill histogram-cleanup -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nwjs/chromium.src histogram-cleanup --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/projects/code-health/histogram-cleanup .gemini/skills/histogram-cleanup && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "histogram-cleanup" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/projects/code-health/histogram-cleanup into .gemini/skills/histogram-cleanup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "histogram-cleanup", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nwjs/chromium.src histogram-cleanupInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nwjs/chromium.src --skill histogram-cleanup -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/projects/code-health/histogram-cleanup .github/skills/histogram-cleanup && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "histogram-cleanup" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/projects/code-health/histogram-cleanup into .github/skills/histogram-cleanup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "histogram-cleanup", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nwjs/chromium.src --skill histogram-cleanup -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nwjs/chromium.src histogram-cleanup --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/projects/code-health/histogram-cleanup .opencode/skills/histogram-cleanup && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "histogram-cleanup" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/projects/code-health/histogram-cleanup into .opencode/skills/histogram-cleanup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "histogram-cleanup", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
histogram-cleanupIdentify and safely remove expired Chromium histograms (dead metrics/technical debt).
Histogram Cleanup is an agent skill from nwjs/chromium.src. Identify and safely remove expired Chromium histograms (dead metrics/technical debt). Use this skill when a contributor asks to clean up metrics, fix code health issues related to histograms, remove obsolete code, or work on a histogram cleanup task.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/analysis_guidelines.md`, `references/automated_review.md` and `references/bug_discovery.md`).
It sits in Development, covering Code quality and Technical debt. 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.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a9e8946. It shows what the files ask for, not the result of running them.
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.
Ships 2 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3gitFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
chromium.googlesource.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Histogram Cleanup loads about 2.1k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 961 words of instructions outside code blocks.
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.
The automated check found patterns that need a careful read before installing.
phase. Do NOT ask for permission.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.
The full file from nwjs/chromium.src at commit a9e8946, republished under its BSD-3-Clause licence (© nwjs). 961 words, ~2,119 tokens.
.claude/skills/histogram-cleanup/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.Identify and safely remove "dead code" associated with expired histograms. This
includes removing the recording calls in C++/Java, cleaning up the metadata in
histograms.xml, and addressing any dependent tests.
Expired histograms that are not intentionally kept for diagnostics represent technical debt. Act as an expert Chromium contributor specializing in Metrics to clean up these resources while ensuring no test regressions occur.
Goal: Remove expired Chromium histograms (dead metrics) from XML files and all code recording sites.
histograms.xml that the co-located
histograms are also expired and lack the <expired_intentionally> tag.[!IMPORTANT] Execution Protocol: Execute all steps sequentially one by one. Do not skip any step. Do not use
edit-codeorgrep. Userg(ripgrep) for searches.
Follow the workspace preparation steps in workspace_preparation.md to ensure a clean and updated environment.
Follow the Discovery & Batch Selection workflow.
Comprehensive Analysis: Delegate the entire deep dive to the
generalist sub-agent with this exact prompt:
"Read
references/analysis_guidelines.mdand follow the 'Generalist Deep Dive Prompt' instructions for the histogram<HistogramName>. ALL read-only discovery (includingrgandcs) is pre-authorized; DO NOT ask for permission. Assumergis available in the environment."
Present Findings & Evaluate Confidence: Evaluate the Confidence Score
returned by the generalist.
ask_user (type='choice'):header: "Confidence Check"question: "This histogram is safe to remove from [Files] and [Tests].
My confidence for this cleanup is [X]/10 because [Justification]. Shall I
proceed with the cleanup diff?"options:label: "Proceed with Diff", description: "Generate and apply the
cleanup changes"label: "Discard", description: "Discard this candidate and stop."Process the changes file by file, and apply modifications inside each file one recording call at a time (rather than refactoring all files or recording calls at once). This ensures stability and allows for precise verification.
python3 tools/metrics/histograms/validate_format.py to validate all
metadata changes. Address any errors that are reported.git cl format to format the modified source
code. Address any errors that are reported.generalist sub-agent. Proceed to the
Verification phase only after the review returns PASS.Follow the Verification workflow.
Bug Tracking:
references/bug_discovery.md using the <HistogramName> and
<ExpiryDate> from the candidate.Upload Pipeline:
<ExpiryDate> is in the past: Set customObsoletionMessage to
OBSOLETE_HISTOGRAMS[<HistogramName>]=expired.<ExpiryDate> is in the future: Set customObsoletionMessage to
OBSOLETE_HISTOGRAMS[<HistogramName>]=<reason>.histogram-cleanupcleanup-<HistogramName>histogram-cleanupRemove expired histogram: <HistogramName>Remove expired histogram <HistogramName> which expired on <ExpiryDate> and has no recording sites.\n\n<customObsoletionMessage>499059525<Bug ID> from the Bug Tracking step.histograms.xml© 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
SKILL.md and 6 other files (scripts, references) in agents/projects/code-health/histogram-cleanup of nwjs/chromium.src.
Open the folder on GitHubat commit a9e8946
Histogram Cleanup 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Histogram Cleanup this skillnwjs/chromium.src | 160 | — | ~2.1k | Automated safety check: Warn | BSD-3-Clause | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT | |
| Code Refactoring Workflowluongnv89/claude-howto | 42k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Tech Debt Analyzerailabs-393/ai-labs-claude-skills | 454 | 2 repos | ~3.9k | Automated safety check: Pass | MIT | |
| FIXME Resolvertailcallhq/forgecode | 7.6k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| DesloppifyGit-on-my-level/codex-autorunner | 875 | — | ~3.4k | Automated safety check: Pass | MIT |
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.
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
ailabs-393/ai-labs-claude-skills
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability.
tailcallhq/forgecode
Finds every FIXME comment in a codebase, groups related ones across files into one task, implements the work they describe and removes the comments once it is done.
Git-on-my-level/codex-autorunner
Codebase health scanner and technical debt tracker. An agent skill from Git-on-my-level/codex-autorunner.
fengshao1227/ccg-workflow
Scans code for complexity, long functions, duplicated blocks, naming problems and code smells with a Node script, then reports and suggests refactors.
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)…
nwjs/chromium.src
Autonomous multi-agent performance optimization loop for Chromium and V8.
nwjs/chromium.src
Automated Tracing & Performance Telemetry in Chromium using Perfetto and Telemetry benchmarks.
nwjs/chromium.src
Queries Chrome commit, version, release, and milestone metadata.
nwjs/chromium.src
Search and reference Chromium documentation from the local docs index, including design docs, APIs, and development guides.
nwjs/chromium.src
Diagnose Chromium GN dependency and include-visibility failures, including BUILD.gn deps/publicdeps, DEPS include rules, private headers, and circular dependencies.
Categories
Identify and safely remove expired Chromium histograms (dead metrics/technical debt). src. Identify and safely remove expired Chromium histograms (dead metrics/technical debt).
Histogram Cleanup fits situations like: A contributor asks to clean up metrics; fix code health issues related to histograms; remove obsolete code; work on a histogram cleanup task.
Run `npx skills add nwjs/chromium.src --skill histogram-cleanup -a claude-code`. Or copy the skill folder (agents/projects/code-health/histogram-cleanup in nwjs/chromium.src) into .claude/skills/histogram-cleanup in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nwjs/chromium.src --skill histogram-cleanup -a codex`. Or copy the skill folder (agents/projects/code-health/histogram-cleanup in nwjs/chromium.src) into .agents/skills/histogram-cleanup in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nwjs/chromium.src --skill histogram-cleanup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/histogram-cleanup, .gemini/skills/histogram-cleanup, .github/skills/histogram-cleanup and .opencode/skills/histogram-cleanup in your project.
Going by SKILL.md and its folder, Histogram Cleanup needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and git). Our summary lists: Python 3.
SKILL.md names 1 domain. As links in the text: chromium.googlesource.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Histogram Cleanup 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.
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. Its references folder adds about 2.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Histogram Cleanup: Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Code Refactoring Workflow (luongnv89/claude-howto, 42k stars), Tech Debt Analyzer (ailabs-393/ai-labs-claude-skills, 454 stars) and FIXME Resolver (tailcallhq/forgecode, 7.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.