Official agent skill

ONNX Runtime Lint

by microsoft in microsoft/onnxruntime

Lints and formats C++ and Python code in the ONNX Runtime repository with lintrunner, clang-format and ruff, preferring a pass over only the changed files.

OfficialMITAuto-check passedDevelopment

Install ONNX Runtime Lint

skills CLI
$ npx skills add microsoft/onnxruntime --skill ort-lint -a claude-code

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

GitHub CLI
$ gh skill install microsoft/onnxruntime ort-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/microsoft/onnxruntime.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/ort-lint .claude/skills/ort-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
ort-lint
GitHub stars
22k
Token cost
~392 tokens
SKILL.md length
111 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Lints and formats C++ and Python code in the ONNX Runtime repository with lintrunner, clang-format and ruff, preferring a pass over only the changed files.

  • Formatting C++ or Python changes before opening an ONNX Runtime pull request
  • SKILL.md covers Setup (one-time), Commands, Style rules and Agent tips
  • Calls pip
  • Checking code style across the whole ONNX Runtime tree

What it does

ONNX Runtime uses lintrunner for both C++ (through clang-format) and Python (through ruff). Setup happens once: `pip install -r requirements-lintrunner.txt`, then `lintrunner init`. The everyday command is `lintrunner -a`, which auto-fixes the changed files; adding `--all-files` sweeps the whole tree, and specific file paths can be listed instead.

The style rules are spelled out. C++ follows Google C++ Style with modifications described in `docs/Coding_Conventions_and_Standards.md`, with a 120-character limit and an aim of 80, configured in `.clang-format` and `.clang-tidy`. Python follows the Google Python Style Guide, an extension of PEP 8, also capped at 120 characters and configured in `pyproject.toml`. For the agent: activate a Python virtual environment before installing, set up lintrunner first if it is missing, and use the changed-files form unless you ask for a full sweep.

When your agent uses it

  • Formatting C++ or Python changes before opening an ONNX Runtime pull request
  • Checking code style across the whole ONNX Runtime tree
  • Setting up lintrunner in a fresh ONNX Runtime checkout

Example prompts

  • “Lint and auto-fix the files I changed in onnxruntime.”
  • “Run lintrunner on all files and summarize what it changed.”
  • “What line length and style should my new C++ operator follow?”

Requirements

  • A checkout of the ONNX Runtime repository
  • Python with pip and a virtual environment
  • `lintrunner` installed from `requirements-lintrunner.txt`

What it can do on your machine

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

    • pip

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

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    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

ONNX Runtime Lint loads about 392 tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 111 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
~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); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/onnxruntime at commit 8420709, republished under its MIT licence (© microsoft). 111 words, ~392 tokens.

Download SKILL.mdSave it as .claude/skills/ort-lint/SKILL.md (or your agent's skills folder).
name
ort-lint
description
Lint and format ONNX Runtime code. Use this skill when asked to lint, format, or check code style for C++ or Python files in ONNX Runtime.

Linting and Formatting ONNX Runtime Code

ONNX Runtime uses lintrunner for both C++ (clang-format) and Python (ruff).

Setup (one-time)

bash
pip install -r requirements-lintrunner.txt
lintrunner init

Commands

bash
lintrunner -a                                        # auto-fix changed files
lintrunner -a --all-files                            # auto-fix all files
lintrunner -a path/to/file.py path/to/other_file.cc  # auto-fix specific files
lintrunner f --all-files                             # format Python files only
lintrunner                                           # check without fixing (dry run)

Style rules

C++
  • Google C++ Style with modifications (see docs/Coding_Conventions_and_Standards.md for full details)
  • Max line length: 120 characters, but aim for 80 when possible
  • Configured in .clang-format and .clang-tidy
Python
  • Google Python Style Guide (extension of PEP 8)
  • Max line length: 120 characters
  • Configured in pyproject.toml

Agent tips

  • Activate a Python virtual environment before installing dependencies. See "Python > Virtual environment" in AGENTS.md.
  • If lintrunner is not yet set up, install and initialize first (see Setup).
  • Prefer lintrunner -a (changed files only) over --all-files unless the user asks for a full sweep.

© microsoft, 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 .github/skills/ort-lint of microsoft/onnxruntime.

Open the folder on GitHubat commit 8420709

Compare with similar skills

ONNX Runtime 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.

ONNX Runtime Lint compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
ONNX Runtime Lint this skillmicrosoft/onnxruntime22k—~392Automated safety check: PassMIT
Bump Depsayutaz/piper-plus218—~1.2kAutomated safety check: PassMIT
Align Recipe pyproject.tomlgoogle/adk-recipes10k—~4.6kAutomated safety check: PassApache-2.0
Cb Code QualityBlkLeg/CircuitBreaker201—~1.9kAutomated safety check: PassMIT
Code Qualitynotque/vexjoy-agent435—~1.5kAutomated safety check: NotesMIT
Tilelang Reviewtile-ai/tilelang-ascend400—~2.8kAutomated safety check: NotesMIT

Similar skills

  • Bump Deps

    ayutaz/piper-plus

    ORT / openjtalk / ruff のような cross-runtime に canonical sync が必要な依存関係を 1 コマンドで bump する read-mostly skill。

    218 GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Align Recipe pyproject.toml

    google/adk-recipes

    Official

    Brings a Python recipe's pyproject.toml in line with the repo's CI rules, either as a read-only dry run or by rewriting the file while keeping comments.

    10k GitHub stars~4.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Cb Code Quality

    BlkLeg/CircuitBreaker

    Circuit Breaker code conventions and the quality gates that actually block a push — ruff, mypy, eslint, the pytest coverage ratchet, and the make verify tiers.

    201 GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Quality

    notque/vexjoy-agent

    Code quality: cleanup, linting, formatting, quality gates. An agent skill from notque/vexjoy-agent.

    435 GitHub stars~1.5k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes
  • Tilelang Review

    tile-ai/tilelang-ascend

    检查代码格式是否符合 CI 规则。自动检测并安装缺失工具(ruff、clang-format),先运行检查生成报告,使用醒目方式询问用户后,仅在用户同意时执行修复。工作流程:检测环境→自动安装缺失工具→运行检查→生成报告→醒目询问→用户确认→执行修复。使用此技能当:用户要求"格式检查"、"格式化代码"、"代码格式化"、"检查代码格式"、"代码…

    400 GitHub stars~2.8k tokensUpdated 7 days ago
    DevelopmentAuto-check: notes
  • Official

    Runs the Megatron-LM autoformat script and its linting tools before a pull request, and keeps Python imports in order with isort.

    18k GitHub stars~317 tokensUpdated today
    DevelopmentAuto-check passed

More from microsoft/onnxruntime

All 14 skills in this repo
  • 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
    Auto-check passed
  • Official

    Explains why editing CUTLASS fused-MHA headers in ONNX Runtime can leave stale CUDA kernels after an incremental build, and how to force and verify a real rebuild.

    22k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • ONNX Runtime Source Build

    microsoft/onnxruntime

    Official

    Builds ONNX Runtime from source with its build scripts, explaining the update, build and test phases, key flags and where the build output lands.

    22k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • ONNX Runtime CI Management

    microsoft/onnxruntime

    Official

    Triggers, re-runs and unblocks the CI checks on an ONNX Runtime pull request, after diagnosing whether a failure is transient or needs a code change.

    22k GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • ONNX Runtime Release Notes

    microsoft/onnxruntime

    Official

    Drafts ONNX Runtime release notes from commit history and contributor metadata using named presets for the full runtime or a scoped component.

    22k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • ONNX Runtime Test Runner

    microsoft/onnxruntime

    Official

    Runs and debugs ONNX Runtime tests: Google Test executables for C++ and unittest or pytest for Python, with filters and build-directory guidance.

    22k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Categories

Questions about ONNX Runtime Lint

What does ONNX Runtime Lint do?

Lints and formats C++ and Python code in the ONNX Runtime repository with lintrunner, clang-format and ruff, preferring a pass over only the changed files. ONNX Runtime uses lintrunner for both C++ (through clang-format) and Python (through ruff).txt`, then `lintrunner init`.

When should I use ONNX Runtime Lint?

ONNX Runtime Lint fits situations like: formatting C++ or Python changes before opening an ONNX Runtime pull request; checking code style across the whole ONNX Runtime tree; setting up lintrunner in a fresh ONNX Runtime checkout.

How do I install ONNX Runtime Lint in Claude Code?

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

How do I install ONNX Runtime Lint in Codex?

Run `npx skills add microsoft/onnxruntime --skill ort-lint -a codex`. Or copy the skill folder (.github/skills/ort-lint in microsoft/onnxruntime) into .agents/skills/ort-lint in your project. Codex loads it when a task matches its description.

Can I use ONNX Runtime 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 microsoft/onnxruntime --skill ort-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/ort-lint, .gemini/skills/ort-lint, .github/skills/ort-lint and .opencode/skills/ort-lint in your project.

What does ONNX Runtime Lint need to run?

Going by SKILL.md and its folder, ONNX Runtime Lint needs the command-line tools its instructions call (pip). Our summary lists: A checkout of the ONNX Runtime repository; Python with pip and a virtual environment; `lintrunner` installed from `requirements-lintrunner.txt`.

Does ONNX Runtime Lint access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is ONNX Runtime 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 ONNX Runtime Lint use?

ONNX Runtime 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 ONNX Runtime Lint 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 ONNX Runtime Lint?

Skills that share tags, products or a category with ONNX Runtime Lint: Bump Deps (ayutaz/piper-plus, 218 stars), Align Recipe pyproject.toml (google/adk-recipes, 10k stars), Cb Code Quality (BlkLeg/CircuitBreaker, 201 stars) and Code Quality (notque/vexjoy-agent, 435 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains ONNX Runtime Lint?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/onnxruntime, which has 22,029 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.

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