Agent skill

Remove Unused Includes

by nwjs in nwjs/chromium.src

Look through a given folder to find and safely remove unused includes specifically for Clang-compiled code (using clang-include-cleaner), verifying that referencing targets compile.

BSD-3-ClauseAuto-check passed

Install Remove Unused Includes

skills CLI
$ npx skills add nwjs/chromium.src --skill remove-unused-includes -a claude-code

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

GitHub CLI
$ gh skill install nwjs/chromium.src remove-unused-includes --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/remove-unused-includes .claude/skills/remove-unused-includes && 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
remove-unused-includes
GitHub stars
160
Token cost
~392 tokens
SKILL.md length
140 words
Files
3 (incl. scripts)
Skills in repo
64
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Look through a given folder to find and safely remove unused includes specifically for Clang-compiled code (using clang-include-cleaner), verifying that referencing targets compile.

  • Works in 3 steps: Run the Cleanup Script → Verify Compilation → Review Git Status
  • SKILL.md covers Prerequisites and Workflow Steps
  • Runs Python scripts from its folder; calls python3 and git

What it does

Remove Unused Includes is an agent skill from nwjs/chromium.src. Look through a given folder to find and safely remove unused includes specifically for Clang-compiled code (using clang-include-cleaner), verifying that referencing targets compile.

Its SKILL.md is about 390 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/remove_unused_includes.py`).

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.

Example prompts

  • “/remove-unused-includes”

Requirements

  • Python 3

Workflow steps

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

  1. Run the Cleanup Script
  2. Verify Compilation
  3. Review Git Status

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

    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

Remove Unused Includes loads about 392 tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 140 words of instructions outside code blocks.

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

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). 140 words, ~392 tokens.

Download SKILL.mdSave it as .claude/skills/remove-unused-includes/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
remove-unused-includes
description
Look through a given folder to find and safely remove unused includes specifically for Clang-compiled code (using clang-include-cleaner), verifying that referencing targets compile.

🧹 Remove Unused Includes Skill

This skill provides a workflow and script to look through a given folder, identify unused includes using clang-include-cleaner, and safely remove them only if the affected targets continue to compile successfully.

Prerequisites

  1. Compilation Database (compile_commands.json): Ensure your compilation database is up-to-date. If not, generate a fresh compilation database using:
    bash
    python3 tools/clang/scripts/generate_compdb.py -p out/Default -o compile_commands.json

Workflow Steps

1. Run the Cleanup Script

Run the automated cleanup script located inside this skill's directory (resolve the absolute <skill_directory_path> from the skill metadata):

bash
python3 <skill_directory_path>/scripts/remove_unused_includes.py --src-root . --folder <relative_or_absolute_folder_path>
2. Verify Compilation

The script automatically:

  • Finds all .cc files in the specified folder.
  • Detects unused includes using clang-include-cleaner.
  • Locates all referencing GN targets for each modified file via gn refs.
  • Edits the file and compiles each referencing target.
  • Reverts the edit if any compilation errors occur.
3. Review Git Status

Once execution is complete, verify the final changes using git:

bash
git status
git diff

© 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 2 other files (scripts) in agents/skills/remove-unused-includes of nwjs/chromium.src.

  • SKILL.md
  • OWNERS
  • scripts/remove_unused_includes.py

Open the folder on GitHubat commit a9e8946

Compare with similar skills

Remove Unused Includes 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.

Remove Unused Includes compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Remove Unused Includes this skillnwjs/chromium.src160—~392Automated safety check: PassBSD-3-Clause
Unused CSSthedaviddias/Front-End-Checklist74k—~415Automated safety check: PassMIT
Dead Code Removercode-yeongyu/oh-my-openagent70k1 repos~1.8kAutomated safety check: PassCustom licence
Safe Removesd0xdev/sd0x-harness192—~1.5kAutomated safety check: PassMIT
Remove Bg AutomationComposioHQ/awesome-claude-skills77k3 repos~738Automated safety check: PassNone
Remove AI Slopscode-yeongyu/oh-my-openagent70k—~5.3kAutomated safety check: PassCustom licence

Similar skills

  • Unused CSS

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing stylesheets, component styles, and responsive behavior related to Remove unused CSS rules.

    74k GitHub stars~415 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Dead Code Remover

    code-yeongyu/oh-my-openagent

    Finds unused code in a TypeScript project, confirms each candidate has no references through the language server, then hands removals to parallel agents.

    70k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • Safe Remove

    sd0xdev/sd0x-harness

    Safely remove plugin assets (skill/agent/rule/script/hook) with dependency detection and reference cleanup.

    192 GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Remove Bg Automation

    ComposioHQ/awesome-claude-skills

    Automate Remove Bg tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~738 tokens
    Productivity & AutomationAuto-check passed
  • Remove AI Slops

    code-yeongyu/oh-my-openagent

    Removes AI-generated code smells from branch changes or an explicit file list behind regression tests.

    70k GitHub stars~5.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Safe Push

    JetBrains/intellij-community

    Official

    Push IntelliJ repository changes through the Safe Push workflow.

    21k GitHub stars~1.1k tokensUpdated yesterday
    Auto-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

Questions about Remove Unused Includes

What does Remove Unused Includes do?

Look through a given folder to find and safely remove unused includes specifically for Clang-compiled code (using clang-include-cleaner), verifying that referencing targets compile. src. Look through a given folder to find and safely remove unused includes specifically for Clang-compiled code (using clang-include-cleaner), verifying that referencing targets compile.

How do I install Remove Unused Includes in Claude Code?

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

How do I install Remove Unused Includes in Codex?

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

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

What does Remove Unused Includes need to run?

Going by SKILL.md and its folder, Remove Unused Includes 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 Remove Unused Includes 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 Remove Unused Includes 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 Remove Unused Includes use?

Remove Unused Includes 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 Remove Unused Includes use?

About 392 tokens (SKILL.md is roughly 1.6k 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 Remove Unused Includes?

Skills that share tags, products or a category with Remove Unused Includes: Unused CSS (thedaviddias/Front-End-Checklist, 74k stars), Dead Code Remover (code-yeongyu/oh-my-openagent, 70k stars), Safe Remove (sd0xdev/sd0x-harness, 192 stars) and Remove Bg Automation (ComposioHQ/awesome-claude-skills, 77k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Remove Unused Includes?

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.