QmlPreviewer

QmlPreviewer is a skill for Claude Code, Codex from mengps/PyHuskarUI. It costs 50 tokens per session (1,090 once invoked), scanned A, a copy of QmlPreviewer, Apache-2.0.

A tool for previewing QML files, which define the layout and behavior of Qt-based user interfaces. It runs the file and places a rendered image on the clipboard for visual inspection.

In plain words
What is it for?
Use it to preview the active QML file, verify interface changes, and capture visual evidence of the result.
Why use it?
It lets an agent check what a QML interface actually looks like and catch loading, layout, clipping, or missing-asset problems.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mengps/pyhuskarui/qmlpreviewer
Any agent
npx skills add mengps/PyHuskarUI --skill qmlpreviewer
Clone the repo
git clone --depth 1 https://github.com/mengps/PyHuskarUI

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for QmlPreviewer

README.md
[![agentmods](https://agentmods.dev/badge/skills/mengps/pyhuskarui/qmlpreviewer.svg)](https://agentmods.dev/skills/mengps/pyhuskarui/qmlpreviewer)
Your own site
<a href="https://agentmods.dev/skills/mengps/pyhuskarui/qmlpreviewer"><img src="https://agentmods.dev/badge/skills/mengps/pyhuskarui/qmlpreviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,090 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00050 $0.01090
Opus 5 $0.00025 $0.00545
Sonnet 5 $0.00010 $0.00218
Haiku 4.5 $0.00005 $0.00109

Measured 5d ago against content hash e3ee15ff0022, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

QmlPreviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (capture_qmlscene_to_clipboard.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to QmlPreviewer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

agent/skills/qmlpreviewer/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

QML Previewer

Use this skill whenever the agent needs to preview or visually verify a QML UI. Prefer the clipboard capture flow by default, and fall back to launching qmlscene directly when capture is unavailable or unsuitable.

When To Use

Invoke this skill proactively when any of the following is true:

  1. The agent needs to preview the active QML file to understand the visual result.
  2. The agent needs to visually verify QML changes it just made or reviewed.
  3. The agent needs screenshot-based evidence to inspect layout, rendering, clipping, or missing assets.
  4. The agent needs to confirm whether a QML page loads successfully.
  5. Visual verification is needed even if the user did not explicitly ask for a preview.

Capabilities

  1. Auto Detection: Resolve the active QML file from editor context.
  2. Clipboard Preview: Run the capture script and copy the rendered result to the clipboard.
  3. Direct Launch: Fall back to qmlscene when clipboard capture is unavailable or unsuitable.
  4. Visual Verification: Report whether the page loads and whether obvious visual problems are present.
  5. Failure Reporting: Surface path issues, launch failures, and runtime errors.

Critical Rules

These rules are always enforced. Follow them in this order.

File Resolution

  • Prefer the active editor file when it is a .qml file.
  • If multiple files are open, use the focused editor tab.
  • If editor context is missing, search for the most relevant recently edited .qml file.
  • If auto-detection still fails, ask the user once for the QML file path.

Preview Execution

  • Use the clipboard capture flow by default.
  • Pass absolute paths only for both qmlscene.exe and the QML file.
  • Use the direct qmlscene launch only as a fallback when capture is unavailable or unsuitable.
  • Do not silently skip preview. If preview cannot run, explain why.

Reporting

  • Report whether the QML page loads successfully.
  • Report obvious layout or rendering issues such as clipping, blank content, missing assets, or unexpected sizing.
  • Include runtime or terminal errors when QML fails to launch.
  • Be explicit about which flow was used: clipboard capture or direct launch.

Read the full file on GitHub · 125 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 125 lines · 50 tokens per session scan A e3ee15ff0022

Subscribe to this mod's changes

QmlPreviewer is a skill published in the GitHub repository mengps/PyHuskarUI (115 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,090 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to QmlPreviewer, differing in 0 lines, and is treated as a copy.