Agent skill

Quark Onnx Shapeshifter Run

by amd in amd/Quark

Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML.

MITAuto-check passedAI & LLM Engineering

Install Quark Onnx Shapeshifter Run

skills CLI
$ npx skills add amd/Quark --skill quark-onnx-shapeshifter-run -a claude-code

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

GitHub CLI
$ gh skill install amd/Quark quark-onnx-shapeshifter-run --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/amd/Quark.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/_legacy_impl/l1-atomic/onnx/quark-onnx-shapeshifter-run .claude/skills/quark-onnx-shapeshifter-run && 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
quark-onnx-shapeshifter-run
GitHub stars
182
Token cost
~1.9k tokens
SKILL.md length
776 words
Files
2
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML.

  • Works in 5 steps: Intake — confirm the input .onnx path… → Route — verify every requested pass is… → Plan — present the YAML config (pass… → …
  • Run ShapeShifter on my .onnx
  • SKILL.md covers Purpose, Inputs, Outputs:… and Interaction Flow, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Quark Onnx Shapeshifter Run is an agent skill from amd/Quark. Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML. Trigger for "run ShapeShifter on my .onnx", "apply an onnx pass", "fold batch norm / simplify / convert opset / fuse LayerNorm on my ONNX model", "preprocess my .onnx before quantization", "postprocess my quantized .onnx for XINT8/NPU". Operates on .onnx only. NOT authoring a new pass (use quark-create-shapeshifter-pass), NOT full quantization (use quark-onnx-ptq), NOT PyTorch models.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `evals/evals.json`).

It sits in AI & LLM Engineering, covering LLM inference and serving and Deep learning. It works with ONNX and PyTorch. The licence is MIT.

When your agent uses it

  • Run ShapeShifter on my .onnx
  • Apply an onnx pass
  • Fold batch norm / simplify / convert opset / fuse LayerNorm on my ONNX model
  • Preprocess my .onnx before quantization

Example prompts

  • “run ShapeShifter on my .onnx”
  • “apply an onnx pass”
  • “preprocess my .onnx before quantization”
  • “/quark-onnx-shapeshifter-run”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Intake — confirm the input .onnx path exists, capture the requested transformation(s) and
  2. Route — verify every requested pass is an ONNX pass (onnx_*) and exists in
  3. Plan — present the YAML config (pass order + config keys) before writing. Confirm the config
  4. Confirm — get approval before running the CLI (it writes the output file).
  5. Execute or Summarize — write shapeshifter_config.yaml, run the CLI, then verify the output

What it can do on your machine

Read from SKILL.md and the folder at commit 313cb0b. 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 yaml and bash).

    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

Quark Onnx Shapeshifter Run loads about 1.9k tokens when it runs. Until then it costs about 134 tokens; SKILL.md has 776 words of instructions outside code blocks.

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

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 amd/Quark at commit 313cb0b, republished under its MIT licence (© amd). 776 words, ~1,922 tokens.

Download SKILL.mdSave it as .claude/skills/quark-onnx-shapeshifter-run/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
quark-onnx-shapeshifter-run
description
Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML. Trigger for "run ShapeShifter on my .onnx", "apply an onnx_ pass", "fold batch norm / simplify / convert opset / fuse LayerNorm on my ONNX model", "preprocess my .onnx before quantization", "postprocess my quantized .onnx for XINT8/NPU". Operates on .onnx only. NOT authoring a new pass (use quark-create-shapeshifter-pass), NOT full quantization (use quark-onnx-ptq), NOT PyTorch models.
layer
l1-atomic
backend
onnx
primary_artifact
shapeshifter_config.yaml
source_knowledge
docs/source/quark_shapeshifter.rst, docs/source/quark_shapeshifter_onnx_passes.rst, quark/shapeshifter/engine.py, quark/shapeshifter/utils.py…

quark-onnx-shapeshifter-run

Purpose

Apply one or more existing ShapeShifter ONNX passes to an .onnx model by authoring a ShapeShifter YAML config and running the quark-cli shapeshifter CLI. ShapeShifter is Quark's pass-based graph-transformation framework; this skill covers invoking its built-in onnx_* passes (fold BatchNorm, simplify, convert opset, fuse LayerNorm/GELU, align scales, XINT8/NPU adaptation, etc.) as a standalone file→file transform — separate from authoring a new pass (quark-create-shapeshifter-pass) and from a full quantization run (quark-onnx-ptq). It exists so graph preprocessing/postprocessing can be run and inspected on its own, and so the driving YAML is a reusable, reviewable artifact.

Inputs

  • Required: path to an .onnx model (optionally with an adjacent .onnx_data external-weights file).
  • Required: the pass(es) to apply and their config keys. If the user names an effect ("fold batch norm") rather than a pass name, map it to the pass via the catalog in docs/source/quark_shapeshifter_onnx_passes.rst.
  • Required: an output .onnx path.
  • Optional: whether these are preprocessing (float model) or postprocessing (quantized Q/DQ model) passes — affects which passes are valid and the recommended order.

Outputs: shapeshifter_config.yaml

The primary artifact is the ShapeShifter YAML config that drives the run — reusable and reviewable. Side effect: the transformed model written to the user's output .onnx path.

yaml
input_model_path: /path/to/model.onnx
passes:
  onnx_convert_opset_version:
    target_opset_version: 21
  onnx_simplify:
    simplify: true
  onnx_fold_batch_norm:
    fold_batch_norm: true
output_model_path: /path/to/model_out.onnx

No JSON schema — this is a ShapeShifter CLI config (see quark/shapeshifter/utils.py), not a cross-skill contract artifact.

Interaction Flow

  1. Intake — confirm the input .onnx path exists, capture the requested transformation(s) and the output path. Map effect words to concrete pass names.
  2. Route — verify every requested pass is an ONNX pass (onnx_*) and exists in quark/shapeshifter/passes/. If the user asked to create a pass, hand off to quark-create-shapeshifter-pass; if they asked to quantize, hand off to quark-onnx-ptq.
  3. Plan — present the YAML config (pass order + config keys) before writing. Confirm the config key for each pass (many passes are a silent no-op without their enable flag — see Recovery).
  4. Confirm — get approval before running the CLI (it writes the output file).
  5. Execute or Summarize — write shapeshifter_config.yaml, run the CLI, then verify the output model loads and the transformation took effect. Summarize what changed.

Invoking the CLI

Write the YAML (see Outputs), then:

bash
quark-cli shapeshifter shapeshifter_config.yaml

The CLI loads the model, runs each pass in the order listed (each on the previous pass's output), and writes output_model_path. JSON configs also work. An explicit model config is equivalent to the flat form and clearer when in doubt:

yaml
input_model_config:
  model_type: onnx        # discriminator
  input_model_path: /path/to/model.onnx
passes: { ... }
output_model_path: /path/to/model_out.onnx

Pass Selection

Full catalog + config keys: docs/source/quark_shapeshifter_onnx_passes.rst. Common choices:

IntentPassConfig key
Constant-fold / clean graphonnx_simplifysimplify: true
Upgrade opsetonnx_convert_opset_versiontarget_opset_version: 21
Fold BatchNorm into Conv/Gemmonnx_fold_batch_normfold_batch_norm: true
Fuse LayerNorm / GELUonnx_fuse_layer_norm / onnx_fuse_gelufuse_layer_norm: true / fuse_gelu: true
Layout NCHW→NHWConnx_convert_nchw_to_nhwcconvert_nchw_to_nhwc: true
Cross-layer equalizationonnx_cross_layer_equalizationcross_layer_equalization: true
Align Q/DQ scales (quantized)onnx_align_scalealign_scale: [Concat, MaxPool]
XINT8/NPU adapt (quantized)onnx_xint8_adjust / onnx_xint8_simulatexint8_adjust: true / xint8_simulate: true

Preprocessing passes run on the float model (before quantization); postprocessing passes (onnx_align_scale, onnx_adjust_bias_scale, onnx_xint8_*, bfloat16 passes) expect a quantized Q/DQ model. Do not run postprocessing passes on a float model.

Ordering tip: put opset conversion and onnx_simplify first (some fusions require a newer opset and a cleaner graph), then folding/fusion, then per-node initializer passes.

Show full SKILL.md (265 more words)Show less

Relationship to quantization

If the goal is to run these passes as part of quantization rather than standalone, they can be driven from the quantizer instead via extra_options={"ShapeShifterYaml": "config.yaml"} with preprocess_passes: / postprocess_passes: groups — that path belongs to quark-onnx-ptq. Use this skill only for the standalone file→file transform.

Recovery

  • Pass ran but nothing changed (silent no-op) — most passes require their enable flag; e.g. onnx_convert_clip_to_relu needs convert_clip_to_relu: true. A missing/false flag logs a warning and returns the model unchanged. Re-check the config key against the docs.
  • Pass '<name>' is not registered — misspelled pass name or a pytorch_* name. List valid names with ls quark/shapeshifter/passes/; this skill is ONNX-only.
  • ValueError: ... is not an ONNX pass — a pytorch_* pass slipped into the config. All passes in one run must be ONNX.
  • Postprocessing pass errors on a float model — onnx_align_scale / onnx_xint8_* need a quantized Q/DQ model. Quantize first (quark-onnx-ptq), then apply.
  • CLI errors / onnxruntime traceback — hand off to quark-onnx-debug with the exact message.
  • Output opset too low for a fusion — onnx_fuse_gelu (opset ≥ 20) and onnx_fuse_layer_norm (opset ≥ 17) auto-skip on lower opsets; add onnx_convert_opset_version earlier in the list.

Notes

  • CLI wrapper: quark/experimental/cli/shapeshifter.py (the deprecated onnx-adapter alias still works). Config loader: quark/shapeshifter/utils.py (LoadConfigFromFileOrDict — accepts a dict, JSON string, or YAML/JSON file path). Execution loop + model-type detection: quark/shapeshifter/engine.py.
  • Passes run sequentially in listed order; there is no parallelism (deterministic by design).
  • For an in-memory (no-disk) transform in Python, the shapeshifter() API takes a model= arg and returns the transformed ModelProto — but this skill is the CLI file→file path.
  • Do not silently skip output verification; confirm the model loads and the intended nodes changed.

© amd, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/_legacy_impl/l1-atomic/onnx/quark-onnx-shapeshifter-run of amd/Quark.

  • SKILL.md
  • evals/evals.json

Open the folder on GitHubat commit 313cb0b

Compare with similar skills

Quark Onnx Shapeshifter Run 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.

Quark Onnx Shapeshifter Run compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Quark Onnx Shapeshifter Run this skillamd/Quark182—~1.9kAutomated safety check: PassMIT
Model Builderqualcomm/qai-appbuilder247—~4.1kAutomated safety check: PassBSD-3-Clause
Tao Port Huggingface ModelNVIDIA/skills3.6k—~4.5kAutomated safety check: NotesApache-2.0
Model Inference Optimizemajiayu000/spellbook287—~1.1kAutomated safety check: PassMIT
Graphsignalgraphsignal/graphsignal257—~6.3kAutomated safety check: PassApache-2.0
Embedded AI Deploymentmatlab/agent-skills-playground184—~3.4kAutomated safety check: PassCustom licence

Similar skills

  • Model Builder

    qualcomm/qai-appbuilder

    QAI ModelBuilder. An agent skill from qualcomm/qai-appbuilder.

    247 GitHub stars~4.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Official

    Integrate a HuggingFace Computer Vision model into the NVIDIA TAO Toolkit ecosystem (tao-core config, tao-pytorch trainer, tao-deploy TensorRT pipeline).

    3.6k GitHub stars~4.5k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check: notes
  • Model Inference Optimize

    majiayu000/spellbook

    优化实际模型推理链路,将正确性对齐、分段 profiling、显存与数据搬运、TensorRT/ONNX/PyTorch 后端、attention/kernel、FP8/compile、缓存与少步采样、质量回归、GPU 成本和服务验收串成同一实验闭环。当用户要求推理提速、降低显存或 GPU 成本、复现模型效果、定位 GPU 利用率低、优化图像/视频/扩散模型或自托管 LLM 时使用,提供…

    287 GitHub stars~1.1k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Graphsignal

    graphsignal/graphsignal

    Profile AI inference workloads (vLLM, SGLang, TensorRT-LLM, PyTorch, any GPU application) with the Graphsignal profiler and read the results from its local /signals JSON endpoint.

    257 GitHub stars~6.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Embedded AI Deployment

    matlab/agent-skills-playground

    Deploy AI models to embedded hardware using MathWorks tools (MATLAB, Simulink, Embedded Coder).

    184 GitHub stars~3.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Perforatedai

    PerforatedAI/PerforatedAI

    Expert in PerforatedAI library for adding artificial dendrites to PyTorch neural networks.

    237 GitHub stars~17k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed

More from amd/Quark

All 37 skills in this repo
  • Author or restructure a Quark Agent Skill so it conforms to this project's template, contracts, and layer rules.

    182 GitHub stars~3.1k tokensUpdated 12 days ago
    Auto-check passed
  • Run, resume, monitor, diagnose, and report Quark Quant-Perf workflows for PyTorch and HuggingFace transformers models.

    182 GitHub stars~3k tokensUpdated 12 days ago
    Auto-check passed
  • Author a new ShapeShifter graph-transformation pass for AMD Quark (ONNX or PyTorch) so it conforms to the pass framework's conventions and auto-registers.

    182 GitHub stars~2.9k tokensUpdated 12 days ago
    Auto-check passed
  • Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

    182 GitHub stars~1.4k tokensUpdated 12 days ago
    Auto-check passed
  • Quark Install

    amd/Quark

    Install or verify the AMD Quark package and its dependencies.

    182 GitHub stars~1.8k tokensUpdated 12 days ago
    Auto-check: notes
  • L3 recipe that runs quark.onnx.AutoSearchPro end-to-end on a user .onnx model: intake → preset selection (or custom search space) → calibration / eval data reader → standalone autosearch script…

    182 GitHub stars~3.4k tokensUpdated 12 days ago
    Auto-check passed

Works with

Questions about Quark Onnx Shapeshifter Run

What does Quark Onnx Shapeshifter Run do?

Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML. Quark Onnx Shapeshifter Run is an agent skill from amd/Quark.onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML.

When should I use Quark Onnx Shapeshifter Run?

Quark Onnx Shapeshifter Run fits situations like: run ShapeShifter on my .onnx; apply an onnx pass; fold batch norm / simplify / convert opset / fuse LayerNorm on my ONNX model; preprocess my .onnx before quantization.

How do I install Quark Onnx Shapeshifter Run in Claude Code?

Run `npx skills add amd/Quark --skill quark-onnx-shapeshifter-run -a claude-code`. Or copy the skill folder (skills/_legacy_impl/l1-atomic/onnx/quark-onnx-shapeshifter-run in amd/Quark) into .claude/skills/quark-onnx-shapeshifter-run in your project. Claude Code loads it when a task matches its description.

How do I install Quark Onnx Shapeshifter Run in Codex?

Run `npx skills add amd/Quark --skill quark-onnx-shapeshifter-run -a codex`. Or copy the skill folder (skills/_legacy_impl/l1-atomic/onnx/quark-onnx-shapeshifter-run in amd/Quark) into .agents/skills/quark-onnx-shapeshifter-run in your project. Codex loads it when a task matches its description.

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

What does Quark Onnx Shapeshifter Run need to run?

SKILL.md names no scripts, command-line tools or credentials: Quark Onnx Shapeshifter Run is instructions for the agent only.

Does Quark Onnx Shapeshifter Run 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 Quark Onnx Shapeshifter Run 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 Quark Onnx Shapeshifter Run use?

Quark Onnx Shapeshifter Run is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Quark Onnx Shapeshifter Run use?

About 1.9k tokens (SKILL.md is roughly 7.7k 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 Quark Onnx Shapeshifter Run?

Skills that share tags, products or a category with Quark Onnx Shapeshifter Run: Model Builder (qualcomm/qai-appbuilder, 247 stars), Tao Port Huggingface Model (NVIDIA/skills, 3.6k stars), Model Inference Optimize (majiayu000/spellbook, 287 stars) and Graphsignal (graphsignal/graphsignal, 257 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Quark Onnx Shapeshifter Run?

amd (a GitHub organization) maintains it in amd/Quark, which has 182 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 28, 2026.

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