Agent skill

Quark Env Preflight

by amd in amd/Quark

Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

MITAuto-check passedAI & LLM Engineering

Install Quark Env Preflight

skills CLI
$ npx skills add amd/Quark --skill quark-env-preflight -a claude-code

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

GitHub CLI
$ gh skill install amd/Quark quark-env-preflight --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/l0-foundation/shared/quark-env-preflight .claude/skills/quark-env-preflight && 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-env-preflight
GitHub stars
181
Token cost
~1.4k tokens
SKILL.md length
528 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

  • Works in 4 steps: Intake: Ask what downstream task the… → Detect: Run the detection commands… → Clarify: If the accelerator is ambiguous… → …
  • A downstream skill needs confirmed hardware and toolchain facts
  • SKILL.md covers Purpose, Inputs, Outputs: env_context.json and What to Detect, plus 4 more sections
  • Calls python and pip

What it does

Quark Env Preflight is an agent skill from amd/Quark. Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning. Use this skill whenever a downstream skill needs confirmed hardware and toolchain facts, when the user mentions their setup, when you need to decide between CUDA/ROCm/CPU install paths, or when any accelerator-related assumption is unconfirmed. Also trigger when the user says things like "check my environment", "what GPU do I have", "is my setup ready for Quark", or before any…

Its SKILL.md is about 1.4k 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 Deep learning. It works with CUDA, Python, NVIDIA AI Platform and PyTorch. The licence is MIT.

When your agent uses it

  • A downstream skill needs confirmed hardware and toolchain facts
  • The user mentions their setup
  • You need to decide between CUDA/ROCm/CPU install paths
  • Any accelerator-related assumption is unconfirmed

Example prompts

  • “check my environment”
  • “what GPU do I have”
  • “is my setup ready for Quark”
  • “/quark-env-preflight”

Requirements

  • Python 3
  • Docker

Workflow steps

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

  1. Intake: Ask what downstream task the user is headed toward (install? PTQ? just checking?). This determines which facts are critical vs…
  2. Detect: Run the detection commands above. Present what was found in a clear summary table.
  3. Clarify: If the accelerator is ambiguous or versions are uncertain, ask the user — do not guess. Show them the conflicting evidence.
  4. Emit: Write the confirmed facts to env_context.json. Hand any unresolved items back to the caller (typically quark-torch-router) so they…

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

    Shell commands in SKILL.md call:

    • python
    • pip

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

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    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 Env Preflight loads about 1.4k tokens when it runs. Until then it costs about 147 tokens; SKILL.md has 528 words of instructions outside code blocks.

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

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). 528 words, ~1,413 tokens.

Download SKILL.mdSave it as .claude/skills/quark-env-preflight/SKILL.md (or your agent's skills folder).
name
quark-env-preflight
description
Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning. Use this skill whenever a downstream skill needs confirmed hardware and toolchain facts, when the user mentions their setup, when you need to decide between CUDA/ROCm/CPU install paths, or when any accelerator-related assumption is unconfirmed. Also trigger when the user says things like "check my environment", "what GPU do I have", "is my setup ready for Quark", or before any install/quantization step where hardware facts are missing.
layer
l0-foundation
primary_artifact
env_context.json
source_knowledge
docs/source/install.rst, pyproject.toml, tools/ci/install_torch.sh

quark-env-preflight

Purpose

Collect raw environment facts and normalize them into env_context.json so that downstream skills (install, model intake, PTQ planning) can make correct decisions without guessing. This skill is the single source of truth for hardware and toolchain state — getting it wrong here cascades into wrong install commands, incompatible packages, or failed quantization runs.

Inputs

  • None — runs standalone, reads from environment

Outputs: env_context.json

Carries OS, Python, and hardware facts collected at preflight.

Schema: env_context.schema.json

json
{
  "environment": {
    "os": "linux",
    "python": "3.13",
    "containerized": false
  },
  "hardware": {
    "accelerator": "nvidia-cuda",
    "cuda_version": "12.6",
    "gpu_count": 1,
    "gpu_model": "RTX 4090",
    "memory_gb": 24
  }
}

env_context.json is for raw machine facts only — no installation results, no user goal, no open questions. Installed PyTorch and Quark versions live in pytorch_install_result.json and quark_install_result.json respectively. Unresolved questions belong in session_context.json (owned by quark-torch-router).

What to Detect

OS and Python
  • OS family and version (Linux distro, Windows version, WSL)
  • Python version — Quark requires >=3.11, <3.14 (pyproject.toml says >=3.11, setup.py says >=3.9.0,<3.14)
  • Whether running inside conda/venv/virtualenv and the environment name
  • Container state: Docker, Podman, or bare metal
Accelerator
  • AMD ROCm: check ROCM_PATH, HIP_VISIBLE_DEVICES, rocm-smi output, ROCm version (supported: 6.4, 7.0, 7.1)
  • NVIDIA CUDA: check CUDA_HOME, CUDA_VISIBLE_DEVICES, nvidia-smi output, CUDA version (supported: 11.8, 12.6, 12.8, 13.0)
  • CPU-only: only set cpu when the user explicitly requests CPU-only OR no GPU evidence exists after thorough checking
  • Normalize to one of: amd-rocm, nvidia-cuda, cpu, unknown
Existing Quark Installation
  • Check python -c "import quark; print(quark.__version__)" — current version is 0.12
  • Check PyTorch version and its CUDA/ROCm build tag (torch.version.cuda, torch.version.hip)
  • Check if torch and accelerator backend are from the same family (never mix CUDA torch with ROCm environment)

Detection Commands

bash
# OS and Python
python --version
uname -a  # or systeminfo on Windows

# GPU detection (try both, one will fail gracefully)
nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv,noheader 2>/dev/null
rocm-smi --showproductname 2>/dev/null

# Environment variables
echo $CUDA_HOME $CUDA_VISIBLE_DEVICES $ROCM_PATH $HIP_VISIBLE_DEVICES

# Existing packages
pip show amd-quark torch 2>/dev/null
python -c "import torch; print(torch.__version__, torch.version.cuda, torch.version.hip)"

Rules

  • Only collect and normalize facts. Do not choose install commands, PTQ schemes, or workflow branches — that is the job of quark-install or quark-torch-quant-plan.
  • Prefer explicit user input over heuristic inference when they conflict. If the user says "I'm on ROCm" but CUDA_HOME is also set, trust the user.
  • Missing evidence ≠ CPU. Treat missing CUDA_VISIBLE_DEVICES, ROCM_PATH, or HIP_VISIBLE_DEVICES as insufficient evidence for cpu. Keep the accelerator as unknown until something definitive is found.
  • Never upgrade unknown to cpu unless the user explicitly says CPU-only or detection confirms zero GPU hardware.
  • Capture version dependencies even if the exact version is not yet known. For example, if the user mentions "ROCm" but not the version, record accelerator: amd-rocm, rocm_version: unknown.
Show full SKILL.md (162 more words)Show less

Interaction Flow

  1. Intake: Ask what downstream task the user is headed toward (install? PTQ? just checking?). This determines which facts are critical vs. nice-to-have.
  2. Detect: Run the detection commands above. Present what was found in a clear summary table.
  3. Clarify: If the accelerator is ambiguous or versions are uncertain, ask the user — do not guess. Show them the conflicting evidence.
  4. Emit: Write the confirmed facts to env_context.json. Hand any unresolved items back to the caller (typically quark-torch-router) so they land in session_context.json under open_questions.

Recovery

  • If environment evidence is contradictory (e.g., both CUDA and ROCm libraries present), keep both raw facts in the summary, set accelerator=unknown, and explain the conflict.
  • If a detection command cannot run (e.g., no permissions for nvidia-smi), report exactly which signal is blocked and suggest the smallest manual check: "Run nvidia-smi in a terminal with GPU access and paste the output."
  • If Python version is outside 3.11–3.13, flag it immediately — Quark will not work.

© 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/l0-foundation/shared/quark-env-preflight of amd/Quark.

Open the folder on GitHubat commit 313cb0b

Compare with similar skills

Quark Env Preflight 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 Env Preflight compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Quark Env Preflight this skillamd/Quark181—~1.4kAutomated safety check: PassMIT
Graphsignalgraphsignal/graphsignal257—~6.2kAutomated safety check: PassApache-2.0
Hyperpod Version Checkerawslabs/agent-plugins9121 repos~910Automated safety check: PassApache-2.0
Magpie Kernel Evaluatoramd/skills395—~2.3kAutomated safety check: PassMIT
Spark Environment Setupwshobson/agents40k—~2kAutomated safety check: PassMIT
Torch TensorrtVectorSpaceLab/AREX-Skill328—~1.5kAutomated safety check: PassBSD-3-Clause

Similar skills

  • 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 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Hyperpod Version Checker

    awslabs/agent-plugins

    Official

    Check and compare software component versions on SageMaker HyperPod cluster nodes - NVIDIA drivers, CUDA toolkit, cuDNN, NCCL, EFA, AWS OFI NCCL, GDRCopy, MPI, Neuron SDK (Trainium/Inferentia)…

    912 GitHub starsUsed in 1 repo~910 tokens
    AI & LLM EngineeringAuto-check passed
  • Benchmarks LLM inference and drives GPU kernel optimization with Magpie.

    395 GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13).

    40k GitHub stars~2k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Torch Tensorrt

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for Torch-TensorRT tasks: compiling PyTorch models with TensorRT, dynamic-shape/export workflows, runtime optimization, Triton/C++/distributed deployment, debugging…

    328 GitHub stars~1.5k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Ako4all

    TongmingLAIC/AKO4ALL

    Drive an agentic loop that iteratively optimizes a GPU kernel for maximum speedup.

    369 GitHub stars~4k tokensUpdated 22 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 9 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 9 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 9 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 9 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 9 days ago
    Auto-check passed
  • Diagnose failed Quark ONNX installation, calibration, quantization, custom-op compilation, or export attempts.

    181 GitHub stars~4.8k tokensUpdated 9 days ago
    Auto-check passed

Questions about Quark Env Preflight

What does Quark Env Preflight do?

Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning. Quark Env Preflight is an agent skill from amd/Quark. Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

When should I use Quark Env Preflight?

Quark Env Preflight fits situations like: A downstream skill needs confirmed hardware and toolchain facts; the user mentions their setup; you need to decide between CUDA/ROCm/CPU install paths; any accelerator-related assumption is unconfirmed.

How do I install Quark Env Preflight in Claude Code?

Run `npx skills add amd/Quark --skill quark-env-preflight -a claude-code`. Or copy the skill folder (.claude/skills-impl/l0-foundation/shared/quark-env-preflight in amd/Quark) into .claude/skills/quark-env-preflight in your project. Claude Code loads it when a task matches its description.

How do I install Quark Env Preflight in Codex?

Run `npx skills add amd/Quark --skill quark-env-preflight -a codex`. Or copy the skill folder (.claude/skills-impl/l0-foundation/shared/quark-env-preflight in amd/Quark) into .agents/skills/quark-env-preflight in your project. Codex loads it when a task matches its description.

Can I use Quark Env Preflight 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-env-preflight -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-env-preflight, .gemini/skills/quark-env-preflight, .github/skills/quark-env-preflight and .opencode/skills/quark-env-preflight in your project.

What does Quark Env Preflight need to run?

Going by SKILL.md and its folder, Quark Env Preflight needs the command-line tools its instructions call (python and pip). Our summary lists: Python 3; Docker.

Does Quark Env Preflight access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Quark Env Preflight 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 Env Preflight use?

Quark Env Preflight 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 Env Preflight use?

About 1.4k tokens (SKILL.md is roughly 5.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 Env Preflight?

Skills that share tags, products or a category with Quark Env Preflight: Graphsignal (graphsignal/graphsignal, 257 stars), Hyperpod Version Checker (awslabs/agent-plugins, 912 stars), Magpie Kernel Evaluator (amd/skills, 395 stars) and Spark Environment Setup (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Quark Env Preflight?

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.