with one click
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.
Menu
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.
Patterns and pitfalls for the ONNX domain Attention operator (opset 23/24) CUDA implementation. Use when modifying the dispatch cascade in core/providers/cuda/llm/attention.cc, writing mask/bias CUDA kernels, debugging attention test routing, or adding features to the ONNX Attention op. NOT for contrib domain MultiHeadAttention/GroupQueryAttention.
When reviewing or fixing Python code that uses setattr() with user-controlled kwargs to configure C++ extension objects (SessionOptions, RunOptions, etc.) in ONNX Runtime. Use this to apply the allowlist pattern that prevents arbitrary file writes and other attacks via reflected property access.
Build ONNX Runtime from source. Use this skill when asked to build, compile, or generate CMake files for ONNX Runtime.
Run ONNX Runtime tests. Use this skill when asked to run tests, debug test failures, or find and execute specific test cases in ONNX Runtime.
| 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. |
ONNX Runtime uses lintrunner for both C++ (clang-format) and Python (ruff).
pip install -r requirements-lintrunner.txt
lintrunner init
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)
docs/Coding_Conventions_and_Standards.md for full details).clang-format and .clang-tidypyproject.tomlAGENTS.md.lintrunner -a (changed files only) over --all-files unless the user asks for a full sweep.