Agent skill

Clang Tidy

by thun-res in thun-res/vlink

对指定文件或全仓库运行 clang-tidy(WarningsAsErrors='')。用户要求 "跑 clang-tidy"、"tidy 检查某文件"、排查 CI tidy 门禁失败时使用。

Apache-2.0Auto-check passed

Install Clang Tidy

skills CLI
$ npx skills add thun-res/vlink --skill clang-tidy -a claude-code

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

GitHub CLI
$ gh skill install thun-res/vlink clang-tidy --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/thun-res/vlink.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/clang-tidy .claude/skills/clang-tidy && 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
clang-tidy
GitHub stars
116
Token cost
~712 tokens
SKILL.md length
106 words
Files
2
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

对指定文件或全仓库运行 clang-tidy(WarningsAsErrors='')。用户要求 "跑 clang-tidy"、"tidy 检查某文件"、排查 CI tidy 门禁失败时使用。

  • Works in 3 steps: 检查指定文件 → 检查全仓库 → 结果处理
  • SKILL.md covers 1. 检查指定文件, 2. 检查全仓库 and 3. 结果处理
  • Calls cmake and git

What it does

Clang Tidy is an agent skill from thun-res/vlink. 对指定文件或全仓库运行 clang-tidy(WarningsAsErrors='')。用户要求 "跑 clang-tidy"、"tidy 检查某文件"、排查 CI tidy 门禁失败时使用。

Its SKILL.md is about 710 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It works with C++. The repository describes itself as: VLink is a high-performance C++ communication middleware for autonomous driving and embodied intelligence, positioned as a full-scenario alternative to ROS 2. The licence is Apache-2.0.

Example prompts

  • “)。用户要求”
  • “tidy 检查某文件”
  • “/clang-tidy”

Workflow steps

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

  1. 检查指定文件
  2. 检查全仓库
  3. 结果处理

What it can do on your machine

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

    • cmake
    • 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

Clang Tidy loads about 712 tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 106 words of instructions outside code blocks.

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

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 thun-res/vlink at commit 1793889, republished under its Apache-2.0 licence (© thun-res). 106 words, ~712 tokens.

Download SKILL.mdSave it as .claude/skills/clang-tidy/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
clang-tidy
description
对指定文件或全仓库运行 clang-tidy(WarningsAsErrors='*')。用户要求 "跑 clang-tidy"、"tidy 检查某文件"、排查 CI tidy 门禁失败时使用。

clang-tidy 静态检查

仓库根 .clang-tidy 已配置检查集(google-/readability-/performance-/ modernize- 等,豁免项集中管理)且 WarningsAsErrors: '*' —— 任何告警即 失败。头文件过滤:HeaderFilterRegex 只覆盖 include/vlink|src|modules|cli|proxy。

先从仓库任意子目录解析根目录:

bash
REPO_ROOT="$(git rev-parse --show-toplevel)"
PHYSICAL_CORES=
case "$(uname -s 2>/dev/null)" in
  Linux)
    PHYSICAL_CORES="$(
      LC_ALL=C lscpu -p=CORE,SOCKET 2>/dev/null |
        awk -F, '
          $1 !~ /^#/ && $1 ~ /^[0-9]+$/ && $2 ~ /^[0-9]+$/ {
            cores[$2 SUBSEP $1] = 1
          }
          END {
            for (core in cores) {
              count++
            }
            if (count > 0) {
              print count
            }
          }'
    )" || PHYSICAL_CORES=
    ;;
  Darwin)
    PHYSICAL_CORES="$(sysctl -n hw.physicalcpu 2>/dev/null)" || PHYSICAL_CORES=
    ;;
esac
case "$PHYSICAL_CORES" in
  '' | *[!0-9]* | 0) PHYSICAL_CORES=1 ;;
esac
if [ "$PHYSICAL_CORES" -gt 1 ]; then
  BUILD_JOBS=$((PHYSICAL_CORES - 1))
else
  BUILD_JOBS=1
fi

AI 创建的 clang-tidy 构建目录必须位于 build-ai/ 下并使用 skill_clang_tidy 前缀;不得复用、覆盖或清理维护者、IDE、CI 的其他 构建目录。默认目录正被其他任务使用时改用 skill_clang_tidy_<task_name> 或 skill_clang_tidy_file_<task_name>。 执行以下任一路径前设置 PYTHONPYCACHEPREFIX="$BUILD_DIR/__pycache__"。

1. 检查指定文件

需要 compile_commands.json。使用独立目录生成(仅 configure,不编译), 避免改写维护者日常构建配置:

bash
BUILD_DIR="$REPO_ROOT/build-ai/skill_clang_tidy_file"
export PYTHONPYCACHEPREFIX="$BUILD_DIR/__pycache__"
cmake -S "$REPO_ROOT" -B "$BUILD_DIR" \
  -DENABLE_CXX_STD_20=OFF \
  -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

然后对改动过的 .cc 文件运行:

bash
clang-tidy -p "$BUILD_DIR" <file1.cc> <file2.cc>

纯头文件改动:找到包含它的某个 .cc 作为入口来跑。

2. 检查全仓库

以下只展示 clang-tidy 随编译执行的机制,不是 CI 参数的完整复现。 完整门禁参数以 .github/scripts/ci-tidy.sh 和 workflow 提供的 VLINK_CI_CMAKE_ARGS 为准;该 CI 脚本使用 CI 自己的构建目录,AI 在 当前工作区不得直接执行,必须把所需参数用于以下 skill 专属目录:

bash
BUILD_DIR="$REPO_ROOT/build-ai/skill_clang_tidy"
export PYTHONPYCACHEPREFIX="$BUILD_DIR/__pycache__"
cmake -S "$REPO_ROOT" -B "$BUILD_DIR" \
  -DENABLE_CXX_STD_20=OFF \
  -DCMAKE_CXX_CLANG_TIDY=clang-tidy
cmake --build "$BUILD_DIR" --parallel "$BUILD_JOBS"

耗时长(CI 限时 120 分钟),仅在需要完整复现 CI 门禁时使用。 BUILD_JOBS 必须严格等于 max(真实物理核心数 - 1, 1)。禁止改用逻辑 CPU 数、裸 --parallel/-j 或固定高并行度;无法可靠获取时固定单核, 且同一时刻只运行一个本地构建,防止 clang-tidy 随编译并发卡死或耗尽 内存。

3. 结果处理

  • 有告警时先报告;用户同时要求修复时优先修复源码。确属误报或有意 写法时优先在目标行前使用 // NOLINTNEXTLINE(<检查名>);只有不适合放在前一行时才使用同行 // NOLINT(<检查名>)。必须带具体检查名并保持最小范围,见 .agents/languages/CPP.md §11。 禁止修改 .clang-tidy 配置——检查集由维护者统一治理。
  • test/**/*.cc 已整体 // NOLINTBEGIN/// NOLINTEND 包裹,tidy 告警 不适用于 test 目录。
  • 修复方式须符合 .agents/languages/CPP.md(如 modernize 类告警按仓库惯用 写法修,而非教科书写法)。

© thun-res, Apache-2.0. 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/skills/clang-tidy of thun-res/vlink.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 1793889

Compare with similar skills

Clang Tidy 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.

Clang Tidy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clang Tidy this skillthun-res/vlink116—~712Automated safety check: PassApache-2.0
Paddle BuildPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
ONNX Runtime Shape Inference Safety Auditmicrosoft/onnxruntime22k—~3.3kAutomated safety check: PassMIT
Code Audit3stoneBrother/code-audit8921 repos~2.7kAutomated safety check: PassNone
Leetcuda Tex To Readthedocsxlite-dev/LeetCUDA12k—~902Automated safety check: PassGPL-3.0

Similar skills

  • Paddle Build

    PaddlePaddle/Paddle

    A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

    24k GitHub stars~1k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Official

    Finds and fixes out-of-range output writes in ONNX Runtime operator shape-inference functions where a getNumOutputs guard admits too few outputs.

    22k GitHub stars~3.3k tokensUpdated today
    SecurityAuto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    892 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Leetcuda Tex To Readthedocs

    xlite-dev/LeetCUDA

    LeetCUDA 书稿 LaTeX 到 Read the Docs 站点的转换管线维护 skill(站点目录 LeetCUDA/docs/readthedocs/)。当任务涉及:改完书稿后让站点同步、改转换器 convert/、本地构建与预览 build.sh、内容核对 convert.verify、浏览器验收…

    12k GitHub stars~902 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed

More from thun-res/vlink

All 16 skills in this repo
  • Issue

    thun-res/vlink

    调查 VLink 中可复现的缺陷、文档遗漏或功能建议,搜索 open/closed Issue 去重,按仓库模板用自然、具体、证据充分的简体中文草拟或创建 Issue, 可读取既有 Issue 上下文后草拟或发布单条回复.用户要求"提 issue"、 "创建 issue"、"检查是否已有 issue"、"回复 issue"、"评论 issue"、 "帮我回应…

    116 GitHub stars~753 tokensUpdated 2 days ago
    Auto-check passed
  • Asan

    thun-res/vlink

    以 AddressSanitizer(ENABLETESTSANITIZE=ON)构建并运行 vlink-test 单元测试,复现 CI 的 ASan 门禁。用户要求"跑 asan"、"内存检测测试"、 排查 ci-test 的 sanitize 失败时使用。

    116 GitHub stars~683 tokensUpdated 2 days ago
    Auto-check passed
  • Bench

    thun-res/vlink

    构建并运行 vlink-bench 性能基准(showcase/quick/full 预设),生成 HTML/JSON 报告。用户要求"跑 bench"、"性能测试"、对比后端吞吐/延迟、 验证性能回归时使用。

    116 GitHub stars~993 tokensUpdated 2 days ago
    Auto-check passed
  • Cicd

    thun-res/vlink

    用 gh CLI 触发/查看 GitHub CI/CD:手动 dispatch 工作流 (release/coverage/docker)、查看运行状态与失败日志、重跑失败 job.

    116 GitHub stars~856 tokensUpdated 2 days ago
    Auto-check passed
  • Commit

    thun-res/vlink

    提交前强制执行 VLink 的 format 与 check skill,再分析当前工作树的全部 staged、unstaged 与 untracked 改动,按模块、功能和依赖关系拆分为可独立 评审的 Conventional Commits,生成简洁且覆盖重要行为的英文 commit message 并逐组提交。用户要求“提交当前改动”、“按功能拆 commit”、 “自动写 commit…

    116 GitHub stars~931 tokensUpdated 2 days ago
    Auto-check passed
  • Coverage

    thun-res/vlink

    以 ENABLETESTCOVERAGE=ON 构建、运行测试并生成 lcov 代码覆盖率报告, 复现 CI 的 coverage 流水线。用户要求"跑覆盖率"、"生成 coverage 报告"、查某模块覆盖情况时使用。

    116 GitHub stars~913 tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Clang Tidy

What does Clang Tidy do?

对指定文件或全仓库运行 clang-tidy(WarningsAsErrors='')。用户要求 "跑 clang-tidy"、"tidy 检查某文件"、排查 CI tidy 门禁失败时使用。. Clang Tidy is an agent skill from thun-res/vlink.

How do I install Clang Tidy in Claude Code?

Run `npx skills add thun-res/vlink --skill clang-tidy -a claude-code`. Or copy the skill folder (.agents/skills/clang-tidy in thun-res/vlink) into .claude/skills/clang-tidy in your project. Claude Code loads it when a task matches its description.

How do I install Clang Tidy in Codex?

Run `npx skills add thun-res/vlink --skill clang-tidy -a codex`. Or copy the skill folder (.agents/skills/clang-tidy in thun-res/vlink) into .agents/skills/clang-tidy in your project. Codex loads it when a task matches its description.

Can I use Clang Tidy 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 thun-res/vlink --skill clang-tidy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clang-tidy, .gemini/skills/clang-tidy, .github/skills/clang-tidy and .opencode/skills/clang-tidy in your project.

What does Clang Tidy need to run?

Going by SKILL.md and its folder, Clang Tidy needs the command-line tools its instructions call (cmake and git).

Does Clang Tidy 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 Clang Tidy 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 Clang Tidy use?

Clang Tidy is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clang Tidy use?

About 712 tokens (SKILL.md is roughly 2.8k 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 Clang Tidy?

Skills that share tags, products or a category with Clang Tidy: Paddle Build (PaddlePaddle/Paddle, 24k stars), Fory Release (apache/fory, 4.6k stars), ONNX Runtime Shape Inference Safety Audit (microsoft/onnxruntime, 22k stars) and Code Audit (3stoneBrother/code-audit, 892 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clang Tidy?

thun-res (a GitHub user) maintains it in thun-res/vlink, which has 116 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 9, 2026.

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