Agent skill

Onnxtxt

by onnx in onnx/onnx

Read or write ONNX text format ("onnxtxt"). An agent skill from onnx/onnx.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Onnxtxt

skills CLI
$ npx skills add onnx/onnx --skill onnxtxt -a claude-code

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

GitHub CLI
$ gh skill install onnx/onnx onnxtxt --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/onnx/onnx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/onnxtxt .claude/skills/onnxtxt && 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
onnxtxt
GitHub stars
22k
Token cost
~1.3k tokens
SKILL.md length
395 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

Read or write ONNX text format ("onnxtxt"). An agent skill from onnx/onnx.

  • Authoring .FunctionBody(RONNX(...)) blocks
  • SKILL.md covers Where the format appears, Core syntax, Argument-order convention and Testing idioms, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Writing tests with onnx.parser.parsemodel / parsegraph

What it does

Onnxtxt is an agent skill from onnx/onnx. Read or write ONNX text format ("onnxtxt"). Use when authoring .FunctionBody(R"ONNX(...)") blocks, writing tests with onnx.parser.parsemodel / parsegraph, using the C++ OnnxParser, debugging parser errors, or interpreting Constant <value = ... and body-subgraph syntax.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Deep learning. It works with ONNX, C++ and Python. The repository describes itself as: Open standard for machine learning interoperability. The licence is Apache-2.0.

When your agent uses it

  • Authoring .FunctionBody(RONNX(...)) blocks
  • Writing tests with onnx.parser.parsemodel / parsegraph
  • Using the C++ OnnxParser
  • Debugging parser errors

Example prompts

  • “onnxtxt”
  • “ONNX(...)”
  • “/onnxtxt”

Requirements

  • Python 3

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and cpp).

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

  • Network

    No URLs in SKILL.md.

    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

Onnxtxt loads about 1.3k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 395 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

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 onnx/onnx at commit ab429ea, republished under its Apache-2.0 licence (© onnx). 395 words, ~1,319 tokens.

Download SKILL.mdSave it as .claude/skills/onnxtxt/SKILL.md (or your agent's skills folder).
name
onnxtxt
description
Read or write ONNX text format ("onnxtxt"). Use when authoring `.FunctionBody(R"ONNX(...)")` blocks, writing tests with `onnx.parser.parse_model` / `parse_graph`, using the C++ `OnnxParser`, debugging parser errors, or interpreting `Constant <value = ...>` and body-subgraph syntax.

ONNX has a compact text format implemented by onnx/parser.py (Python) and onnx/defs/parser.{h,cc} (C++). The formal grammar lives in docs/Syntax.md; this skill captures the practical conventions, idioms, and gotchas that matter when authoring or reviewing code that uses it.

Where the format appears

SurfaceAPI
C++ function bodies.FunctionBody(R"ONNX( ... )ONNX") and FunctionBuilder::Add(...)
Python test fixturesonnx.parser.parse_model("..."), onnx.parser.parse_graph("...")
C++ testsOnnxParser in onnx/defs/parser.h — parse a model, then call shape_inference::InferShapes

Core syntax

<var> = <OpName> <attr1 = value, attr2 = value> (<input1>, <input2>)
  • Variables on the LHS are local to the surrounding graph (function body, subgraph, or model main graph).
  • Inputs/outputs of a function body must match the names declared in the schema's .Input(...) / .Output(...).
  • Constants: Const = Constant <value = float {0.0}>() or Alpha = Constant <value_float: float = @alpha>().
  • Use CastLike (not Cast) when the target dtype depends on another input.
  • Reference enclosing-op attributes with @attr_name (only inside function bodies, and only for attributes declared on the schema).

Argument-order convention

Simple scalar/tensor attributes — keep the conventional Op<attrs>(inputs) form; reads well on one line:

Y = Transpose<perm = [2, 0, 1]>(X)

Subgraph attributes (Scan, Loop, If, ScanVarLen, …) — prefer Op(inputs)<body = ...>. The body spans multiple lines, so putting inputs first keeps the call site readable:

so, xo = Scan (s, x) <
    num_scan_inputs = 1,
    body = scan_body (float[1] s_in, float[1] x_in) => (float[1] s_out, float[1] x_out) {
        s_out = Add(s_in, x_in)
        x_out = Identity(x_in)
    }
>

Testing idioms

Test fileRecommendation
tests/python/shape_inference_test.py, tests/python/reference_evaluator_test.pyUse onnx.parser.parse_model(...) for one-off fixtures.
onnx/backend/test/case/node/<op>.pyKeep the outer helper.make_node + expect(...) (it drives data generation). For body-subgraph ops, build the body with onnx.parser.parse_graph.
tests/cpp/shape_inference_test.ccUse OnnxParser (onnx/defs/parser.h); pair with shape_inference::InferShapes.
tests/python/version_converter/automatic_upgrade_test.py and similar harnessesKeep the established _test_op_upgrade / _test_op_downgrade style — do not rewrite.

Empirical: PR #7962 (ScanVarLen) cut ~58–70% of test LOC by switching to parser-based fixtures.

Show full SKILL.md (152 more words)Show less
Python example — shape inference fixture
python
import onnx
import onnx.parser
import onnx.shape_inference

model = onnx.parser.parse_model("""
    <ir_version: 8, opset_import: ["" : 18]>
    g (float[2, 3, 4] X) => (float[4, 2, 3] Y) {
        Y = Transpose<perm = [2, 0, 1]>(X)
    }
""")
inferred = onnx.shape_inference.infer_shapes(model, strict_mode=True)
Python example — body subgraph for a node test
python
body = onnx.parser.parse_graph("""
    b (float[1] s, float[1] xi) => (float[1] so, float[1] xo) {
        so = Identity(s)
        xo = Identity(xi)
    }
""")
node = onnx.helper.make_node("Scan", ["s", "x"], ["so", "xo"], body=body, num_scan_inputs=1)
C++ example — shape inference test
cpp
#include "onnx/defs/parser.h"
#include "onnx/shape_inference/implementation.h"

ModelProto model;
OnnxParser parser(R"ONNX(
    <ir_version: 8, opset_import: ["" : 18]>
    g (float[2, 3, 4] X) => (Y) {
        Y = Transpose<perm = [2, 0, 1]>(X)
    }
)ONNX");
auto status = parser.Parse(model);
ASSERT_TRUE(status.IsOK()) << status.ErrorMessage();
shape_inference::InferShapes(model);

Gotchas

  • unk__* materialization in C++ shape-inference tests. Under InferShapes, unset output dims are materialized by MaterializeSymbolicShape into dim_param names like unk__0, unk__1, … Assertions on free dims must accept either an unset dim or an unk__* placeholder — write (or use) a helper that treats both forms as equivalent.
  • Variable-name collisions. Local variables in a function body must not reuse declared input/output names of the enclosing op.
  • @attr_name scope. Only valid inside a function body, and only for attributes declared on the enclosing schema's .Attr(...) calls.
  • CastLike vs Cast. Use CastLike when the desired target dtype is determined by another input; Cast requires a static to attribute.

References

ResourcePath
Formal grammardocs/Syntax.md
C++ parseronnx/defs/parser.h, onnx/defs/parser.cc
Python parseronnx/parser.py
C++ parser teststests/cpp/parser_test.cc
Python parser teststests/python/parser_test.py
Empirical LOC winPR #7962 (ScanVarLen test rewrite)

© onnx, Apache-2.0. 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 .agents/skills/onnxtxt of onnx/onnx.

Open the folder on GitHubat commit ab429ea

Compare with similar skills

Onnxtxt 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.

Onnxtxt compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Onnxtxt this skillonnx/onnx22k—~1.3kAutomated safety check: PassApache-2.0
Quark Installamd/Quark181—~1.8kAutomated safety check: NotesMIT
Technology Selectiondotnet/skills5.6k2 repos~2.1kAutomated safety check: PassMIT
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k9 repos~3.3kAutomated safety check: PassMIT
Paddle BuildPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0
Paddle Eager GraphPaddlePaddle/Paddle24k—~562Automated safety check: PassApache-2.0

Similar skills

  • Quark Install

    amd/Quark

    Install or verify the AMD Quark package and its dependencies.

    181 GitHub stars~1.8k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check: notes
  • Official

    Guides technology selection and implementation of AI and ML features in .NET 8+ applications using ML.NET, Microsoft.Extensions.AI (MEAI), Microsoft Agent Framework (MAF), GitHub Copilot SDK, ONNX…

    5.6k GitHub starsUsed in 2 repos~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 9 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Paddle Build

    PaddlePaddle/Paddle

    A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

    24k GitHub stars~1k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed
  • Paddle Eager Graph

    PaddlePaddle/Paddle

    A skill your agent uses when navigating Paddle eager-mode (dynamic graph) source code, tracing forward/backward execution, debugging autograd issues, understanding PyLayer, or investigating…

    24k GitHub stars~562 tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • ExecuTorch Build Guide

    pytorch/executorch

    Builds ExecuTorch from source: the Python package, C++ runtime, model runners, Android and iOS cross-compilation and backend-specific builds, with environment checks.

    5.1k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check: notes

More from onnx/onnx

  • Add Op

    onnx/onnx

    Add a new ONNX operator or update an existing operator to a new opset version.

    22k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Add a function body definition to an ONNX operator, defining how it decomposes into simpler ops.

    22k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Add or update type and shape inference for an ONNX operator.

    22k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Onnxtxt

What does Onnxtxt do?

Read or write ONNX text format ("onnxtxt"). An agent skill from onnx/onnx. Onnxtxt is an agent skill from onnx/onnx. Read or write ONNX text format ("onnxtxt").

When should I use Onnxtxt?

Onnxtxt fits situations like: authoring .FunctionBody(RONNX(...)) blocks; writing tests with onnx.parser.parsemodel / parsegraph; using the C++ OnnxParser; debugging parser errors.

How do I install Onnxtxt in Claude Code?

Run `npx skills add onnx/onnx --skill onnxtxt -a claude-code`. Or copy the skill folder (.agents/skills/onnxtxt in onnx/onnx) into .claude/skills/onnxtxt in your project. Claude Code loads it when a task matches its description.

How do I install Onnxtxt in Codex?

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

Can I use Onnxtxt 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 onnx/onnx --skill onnxtxt -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/onnxtxt, .gemini/skills/onnxtxt, .github/skills/onnxtxt and .opencode/skills/onnxtxt in your project.

What does Onnxtxt need to run?

SKILL.md names no scripts, command-line tools or credentials: Onnxtxt is instructions for the agent only. Our summary lists: Python 3.

Does Onnxtxt access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Onnxtxt 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 Onnxtxt use?

Onnxtxt is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Onnxtxt use?

About 1.3k tokens (SKILL.md is roughly 5.3k 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 Onnxtxt?

Skills that share tags, products or a category with Onnxtxt: Quark Install (amd/Quark, 181 stars), Technology Selection (dotnet/skills, 5.6k stars), Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Paddle Build (PaddlePaddle/Paddle, 24k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Onnxtxt?

onnx (a GitHub organization) maintains it in onnx/onnx, which has 21,564 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 7, 2026.

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