ort-lint

作成者: microsoft

ONNX Runtimeのコードをリントおよびフォーマットします。C++またはPythonファイルのONNX Runtimeにおけるリント、フォーマット、コードスタイルの確認を求められた場合にこのスキルを使用してください。

npx skills add https://github.com/microsoft/onnxruntime --skill ort-lint

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.

microsoftのその他のスキル

oss-growth
microsoft
OSS成長ハッカーのペルソナ
official
accessibility-aria-expert
microsoft
React/Fluent UIのWebビューにおけるアクセシビリティ問題を検出・修正します。スクリーンリーダー互換性のコードレビュー時、ARIAラベルの修正時、および…の確認時に使用します。
official
generate-canvas-app
microsoft
[DEPRECATED — 代わりに canvas-app を使用してください] 完全なPower Appsキャンバスアプリを生成します。
official
django
microsoft
Djangoウェブ開発のベストプラクティス(モデル、ビュー、テンプレート、テストを含む)
official
github-issue-creator
microsoft
生のメモ、エラーログ、音声入力、スクリーンショットを、簡潔なGitHub Flavored MarkdownのIssueレポートに変換します。ユーザーがバグ情報やエラーを貼り付けた際に使用します。
official
python-package-management
microsoft
依存関係管理にuvを使用し、タスク自動化にpoethepoetを使用します。
official
runtime-validation
microsoft
移行アプリケーションのランタイム検証 — テスト戦略(計画フェーズ)とテスト実行(検証フェーズ)をカバー:起動検証、…
official
azure-postgres-ts
microsoft
pg(node-postgres)パッケージを使用してAzure Database for PostgreSQL Flexible Serverに接続し、パスワード認証とMicrosoft Entra ID(パスワードレス)認証をサポートします。
official