Agent skill

New Cpp Lint

by FastLED in FastLED/FastLED

Create a new C++ lint rule, test it, run it across the codebase, and selectively apply fixes.

MITAuto-check passedDevelopment

Install New Cpp Lint

skills CLI
$ npx skills add FastLED/FastLED --skill new-cpp-lint -a claude-code

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

GitHub CLI
$ gh skill install FastLED/FastLED new-cpp-lint --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/FastLED/FastLED.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/new-cpp-lint .claude/skills/new-cpp-lint && 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
new-cpp-lint
GitHub stars
7.5k
Token cost
~1.8k tokens
SKILL.md length
730 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Create a new C++ lint rule, test it, run it across the codebase, and selectively apply fixes.

  • Works in 6 steps: Design the Rule → Write the Checker + Tests → Run Across Codebase (Dry Run) → …
  • Tasks that involve Linting and formatting
  • SKILL.md covers Input, Phase 1: Design the Rule, Phase 2: Write the Checker +… and Phase 3: Run Across Codebase…, plus 4 more sections
  • Calls bash and uv

What it does

New Cpp Lint is an agent skill from FastLED/FastLED. Create a new C++ lint rule, test it, run it across the codebase, and selectively apply fixes. Usage - /new-cpp-lint <rule description

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. It works with C++ and Rust. The repository describes itself as: The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github… The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting

Example prompts

  • “/new-cpp-lint”

Requirements

  • Python 3

Workflow steps

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

  1. Design the Rule
  2. Write the Checker + Tests
  3. Run Across Codebase (Dry Run)
  4. Register in Lint Pipeline
  5. Apply Fixes (Selective)
  6. Summary

What it can do on your machine

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

    • bash
    • uv

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

  • Network

    No URLs in SKILL.md. Its commands use uv, 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

New Cpp Lint loads about 1.8k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 730 words of instructions outside code blocks.

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

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 FastLED/FastLED at commit ce225ed, republished under its MIT licence (© FastLED). 730 words, ~1,804 tokens.

Download SKILL.mdSave it as .claude/skills/new-cpp-lint/SKILL.md (or your agent's skills folder).
name
new-cpp-lint
description
Create a new C++ lint rule, test it, run it across the codebase, and selectively apply fixes. Usage - /new-cpp-lint <rule description>
argument-hint
<rule description, e.g. "no raw new/delete — use fl::unique_ptr" or "all functions must use FL_NOEXCEPT">
context
fork
agent
cpp-linter-builder-agent

Create New C++ Lint Rule

You are creating a new C++ lint rule for the FastLED codebase. The default home for the new rule is the Rust crate ci/lint_cpp_rs/; the legacy Python tier (ci/lint_cpp/) is reserved for AST ratchets and cross-file structural checks. Follow this workflow.

Input

$ARGUMENTS

Phase 1: Design the Rule

  1. Parse the rule description from the input
  2. Research the codebase: Grep for existing patterns, violations, and edge cases
  3. Choose detection strategy — prefer the simplest approach that works:
    • Rust regex checker (default): Use when the pattern is a keyword, token, or textual pattern that can be reliably detected with word-boundary regex / per-line state. Examples: banning a keyword, detecting std:: namespace usage, finding #pragma directives, flagging raw new/delete. The overwhelming majority of lint rules belong here. Fast, parallel, no libclang dependency.
    • Python AST ratchet (libclang): Use only when the rule requires semantic understanding that regex cannot provide — e.g., type-aware checks, matching function signatures, detecting inheritance patterns, or analyzing template instantiations. AST parsing is heavy and slow; don't use it when a Rust regex checker suffices. See ci/tools/check_noexcept.py for the canonical pattern.
  4. Define scope: Which directories should be checked (src/fl/, platforms/, examples/, tests/)
  5. Identify exemptions: Comments, macros, templates, third_party/, platform-guarded code that should be allowed

Output:

## Rule Design

**Rule**: [one-line rule statement]
**Detection**: rust-regex / python-ast
**Scope**: [directories]
**Exemptions**: [what should NOT be flagged]
**Suppression**: [comment pattern to suppress, e.g. "// nolint" or "// ok no X"]

Phase 2: Write the Checker + Tests

Default (Rust regex) path:

  1. Read reference checkers: Study 1-2 similar existing checkers in ci/lint_cpp_rs/src/checkers/ (see ci/lint_cpp_rs/src/checkers/README.md for the policy-area grouping)
  2. Add a checker struct to the matching file under ci/lint_cpp_rs/src/checkers/ (e.g. basic.rs, style.rs, preprocessor.rs). Implement FileContentChecker (trait in ci/lint_cpp_rs/src/lint_core/processor_registry_cli.rs):
    • name() returns the class-style name (e.g. "YourRuleChecker")
    • should_process_file(file_path, project_root) filters by extension + scope
    • check_file_content(file_content) returns Vec<(usize, String)> of (line_number, message)
  3. Add inline Rust tests to ci/lint_cpp_rs/src/lint_core/tests.rs with:
    • Tests for violations (should flag)
    • Tests for correct code (should pass)
    • Tests for exemptions (comments, macros, suppression marker)
    • Tests for edge cases (multi-line, templates, nested scopes)
  4. Pre-compile any regex in ci/lint_cpp_rs/src/lint_core/regexes.rs — never Regex::new inside the hot loop
  5. Build + run the Rust tests: uv run python ci/lint_cpp/rust_binary_cache.py (rebuilds the cached binary, which runs the inline tests during cargo build)

Python AST ratchet path (only when libclang semantics are required):

  1. Add a new tool under ci/tools/check_<rule>.py following the pattern in ci/tools/check_noexcept.py (translation unit + clang-query + baseline diff)
  2. Wire it into ci/lint_cpp/run_all_checkers.py next to run_noexcept_ast_check / run_array_param_ast_check
  3. Add a checked-in baseline so the ratchet can only ratchet down

Phase 3: Run Across Codebase (Dry Run)

  1. Run the Rust binary directly against the tree: uv run python ci/lint_cpp/rust_binary_cache.py then ./ci/lint_cpp_rs/target/debug/fastled-lint --checker your_rule (or just bash lint --cpp and grep for your checker name)
  2. Count violations: Report how many files/lines are affected
  3. Sample review: Show 5-10 representative violations to verify correctness
  4. Check for false positives: If any look wrong, refine should_process_file or the detection logic and re-run

Output:

## Dry Run Results

**Violations found**: [N] across [M] files
**Sample violations**:
- file.h:42: [violation text]
- file.cpp:100: [violation text]
**False positives**: [none / list of issues found and how they were fixed]
Show full SKILL.md (264 more words)Show less

Phase 4: Register in Lint Pipeline

Four edits, all small:

  1. ci/lint_cpp_rs/src/lint_core/processor_registry_cli.rs:
    • Add the snake_case name to supported_checker_names()
    • Add the class-style name to supported_python_checker_names()
    • Add ("your_rule", Box::new(YourRuleChecker)) to the checkers vec in create_checkers()
  2. ci/lint_cpp/rust_bridge.py:
    • Add "YourRuleChecker" to the RUST_SUPPORTED_CHECKERS frozenset
  3. Verify integration: Run bash lint --cpp — ensure it runs without breaking other checks
  4. If violations are expected: Add suppression comments to known exceptions, or report them

Phase 5: Apply Fixes (Selective)

Only if the rule has a clear autofix pattern:

  1. Create fixer script (if needed) in ci/tools/ for batch-applying fixes
  2. Apply to one file first: Verify the fix is correct
  3. Run tests: bash test --cpp after each batch of fixes
  4. Apply incrementally: Fix one directory at a time, testing after each
  5. Do NOT auto-fix ambiguous cases — report them for manual review

If no autofix is appropriate: Report the violation list and let the user decide.

Phase 6: Summary

## New Lint Rule Created

**Rule**: [description]
**Checker**: ci/lint_cpp_rs/src/checkers/<file>.rs::YourRuleChecker
**Tests**: ci/lint_cpp_rs/src/lint_core/tests.rs (#[test] fn your_rule_*)
**Registration**:
  - ci/lint_cpp_rs/src/lint_core/processor_registry_cli.rs (3 sites)
  - ci/lint_cpp/rust_bridge.py (RUST_SUPPORTED_CHECKERS)
**Detection**: [rust-regex/python-ast]

**Violations**: [N] found, [M] fixed, [K] remaining
**Files modified**: [list]

**Suppression**: Use `// [suppression comment]` to suppress individual lines

Key Rules

  • Default tier is Rust — only fall back to Python for AST ratchets or cross-file structural checks
  • Test FIRST — never register a checker without passing inline #[test] functions
  • Dry run FIRST — never auto-fix without reviewing the violation list
  • Incremental fixes — fix one directory at a time, test after each
  • Stay in project root — never cd to subdirectories
  • Use bash test --cpp and bash lint --cpp — never bare cargo, meson, or build commands
  • Return violations from check_file_content as Vec<(usize, String)> — no shared mutable state, dispatch is rayon-parallel
  • Support suppression — always allow a comment marker (e.g. // nolint) to suppress individual lines
  • Handle Windows paths — call normalize_path() before path comparisons

© FastLED, MIT. 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 .claude/skills/new-cpp-lint of FastLED/FastLED.

Open the folder on GitHubat commit ce225ed

Compare with similar skills

New Cpp Lint 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.

New Cpp Lint compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
New Cpp Lint this skillFastLED/FastLED7.5k—~1.8kAutomated safety check: PassMIT
Precheckayutaz/piper-plus220—~647Automated safety check: PassMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Doc Commentsbiomejs/biome26k—~3kAutomated safety check: PassApache-2.0
Qt Cpp ReviewSerial-Studio/Serial-Studio7.2k—~4.3kAutomated safety check: PassCustom licence
SeekDB Code Reviewoceanbase/seekdb3.1k—~2.1kAutomated safety check: PassApache-2.0

Similar skills

  • Precheck

    ayutaz/piper-plus

    PR 作成前の lint + format + test 一括実行。引数で scope (python/rust/cs/go/js/cpp/all) を指定可能。未指定なら git diff から自動判定。

    220 GitHub stars~647 tokensUpdated today
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Doc Comments

    biomejs/biome

    Official

    A skill your agent uses whenever writing or editing Rust //, ///, or //!

    26k GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed
  • Qt Cpp Review

    Serial-Studio/Serial-Studio

    Qt6/C++ deep code review for Serial Studio. An agent skill from Serial-Studio/Serial-Studio.

    7.2k GitHub stars~4.3k tokensUpdated today
    DevelopmentAuto-check passed
  • SeekDB Code Review

    oceanbase/seekdb

    Reviews seekdb pull requests and diffs for real defects in correctness, resources, concurrency, security and tests, reporting only Blocker or Major findings.

    3.1k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Add Grammar

    afnanenayet/diffsitter

    Step-by-step guide for adding a new tree-sitter language grammar to diffsitter.

    2.4k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check: notes

More from FastLED/FastLED

All 23 skills in this repo
  • CI Fix

    FastLED/FastLED

    Scan all CI builds and tests, find failures, fetch error logs, and fix the code.

    7.5k GitHub stars~897 tokensUpdated today
    Auto-check passed
  • Driver Review

    FastLED/FastLED

    Review and implement hardware driver code — DMA safety, interrupt correctness, timing constraints, peripheral register usage, channel drivers, and peripheral mock implementations.

    7.5k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Embedded Debug

    FastLED/FastLED

    Firmware crash analysis, stack trace decoder, and register dump interpreter for ESP32/ARM/AVR platforms.

    7.5k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Esp32 Log Triage

    FastLED/FastLED

    Parse and classify ESP32 serial log output to identify FastLED-related errors, RMT/I2S/SPI driver faults, timing violations, RTOS issues, and crash signatures.

    7.5k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Memory Audit

    FastLED/FastLED

    Audit embedded code for stack overflow risks, heap fragmentation, static allocation patterns, and memory leaks.

    7.5k GitHub stars~488 tokensUpdated today
    Auto-check passed
  • Platform Port

    FastLED/FastLED

    Guide porting FastLED to new MCU platforms, including int.h types, clockless drivers, SPI implementations, and platform detection.

    7.5k GitHub stars~580 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about New Cpp Lint

What does New Cpp Lint do?

Create a new C++ lint rule, test it, run it across the codebase, and selectively apply fixes. New Cpp Lint is an agent skill from FastLED/FastLED. Create a new C++ lint rule, test it, run it across the codebase, and selectively apply fixes.

When should I use New Cpp Lint?

New Cpp Lint fits situations like: tasks that involve Linting and formatting.

How do I install New Cpp Lint in Claude Code?

Run `npx skills add FastLED/FastLED --skill new-cpp-lint -a claude-code`. Or copy the skill folder (.claude/skills/new-cpp-lint in FastLED/FastLED) into .claude/skills/new-cpp-lint in your project. Claude Code loads it when a task matches its description.

How do I install New Cpp Lint in Codex?

Run `npx skills add FastLED/FastLED --skill new-cpp-lint -a codex`. Or copy the skill folder (.claude/skills/new-cpp-lint in FastLED/FastLED) into .agents/skills/new-cpp-lint in your project. Codex loads it when a task matches its description.

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

What does New Cpp Lint need to run?

Going by SKILL.md and its folder, New Cpp Lint needs the command-line tools its instructions call (bash and uv). Our summary lists: Python 3.

Does New Cpp Lint access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is New Cpp Lint 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 New Cpp Lint use?

New Cpp Lint is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does New Cpp Lint use?

About 1.8k tokens (SKILL.md is roughly 7.2k 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 New Cpp Lint?

Skills that share tags, products or a category with New Cpp Lint: Precheck (ayutaz/piper-plus, 220 stars), Rust Best Practices (farm-fe/farm, 5.6k stars), Doc Comments (biomejs/biome, 26k stars) and Qt Cpp Review (Serial-Studio/Serial-Studio, 7.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains New Cpp Lint?

FastLED (a GitHub organization) maintains it in FastLED/FastLED, which has 7,505 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on October 8, 2026.

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