mcpbeat

Ort Lint

microsoft/ort-lint

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.

391 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
21266
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/onnxruntime --skill ort-lint

The instruction itself

7 sections, as written by the author

Linting and Formatting ONNX Runtime Code

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

Setup (one-time)

pip install -r requirements-lintrunner.txt
lintrunner init

Commands

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.

How to use it

Copy the folder

Take microsoft/ort-lint from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference pip. Without those the skill loads but fails at the first command.