Agent skill

GN Check Autofix

by webrtc-sdk in webrtc-sdk/webrtc

Fixes GN dependency errors in WebRTC BUILD.gn files with the gn_check_autofix.py script, including missing deps and misused rtc_source_set targets.

BSD-3-ClauseAuto-check passedDevelopment

Install GN Check Autofix

skills CLI
$ npx skills add webrtc-sdk/webrtc --skill gn-check-autofix -a claude-code

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

GitHub CLI
$ gh skill install webrtc-sdk/webrtc gn-check-autofix --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/webrtc-sdk/webrtc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/gn-check-autofix .claude/skills/gn-check-autofix && 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
gn-check-autofix
GitHub stars
446
Used in
1 other repo
Token cost
~605 tokens
SKILL.md length
269 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Fixes GN dependency errors in WebRTC BUILD.gn files with the gn_check_autofix.py script, including missing deps and misused rtc_source_set targets.

  • Works in 2 steps: Run the autofix tool on your output… → The tool will
  • Seeing Include not allowed errors from gn gen --check in a WebRTC build
  • SKILL.md covers Core Workflows, Integration with Include Cleaner, Parameters and Post-Fix Steps
  • Calls git

What it does

Common GN configuration errors in WebRTC are resolved by `tools_webrtc/gn_check_autofix.py`. Run with `-C` and a build directory such as `out/Default`, it runs `gn gen --check`, finds targets with missing dependencies, adds the missing `deps` to the right `BUILD.gn` files and runs `gn format` on what it changed. It also converts `rtc_source_set` targets that contain .cc files into `rtc_library`, and `--error-limit` overrides the default cap of 20000 errors.

With `-r` and one or more BUILD.gn paths, the script strips non-absolute dependencies, meaning those that do not start with `//`, while keeping absolute ones and targets ending in _test, _tests, _unittest or _unittests. The skill treats it as the second step after `webrtc-include-cleaner`, which updates the C++ sources. Afterwards you should check the deps list for duplicates, run `gn gen` again to confirm the errors are gone, finish with `git cl format` and review the diff to see that dependencies landed on the right targets.

When your agent uses it

  • Seeing Include not allowed errors from gn gen --check in a WebRTC build
  • Fixing the error that an rtc_source_set shall not contain cc files
  • Removing relative dependencies from specific BUILD.gn files
  • Syncing BUILD.gn files after running the WebRTC include cleaner

Example prompts

  • “gn gen --check on out/Default reports Include not allowed errors; fix the BUILD.gn files.”
  • “Convert the rtc_source_set targets that contain cc files in api/BUILD.gn to rtc_library.”
  • “Remove the non-absolute deps from pc/BUILD.gn.”
  • “I ran the include cleaner on my C++ changes; now update the matching BUILD.gn dependencies.”

Requirements

  • A WebRTC checkout that includes `tools_webrtc/gn_check_autofix.py`
  • A local GN build directory such as `out/Default`

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Run the autofix tool on your output directory
  2. The tool will

What it can do on your machine

Read from SKILL.md and the folder at commit 67c4578. 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

    Shell commands in SKILL.md call:

    • 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

GN Check Autofix loads about 605 tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 269 words of instructions outside code blocks.

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

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 webrtc-sdk/webrtc at commit 67c4578, republished under its BSD-3-Clause licence (© webrtc-sdk). 269 words, ~605 tokens.

Download SKILL.mdSave it as .claude/skills/gn-check-autofix/SKILL.md (or your agent's skills folder).
name
gn-check-autofix
description
Automatically fix GN check errors in WebRTC BUILD.gn files. Use when encountering "Include not allowed", "rtc_source_set shall not contain cc files", or when needing to clean up non-absolute dependencies.

GN Check Autofix

This skill provides instructions for using tools_webrtc/gn_check_autofix.py to automatically resolve common GN build configuration errors in WebRTC.

Core Workflows

Fix Missing Dependencies

When you see "Include not allowed" errors from gn gen --check, use this workflow:

  1. Run the autofix tool on your output directory:
    bash
    tools_webrtc/gn_check_autofix.py -C <dir>
  2. The tool will:
    • Identify targets missing dependencies.
    • Add the missing deps to the appropriate BUILD.gn files.
    • Automatically run gn format on modified files.
Fix rtc_source_set Violations

If you see "rtc_source_set shall not contain cc files", the tool will automatically convert them to rtc_library:

  1. Run the tool:
    bash
    tools_webrtc/gn_check_autofix.py -C <dir>
Clean Up Dependencies

To remove all non-absolute dependencies (those not starting with //) from specific BUILD.gn files:

bash
tools_webrtc/gn_check_autofix.py -r path/to/BUILD.gn

Note: This preserves absolute dependencies (starting with //) and targets ending in _test, _tests, _unittest, or _unittests.

Integration with Include Cleaner

This tool is the recommended second step after running webrtc-include-cleaner. While the include cleaner updates your C++ source files, gn-check-autofix synchronizes your BUILD.gn files to match.

Parameters

  • -C <dir>: Path to a local build directory (e.g., out/Default). The tool internally runs gn gen --check --error-limit=20000.
  • -r <files>: Remove all non-absolute dependencies from the specified files.
  • --error-limit: Can be used to override the default error cap.

Post-Fix Steps

After the tool runs, always verify the changes:

  1. Deduplicate: The tool may occasionally add a dependency that is already present. Check the deps list for duplicates.
  2. Regenerate GN: Run gn gen <dir> to confirm errors are resolved.
  3. Format: The tool runs gn format, but a final git cl format is recommended for consistency.
  4. Review: Check the diff to ensure dependencies were added to the correct targets.

© webrtc-sdk, 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

Just SKILL.md in agents/skills/gn-check-autofix of webrtc-sdk/webrtc.

Open the folder on GitHubat commit 67c4578

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in webrtc-sdk/webrtc, which our catalogue first saw on October 7, 2026.

Compare with similar skills

GN Check Autofix 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.

GN Check Autofix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GN Check Autofix this skillwebrtc-sdk/webrtc4461 repos~605Automated safety check: PassBSD-3-Clause
Add TTS Engine to Voiceboxjamiepine/voicebox57k—~1.3kAutomated safety check: PassMIT
Dep Updatestrufflesecurity/trufflehog28k—~1.3kAutomated safety check: PassAGPL-3.0
Merge Dependabot PRsonyx-dot-app/onyx32k1 repos~2.2kAutomated safety check: PassMIT
Senior Architect Toolkitmaslennikov-ig/claude-code-orchestrator-kit2608 repos~1.2kAutomated safety check: NotesCustom licence
Update .NET OS Packagesdotnet/core22k—~2.3kAutomated safety check: PassMIT

Similar skills

  • Add TTS Engine to Voicebox

    jamiepine/voicebox

    Walks through adding a new text-to-speech engine to Voicebox end to end: dependency audit, backend, frontend wiring, PyInstaller bundling and frozen-build testing.

    57k GitHub stars~1.3k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Dep Updates

    trufflesecurity/trufflehog

    Plan and apply Go dependency updates, including advisory-driven bumps, Trivy/govulncheck validation, and supply-chain review.

    28k GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Merge Dependabot PRs

    onyx-dot-app/onyx

    Triages and lands a batch of open Dependabot PRs in the Onyx repo, where main is gated exclusively by GitHub's merge queue: approves and enqueues green PRs, closes superseded duplicates, fixes…

    32k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Senior Architect Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive software architecture skill for designing scalable, maintainable systems using ReactJS, NextJS, NodeJS, Express, React Native, Swift, Kotlin…

    260 GitHub starsUsed in 8 repos~1.2k tokens
    DevelopmentAuto-check: notes
  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Pnpm Engine

    teambit/bit

    Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.

    18k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from webrtc-sdk/webrtc

  • Runs Google Test binaries in parallel with gtest-parallel to speed up single-threaded tests, repeat flaky ones and filter specific tests.

    446 GitHub starsUsed in 1 repo~432 tokens
    Auto-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
    Auto-check passed
  • Reviews WebRTC changes through one senior engineer's lens: process hygiene, API stability, spec compliance, thread safety and modern C++, with feedback tuned to internal or external authors.

    446 GitHub starsUsed in 1 repo~754 tokens
    Auto-check passed
  • Builds a categorized HTML changelog for a WebRTC release from the git log between two branch heads, with a summary and commit and review links.

    446 GitHub starsUsed in 1 repo~485 tokens
    Auto-check passed
  • Git CL for Gerrit

    webrtc-sdk/webrtc

    Provides commands for interacting with Gerrit CLs using git cl, including issue management and non-interactive uploads.

    446 GitHub starsUsed in 1 repo~146 tokens
    Auto-check passed

Categories

Questions about GN Check Autofix

What does GN Check Autofix do?

Fixes GN dependency errors in WebRTC BUILD.gn files with the gn_check_autofix.py script, including missing deps and misused rtc_source_set targets. py`.gn` files and runs `gn format` on what it changed.

When should I use GN Check Autofix?

GN Check Autofix fits situations like: seeing Include not allowed errors from gn gen --check in a WebRTC build; fixing the error that an rtc_source_set shall not contain cc files; removing relative dependencies from specific BUILD.gn files; syncing BUILD.gn files after running the WebRTC include cleaner.

How do I install GN Check Autofix in Claude Code?

Run `npx skills add webrtc-sdk/webrtc --skill gn-check-autofix -a claude-code`. Or copy the skill folder (agents/skills/gn-check-autofix in webrtc-sdk/webrtc) into .claude/skills/gn-check-autofix in your project. Claude Code loads it when a task matches its description.

How do I install GN Check Autofix in Codex?

Run `npx skills add webrtc-sdk/webrtc --skill gn-check-autofix -a codex`. Or copy the skill folder (agents/skills/gn-check-autofix in webrtc-sdk/webrtc) into .agents/skills/gn-check-autofix in your project. Codex loads it when a task matches its description.

Can I use GN Check Autofix 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 webrtc-sdk/webrtc --skill gn-check-autofix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gn-check-autofix, .gemini/skills/gn-check-autofix, .github/skills/gn-check-autofix and .opencode/skills/gn-check-autofix in your project.

What does GN Check Autofix need to run?

Going by SKILL.md and its folder, GN Check Autofix needs the command-line tools its instructions call (git). Our summary lists: A WebRTC checkout that includes `tools_webrtc/gn_check_autofix.py`; A local GN build directory such as `out/Default`.

Does GN Check Autofix 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 GN Check Autofix 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 GN Check Autofix use?

GN Check Autofix 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 GN Check Autofix use?

About 605 tokens (SKILL.md is roughly 2.4k 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 GN Check Autofix?

Skills that share tags, products or a category with GN Check Autofix: Add TTS Engine to Voicebox (jamiepine/voicebox, 57k stars), Dep Updates (trufflesecurity/trufflehog, 28k stars), Merge Dependabot PRs (onyx-dot-app/onyx, 32k stars) and Senior Architect Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GN Check Autofix?

webrtc-sdk (a GitHub organization) maintains it in webrtc-sdk/webrtc, which has 446 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.

Source: webrtc-sdk/webrtc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.