coding-conventions
Skill1.1k starsChanged 9 days agoApache-2.0View on GitHub
Use before finishing any new or edited onnx-mlir source file or commit: copyright header, clang-format/black formatting, comment style, and DCO sign-off, separating what CI enforces from convention.
4 other projects use a version of this.
Trending
Quiet since December.about the whole repository
Most recently taken up by
- Evan-Daruwalla/claude-skill-suitetheir own version, first seen Oct 20, 2026
- yuanJewel/skillstheir own version, first seen Oct 11, 2026
- GergKllai1/coding-conventionstheir own version, first seen Sep 17, 2026
- idolaman/galactictheir own version, first seen Dec 27, 2025
Who's talking about onnx/onnx-mlir
- elixir-nx/nx“Import of MLIR modules”GitHub · Mar 5, 2024 · 4 reactions
- PyTorchKR/pytorchcore-kr“더 나은 질의 응답 구조를 위한 Discussion 활용 방안”GitHub · Jan 20, 2025 · 2 reactions
- llvm/torch-mlir“[RFC] Support for an embedded build of Torch-MLIR”GitHub · Sep 23, 2022 · 2 reactions
- Samsung/ONE“[circle-mlir] Update onnx-mlir to official release”GitHub · Jun 8, 2025 · 1 reactions
- Xilinx/onnx-mlir“ONNX to TOSA Legalization Upstream tracker”GitHub · Apr 20, 2023 · 1 reactions
The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 22
Talked about on GitHub (22 times).
On GitHub · 22
- Mar 5, 2024Import of MLIR modules — elixir-nx/nx4 reactions · 2 comments
- Jan 20, 2025더 나은 질의 응답 구조를 위한 Discussion 활용 방안 — PyTorchKR/pytorchcore-kr2 reactions
- Sep 23, 2022[RFC] Support for an embedded build of Torch-MLIR — llvm/torch-mlir2 reactions · 4 comments
- Jun 8, 2025[circle-mlir] Update onnx-mlir to official release — Samsung/ONE1 reaction · 4 comments
- Apr 20, 2023ONNX to TOSA Legalization Upstream tracker — Xilinx/onnx-mlir1 reaction
17 more on GitHub
- Dec 16, 2025[ttl] Automate elementwise op generation from specifications — tenstorrent/tt-lang0 reactions · 1 comment
- Jul 29, 2025Missing Symbols due to visibility setting change — onnx/onnx0 reactions · 2 comments
- Nov 19, 2024Add fancier CI badges showing number of tests and/or test coverage — iree-org/iree-test-suites0 reactions · 2 comments
- Aug 6, 2024Standardize rewriter tests; testing facilities — microsoft/onnxscriptsays it tested it0 reactions · 1 comment
- May 8, 2024Fix macos build by pinning version — Xilinx/onnx-mlir0 reactions
- Mar 30, 2024Include the ".onnxtext" extension in supported serialization format — onnx/onnx0 reactions · 1 comment
- Dec 20, 2023add filecheck test for add.onnx — xdslproject/xdsl0 reactions · 7 comments
- Dec 1, 2023Failed to build with the use of --cpp-implementation — protocolbuffers/protobuf0 reactions
- Oct 27, 2023Bring in the fix for empty slice in canonicalization — Xilinx/onnx-mlir0 reactions
- Oct 25, 2023Cherry-picked upstream PR: Add conversion for DivOp ONNX to TOSA (#2207) — Xilinx/onnx-mlir0 reactions
- Aug 26, 2023Build error on M1 MacOS machine — onnx/onnx0 reactions · 3 comments
- Oct 18, 2022ONNX MLIR exporter — nod-ai/onnx-mlir-exporter0 reactions · 1 comment
- Oct 9, 2022[Feature request] Machine Readable definition of Operations (Schema file instead of Markdown or cc file) — onnx/onnx0 reactions · 14 comments
- Jun 28, 2022Can we have newer opset of bidaf-9 model (including opset 9 or newer onnx.Scan op)? — onnx/models0 reactions · 1 comment
- Jun 5, 2022Broken Links — onnx/onnx.github.io0 reactions · 3 comments
- May 12, 2022Update the onnx-mlir version — DependableSystemsLab/LLTFI0 reactions · 2 comments
- Jun 30, 2020Error when trying to lower alex net onnx model to MLIR — onnx/models0 reactions · 1 comment
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- idolaman/galactic★ 223same name
- yuanJewel/skills★ 2same name
- GergKllai1/coding-conventions★ 1same name
- Evan-Daruwalla/claude-skill-suite★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-fusion-patternSkill
- add-new-onnx-operationSkill
- add-onnx-op-loweringSkill
- add-onnx-op-to-dialectSkill
- add-onnx-transform-passSkill
- debug-compilationSkill
- debug-type-catalogueSkill
- ground-lit-testsSkill
- nnpa-internalsSkill
- nnpa-performanceSkill
- onnx-mlir-internalsSkill
- upgrade-llvm-mlirSkill
- using-torch-onnxmlir-with-huggingfaceSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 65
Files read: all of the above, fetched at the pinned sync SHA cf0842f3ebb13c0b151ee84b2c2816e5f6e1c3d5
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Generated from the onnx-mlir knowledge base (skills/coding-conventions.md), verified against onnx-mlir@b505d64b. Do not edit here: see .agents/skills/README.md. -->Coding Conventions Checklist
Recipe to run before finishing any new or edited onnx-mlir source file: copyright header, C++/Python formatting, comment style, and commit sign-off. Separates what CI actually machine-checks from what is only convention, since assuming the latter is enforced leads to silently-wrong code.
What CI actually enforces
- C++ formatting —
.github/workflows/clang-format-check.ymlrunsclang-formatv9 over./srconly, using the repo's.clang-format:BasedOnStyle: LLVM AlwaysBreakTemplateDeclarations: Yes AlignAfterOpenBracket: DontAlign - Python formatting —
.github/workflows/black-format-check.ymlrunsblack --checkover the whole repo exceptthird_party. - Manual style rules (reviewer-enforced, not machine-checked) —
CODING_PRACTICE.mdlists: use C++-style casts (static_cast<int64_t>(1), not(int64_t)1); do bitwise ops on unsigned types; check the return ofmalloc(),fopen(),fprintf(); parenthesize macro parameter names. - Commit sign-off —
docs/Workflow.mdStep 7 requires DCO sign-off on every commit (git commit -s); this is unrelated to code formatting but gates every PR the same way.
What is not enforced anywhere in this repo
Verified by reading utils/ in full (no header/license-update script exists there) and CODING_PRACTICE.md/CONTRIBUTING.md (neither mentions comment prose or copyright dates):
- No script bumps the copyright year. The header convention, confirmed empirically in
src/Dialect/ONNX/ONNXOps.cpp, is:
Nothing in CI or/* * SPDX-License-Identifier: Apache-2.0 */ //===------------------ <File>.cpp - <One-line description> ---------------------===// // // Copyright <start-year>-<last-edit-year> The IBM Research Authors. // // ============================================================================= // // <Longer description of what this file provides.> // //===----------------------------------------------------------------------===//utils/extends<last-edit-year>automatically — files touched today can still show an old end-year unless someone edits it by hand. Do not assume this is handled. - No linter checks comment prose. "Comments are complete sentences: capitalized, ending in a period" is the general LLVM Coding Standards convention (onnx-mlir's
.clang-formatisBasedOnStyle: LLVM), but it is not machine-checked in this repo — clang-format reformats whitespace/wrapping only, it does not touch comment text content. Treat this as a self-check, not something a tool will catch in review.
Steps to apply when writing/editing a file
- New file — prepend the SPDX + copyright banner shown above, with this year as both start and end year if it's a brand-new file.
- Existing file — look at the current
Copyright <start>-<end>line. If<end>is not the current year, extend it (e.g.2019-2023→2019-2026) by hand; nothing does this for you. - C++ changes — run
clang-format -i <file>before committing (matches the CI check, which pins clang-format v9 against./src). - Python changes — run
black <file>before committing (matches the CI check, repo-wide exceptthird_party). - Every new/edited comment — self-check it starts with a capital letter and ends with a period; this is a manual pass, no tool flags it here.
- Commit — use
git commit -s(DCO requirement, checked on every PR).
None of steps 2 or 5 are automatable from this repo's own tooling — if that matters, it needs a local pre-commit hook or editor-integration script outside onnx-mlir itself.
Verification
- Grounded against:
repo:onnx-mlir@b505d64:.clang-format,CODING_PRACTICE.md,CONTRIBUTING.md,docs/Workflow.md,.github/workflows/clang-format-check.yml,.github/workflows/black-format-check.yml,utils/(full directory listing),src/Dialect/ONNX/ONNXOps.cpp(header example) - Files read: all of the above, fetched at the pinned sync SHA
cf0842f3ebb13c0b151ee84b2c2816e5f6e1c3d5 - Re-checked at:
repo:onnx-mlir@b505d64— the same files:.clang-format(three keys unchanged),clang-format-check.yml(source: ./src,clangFormatVersion: 9),black-format-check.yml(--check --exclude third_party),CODING_PRACTICE.md(the four manual rules),docs/Workflow.md("Step 7: Commit & Push",git commit -s), theutils/listing (still no copyright-year updater; files there only carry the banner), andsrc/Dialect/ONNX/ONNXOps.cpp's header (Copyright 2019-2023, an example of an end-year nobody bumped) - How to test:
clang-format --dry-run -Werror -style=file <changed.cpp>should report no diff against the repo's.clang-format;black --check <changed.py>should pass; grep the file's copyright line and confirm the end-year matches today's year.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

