Agent skill

Format

by thun-res in thun-res/vlink

运行 tools/format.sh 对整个仓库做 clang-format、cmake-format 与行尾符 统一。用户要求"格式化代码"、"跑 format"、提交前统一格式时使用。

Apache-2.0Auto-check passed

Install Format

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

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

GitHub CLI
$ gh skill install thun-res/vlink format --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/format .claude/skills/format && 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
format
GitHub stars
116
Token cost
~477 tokens
SKILL.md length
107 words
Files
2
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

运行 tools/format.sh 对整个仓库做 clang-format、cmake-format 与行尾符 统一。用户要求"格式化代码"、"跑 format"、提交前统一格式时使用。

  • Works in 2 steps: 执行 → 注意事项
  • SKILL.md covers 1. 执行 and 2. 注意事项
  • Calls git, pip and brew

What it does

Format is an agent skill from thun-res/vlink. 运行 tools/format.sh 对整个仓库做 clang-format、cmake-format 与行尾符 统一。用户要求"格式化代码"、"跑 format"、提交前统一格式时使用。

Its SKILL.md is about 480 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

  • “跑 format”
  • “/format”

Requirements

  • Python 3

Workflow steps

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

  1. 执行
  2. 注意事项

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:

    • git
    • pip
    • brew
    • bash

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

  • Network

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

Format loads about 477 tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 107 words of instructions outside code blocks.

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

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). 107 words, ~477 tokens.

Download SKILL.mdSave it as .claude/skills/format/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
format
description
运行 tools/format.sh 对整个仓库做 clang-format、cmake-format 与行尾符 统一。用户要求"格式化代码"、"跑 format"、提交前统一格式时使用。

代码格式化

对仓库执行统一格式化,入口与参数同 CI 的 lint 门禁 (.github/scripts/ci-lint.sh)中 "Check formatting" 步骤。本地工具版本 不一定与 CI 镜像固定版本相同。

1. 执行

先检查 clang-format 与 cmake-format。任一缺失时停止并询问是否允许 pip install --user;未经确认不得直接运行会自动安装依赖的 tools/format.sh。

bash
REPO_ROOT="$(git rev-parse --show-toplevel)"
export PYTHONPYCACHEPREFIX="$REPO_ROOT/build-ai/skill_format/__pycache__"
command -v clang-format || exit 1
command -v cmake-format || exit 1
FORMAT_PATH="$PATH"
if [ "$(uname -s)" = Darwin ]; then
    command -v brew || exit 1
    GNU_SED_BIN="$(brew --prefix gnu-sed)/libexec/gnubin" || exit 1
    [ -x "$GNU_SED_BIN/sed" ] || exit 1
    FORMAT_PATH="$GNU_SED_BIN:$PATH"
fi
PATH="$FORMAT_PATH" bash "$REPO_ROOT/tools/format.sh" "$REPO_ROOT"

三个阶段共用 tools/format.sh 中同一组目录排除条件: 根 tools/、thirdparty/、build/、build-*/、builtin/、 prebuilt/ 与 android-bp/。这是 /format 的唯一执行范围基准, 语言分册不另行复制维护路径集合。

脚本行为:

  1. clang-format:按仓库根 .clang-format 原地格式化所有 .h/.hpp/.cc/.cpp。
  2. cmake-format:原地格式化所有 CMakeLists.txt、*.cmake、 *.cmake.in。
  3. EOL-FORMAT:按 .gitattributes 的 eol 属性统一脚本文件行尾符 (crlf/lf)。
  4. 最后执行 git diff --quiet:有未暂存的已跟踪差异时退出码为 1 并 打印 diff;仅暂存或未跟踪文件不在该命令的判断范围。干净工作树中可 据此判断格式化产生了改动;脏工作树中不能把全部差异归因于本次格式化。

2. 注意事项

  • tools/format.sh 在依赖缺失时会自动 pip install --user,因此必须 完成上述确认。
  • 执行依赖检查、安装和格式化期间保持上述 PYTHONPYCACHEPREFIX, 不得在源码树生成 __pycache__。
  • 当前脚本使用 GNU sed -i。Linux 直接执行;macOS 必须先确认 Homebrew gnu-sed 可用并按上例注入 PATH。缺失时先询问是否允许安装,不得先跑 前两个原地格式化阶段。
  • 执行前记录 clang-format --version 与 cmake-format --version; 需要精确复现 CI 时使用仓库 CI 镜像中的固定版本。
  • 工作区有未提交改动时也可运行,但 diff 会混入格式化改动;建议先确认 git status 再执行。共享工作区出现并发变化时停止,不得让全仓格式化 覆盖或混入其他 Agent 正在修改的内容。
  • 只做格式化,不做静态检查;静态检查用 /check(cpplint)或 /clang-tidy。

© 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/format of thun-res/vlink.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 1793889

Compare with similar skills

Format 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.

Format compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Format this skillthun-res/vlink116—~477Automated 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
Qt C++ Code Reviewx-tools-author/x-tools1.1k2 repos~4.3kAutomated safety check: PassBSD-3-Clause

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

    doxygen/doxygen

    Keeps all Doxygen and Doxywizard translations up to date across three mechanisms: translator C++ classes (src/translatorxx.h), Qt .ts locale files for the Doxywizard GUI (addon/doxywizard/i18n/)…

    6.6k GitHub stars~5.2k tokensUpdated 9 days ago
    Writing & ContentAuto-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 yesterday
    Auto-check passed
  • Asan

    thun-res/vlink

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

    116 GitHub stars~683 tokensUpdated yesterday
    Auto-check passed
  • Bench

    thun-res/vlink

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

    116 GitHub stars~993 tokensUpdated yesterday
    Auto-check passed
  • Cicd

    thun-res/vlink

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

    116 GitHub stars~856 tokensUpdated yesterday
    Auto-check passed
  • Clang Tidy

    thun-res/vlink

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

    116 GitHub stars~712 tokensUpdated yesterday
    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 yesterday
    Auto-check passed

Works with

Questions about Format

What does Format do?

运行 tools/format.sh 对整个仓库做 clang-format、cmake-format 与行尾符 统一。用户要求"格式化代码"、"跑 format"、提交前统一格式时使用。. Format is an agent skill from thun-res/vlink.

How do I install Format in Claude Code?

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

How do I install Format in Codex?

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

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

What does Format need to run?

Going by SKILL.md and its folder, Format needs the command-line tools its instructions call (git, pip, brew and bash). Our summary lists: Python 3.

Does Format access the network?

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

Is Format 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 Format use?

Format 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 Format use?

About 477 tokens (SKILL.md is roughly 1.9k 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 Format?

Skills that share tags, products or a category with Format: 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 Format?

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.