Agent skill

Quark Torch Router

by amd in amd/Quark

Route Quark user goals to the correct atomic skill or workflow.

MITAuto-check passedAI & LLM Engineering

Install Quark Torch Router

skills CLI
$ npx skills add amd/Quark --skill quark-torch-router -a claude-code

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

GitHub CLI
$ gh skill install amd/Quark quark-torch-router --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/.claude/skills-impl/l1-atomic/torch/quark-torch-router .claude/skills/quark-torch-router && 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-torch-router
GitHub stars
181
Token cost
~1.9k tokens
SKILL.md length
842 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Route Quark user goals to the correct atomic skill or workflow.

  • Works in 4 steps: Extract the core intent. Strip away… → Check for L0 prerequisites. Before… → Pick the smallest fit. If the user only… → …
  • A user describes a Quark task in plain language — such as install Quark
  • SKILL.md covers Purpose, Inputs, Outputs: session_context.json and CRITICAL ROUTING RULE, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Quark Torch Router is an agent skill from amd/Quark. Route Quark user goals to the correct atomic skill or workflow. Use when a user describes a Quark task in plain language — such as "install Quark", "quantize a model", "analyze my model", "build a PTQ plan", "export the quantized model", "debug a failed run", "run the full PTQ pipeline", "run model quantization", "install Quark", or any request that involves AMD Quark model quantization. This is the entry point skill — trigger it whenever the user's intent involves Quark and the correct downstream skill is not…

Its SKILL.md is about 1.9k 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 LLM inference and serving and Plain language and style rules. It works with PyTorch. The licence is MIT.

When your agent uses it

  • A user describes a Quark task in plain language — such as install Quark
  • Quantize a model
  • Analyze my model
  • Build a PTQ plan

Example prompts

  • “install Quark”
  • “quantize a model”
  • “analyze my model”
  • “/quark-torch-router”

Workflow steps

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

  1. Extract the core intent. Strip away filler and figure out what the user actually needs. "I want to quantize Llama-2 with INT4" → the…
  2. Check for L0 prerequisites. Before routing to an L1 skill, check if the downstream skill needs facts that are missing
  3. Pick the smallest fit. If the user only wants to check their model's architecture, route to quark-torch-model-intake — do not send them…
  4. Handle ambiguity honestly. If the goal is unclear, record the likely routes in open_questions and ask the user. Example: "I want to set up…

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 json).

    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 Torch Router loads about 1.9k tokens when it runs. Until then it costs about 139 tokens; SKILL.md has 842 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~139
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). 842 words, ~1,869 tokens.

Download SKILL.mdSave it as .claude/skills/quark-torch-router/SKILL.md (or your agent's skills folder).
name
quark-torch-router
description
Route Quark user goals to the correct atomic skill or workflow. Use when a user describes a Quark task in plain language — such as "install Quark", "quantize a model", "analyze my model", "build a PTQ plan", "export the quantized model", "debug a failed run", "run the full PTQ pipeline", "run model quantization", "install Quark", or any request that involves AMD Quark model quantization. This is the entry point skill — trigger it whenever the user's intent involves Quark and the correct downstream skill is not immediately obvious.
layer
l1-atomic
primary_artifact
session_context.json
source_knowledge
docs/source/install.rst, examples/torch/language_modeling/llm_ptq/README.md

quark-torch-router

Purpose

Translate a user's natural-language goal into the smallest correct skill boundary. The router exists because Quark has a layered skill system — picking the wrong skill wastes time and produces wrong artifacts. The router is the sole producer of session_context.json; every other artifact (env, workspace, install results) is produced by its own owning skill, and the router only carries forward references to those files.

Inputs

  • User goal stated in natural language
  • env_context.json (optional, when routing depends on hardware facts)
  • workspace_context.json (optional, when routing depends on validated paths)

Outputs: session_context.json

Carries the user goal, selected workflow, constraints, *_ref pointers to other artifacts, and unresolved questions.

Schema: session_context.schema.json

json
{
  "user_goal": "Quantize Qwen/Qwen3-8B with FP8 and export to HuggingFace format",
  "workflow": "quark-torch-llm-ptq-workflow",
  "constraints": {
    "offline": false,
    "execution_mode": "interactive_execute"
  },
  "env_context_ref": null,
  "workspace_context_ref": null,
  "pytorch_install_result_ref": null,
  "quark_install_result_ref": null,
  "open_questions": [
    "GPU type and CUDA/ROCm version not yet confirmed — quark-env-preflight needed"
  ]
}

Set each *_ref field to the path of the corresponding artifact once its producer skill has run. The router never embeds hardware, workspace, or install facts inline — those belong in their owning artifacts.

CRITICAL ROUTING RULE

Any request that involves quantizing a model MUST route to quark-torch-llm-ptq-workflow.

This includes:

  • "quantize X with Y" → workflow
  • "quantize X to FP8/INT4/..." → workflow
  • "run PTQ on X" → workflow
  • "run quantization on X" → workflow
  • "help me quantize" → workflow

NEVER run quantize_quark.py directly without going through the workflow's 4-step flow (intake → plan → manifest → confirmed execution).

Skill Map

User IntentTarget SkillWhy
Quantize a model (any scheme, any model)quark-torch-llm-ptq-workflowMust use the 4-step workflow with checkpoints
Full end-to-end PTQ: from model to quantized outputquark-torch-llm-ptq-workflowMulti-step workflow orchestration
Install PyTorch, set up torch, fix torch versionquark-torch-installPyTorch installation is separate from Quark package installation
Install Quark, set up Quark dependencies, check Quark packagesquark-installQuark package installation, assumes PyTorch already set up
Inspect a model, check architecture, validate model pathquark-torch-model-intakeModel facts are prerequisites for planning
Choose quantization scheme, build a quant planquark-torch-quant-planPlanning is separate from execution
Export quantized model, package for deploymentquark-torch-exportExport is a post-quantization step
Debug a failed run, fix an error, diagnose issuesquark-torch-debugError recovery has its own diagnostic flow
Check environment, detect GPU, verify setupquark-env-preflightL0 fact collection only
Validate paths, check model directoryquark-workspace-validateL0 path validation only

Routing Logic

  1. Extract the core intent. Strip away filler and figure out what the user actually needs. "I want to quantize Llama-2 with INT4" → the intent is PTQ → route to quark-torch-llm-ptq-workflow.

  2. Check for L0 prerequisites. Before routing to an L1 skill, check if the downstream skill needs facts that are missing:

    • If hardware/accelerator facts are needed but unknown → run quark-env-preflight first
    • If model path or output directory needs validation → run quark-workspace-validate first
  3. Pick the smallest fit. If the user only wants to check their model's architecture, route to quark-torch-model-intake — do not send them through the full workflow. But if they say "quantize my model", use quark-torch-llm-ptq-workflow.

  4. Handle ambiguity honestly. If the goal is unclear, record the likely routes in open_questions and ask the user. Example: "I want to set up Quark" — does that mean install, or install + run PTQ?

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

Rules

  • Do not guess hardware facts or paths. If you do not know the GPU type, do not assume CUDA. If you do not know the model path, do not invent one. Unresolved gaps go into open_questions.
  • Explain the routing. Tell the user why you chose a particular skill: "Since you want to quantize a model, I'll use the PTQ workflow which goes through 4 steps: model intake → quant plan → manifest → confirmed execution."
  • Reuse existing context. If a session_context.json already exists from a previous step, read it and carry forward — do not start from scratch.

Interaction Flow

  1. Listen: Restate the user's goal in one sentence to confirm understanding.
  2. Assess: Check what facts are already known vs. missing. Do L0 skills need to run first?
  3. Route: Name the target skill and explain why it is the right fit. For PTQ requests, state that you will follow the 4-step flow with checkpoints.
  4. Hand off: Produce the initial session_context.json and pass control to the chosen skill.

Recovery

  • If the goal is ambiguous, present the 2-3 most likely interpretations and ask the user to pick.
  • If required inputs are missing, list them explicitly — do not route to a downstream skill with known gaps that will immediately fail.
  • If L0 facts are unresolved, hand off a partial session_context.json with the gaps documented rather than forcing a premature routing decision.

Examples

Example 1: Clear PTQ request

User: "Help me quantize Qwen/Qwen3-8B to FP8, output to ./output/qwen3-8b-fp8" Router: → quark-torch-llm-ptq-workflow Explain: "I'll quantize your model through a 4-step workflow: (1) model intake, (2) quantization plan, (3) command generation, (4) execution after your confirmation."

Example 2: Quark install request

User: "How do I install Quark? I'm on Ubuntu with ROCm 7.1" Router: → quark-install (clear Quark install intent, hardware stated — PyTorch setup handled by quark-torch-install if needed)

Example 3: PyTorch install request

User: "I need to install PyTorch for ROCm 7.1" Router: → quark-torch-install (clear PyTorch install intent, accelerator stated)

Example 4: Ambiguous request

User: "I want to use Quark with my model" Router: Ask — "Do you want to: (a) inspect your model's architecture, (b) quantize it, or (c) set up Quark first?"

© 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

Just SKILL.md in .claude/skills-impl/l1-atomic/torch/quark-torch-router of amd/Quark.

Open the folder on GitHubat commit 313cb0b

Compare with similar skills

Quark Torch Router 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 Torch Router compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Quark Torch Router this skillamd/Quark181—~1.9kAutomated safety check: PassMIT
Contextpilot SavingsEfficientContext/ContextPilot140—~1.4kAutomated safety check: PassMIT
RWKV Architecture GuideOrchestra-Research/AI-Research-SKILLs13k2 repos~1.8kAutomated safety check: PassMIT
ML Engineerdavila7/claude-code-templates32k9 repos~2.3kAutomated safety check: PassMIT
Databricks ML Trainingdatabricks/databricks-agent-skills345—~4.6kAutomated safety check: PassCustom licence
Training ReferencesVectorSpaceLab/AREX-Skill330—~684Automated safety check: PassBSD-3-Clause

Similar skills

  • Contextpilot Savings

    EfficientContext/ContextPilot

    A skill your agent uses when a user asks how many tokens (or how much context/cost) ContextPilot has saved, or wants a ContextPilot savings status/summary inside Hermes Agent — e.g.

    140 GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • RWKV Architecture Guide

    Orchestra-Research/AI-Research-SKILLs

    Explains RWKV, a hybrid that trains in parallel like a GPT and runs inference like an RNN with constant memory per token, plus usage, fine-tuning and troubleshooting.

    13k GitHub starsUsed in 2 repos~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • ML Engineer

    davila7/claude-code-templates

    Build production ML systems with PyTorch 2.x, TensorFlow, and modern ML frameworks.

    32k GitHub starsUsed in 9 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Databricks ML Training

    databricks/databricks-agent-skills

    Official

    Train ML models on Databricks. An agent skill from databricks/databricks-agent-skills.

    345 GitHub stars~4.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Training References

    VectorSpaceLab/AREX-Skill

    A skill your agent uses when planning or auditing TorchVision reference training/evaluation workflows for classification, quantization, detection, segmentation, video classification, optical flow…

    330 GitHub stars~684 tokensUpdated 1 mo 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.2k tokensUpdated 11 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.

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

    181 GitHub stars~3k tokensUpdated 11 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.

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

    181 GitHub stars~1.4k tokensUpdated 11 days ago
    Auto-check passed
  • Quark Install

    amd/Quark

    Install or verify the AMD Quark package and its dependencies.

    181 GitHub stars~1.8k tokensUpdated 11 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…

    181 GitHub stars~3.4k tokensUpdated 11 days ago
    Auto-check passed

Works with

Questions about Quark Torch Router

What does Quark Torch Router do?

Route Quark user goals to the correct atomic skill or workflow. Quark Torch Router is an agent skill from amd/Quark. Route Quark user goals to the correct atomic skill or workflow.

When should I use Quark Torch Router?

Quark Torch Router fits situations like: A user describes a Quark task in plain language — such as install Quark; quantize a model; analyze my model; build a PTQ plan.

How do I install Quark Torch Router in Claude Code?

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

How do I install Quark Torch Router in Codex?

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

Can I use Quark Torch Router 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-torch-router -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-torch-router, .gemini/skills/quark-torch-router, .github/skills/quark-torch-router and .opencode/skills/quark-torch-router in your project.

What does Quark Torch Router need to run?

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

Does Quark Torch Router 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 Torch Router 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 Torch Router use?

Quark Torch Router 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 Torch Router use?

About 1.9k tokens (SKILL.md is roughly 7.5k 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 Torch Router?

Skills that share tags, products or a category with Quark Torch Router: Contextpilot Savings (EfficientContext/ContextPilot, 140 stars), RWKV Architecture Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars), ML Engineer (davila7/claude-code-templates, 32k stars) and Databricks ML Training (databricks/databricks-agent-skills, 345 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Quark Torch Router?

amd (a GitHub organization) maintains it in amd/Quark, which has 181 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.