QmlPreviewer
Skill605 starsChanged 28 days agoMITView on GitHub
Auto-detects the active QML file from editor context, runs qmlscene, and copies the rendered image to the clipboard by default. Invoke proactively when the agent needs to preview or visually verify a QML UI.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill whenever the agent needs to preview or visually verify a QML UI.
- Distinctive: line 23
Clipboard Preview: Run the capture script and copy the rendered result to the clipboard.
- Very specific: line 43
Use the direct
qmlscenelaunch only as a fallback: when capture is unavailable or unsuitable. - Distinctive: line 44
Do not silently skip preview: If preview cannot run, explain why.
- Distinctive: line 50
Include runtime or terminal errors: when QML fails to launch.
- Distinctive: line 58
Run the default clipboard capture flow:
- Distinctive: line 64
If clipboard capture is unavailable or unsuitable, launch the page directly:
- Distinctive: line 75
Use this fallback order:
- Distinctive: line 77
If clipboard capture fails, verify both paths and retry only if the failure is clearly path-related.
- Very specific: line 78
If capture remains unsuitable, launch the page directly with qmlscene.
- Distinctive: line 79
If auto-detection fails, ask once for the QML file path, then continue.
- Distinctive: line 80
If QML cannot load, capture terminal or runtime error output and include it in the report.
- Distinctive: line 84
When using this skill in an answer:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
- The agent needs to preview the active QML file to understand the visual result.
- The agent needs to visually verify QML changes it just made or reviewed.
- The agent needs screenshot-based evidence to inspect layout, rendering, clipping, or missing assets.
- The agent needs to confirm whether a QML page loads successfully.
- Visual verification is needed even if the user did not explicitly ask for a preview.
Capabilities
- Auto Detection: Resolve the active QML file from editor context.
- Clipboard Preview: Run the capture script and copy the rendered result to the clipboard.
- Direct Launch: Fall back to
qmlscenewhen clipboard capture is unavailable or unsuitable. - Visual Verification: Report whether the page loads and whether obvious visual problems are present.
- 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
.qmlfile. - If multiple files are open, use the focused editor tab.
- If editor context is missing, search for the most relevant recently edited
.qmlfile. - 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.exeand the QML file. - Use the direct
qmlscenelaunch 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.
Execution Workflow
- Resolve the QML file path from editor context.
- Validate that the QML file path is absolute and exists.
- Resolve the absolute path to
qmlscene.exe. - Run the default clipboard capture flow:
& "<SKILL_DIR>\capture_qmlscene_to_clipboard.ps1" -QmlScenePath "<qmlscene.exe>" -QmlFilePath "<auto-detected absolute QML file path>"- If clipboard capture is unavailable or unsuitable, launch the page directly:
& "<qmlscene.exe>" "<auto-detected absolute QML file path>" --maximized- Inspect the clipboard image or live preview.
- Report load status, visible issues, and any runtime failures.
Fallback Workflow
Use this fallback order:
- If clipboard capture fails, verify both paths and retry only if the failure is clearly path-related.
- If capture remains unsuitable, launch the page directly with
qmlscene. - If auto-detection fails, ask once for the QML file path, then continue.
- If QML cannot load, capture terminal or runtime error output and include it in the report.
Response Policy
When using this skill in an answer:
- State which QML file was previewed.
- State which execution flow was used.
- Report whether the page loaded successfully.
- Summarize obvious visual findings.
- Include launch or runtime errors when present.
- State what blocked verification if preview could not be completed.
Quick Reference
# Default clipboard capture flow
& "<SKILL_DIR>\capture_qmlscene_to_clipboard.ps1" -QmlScenePath "<qmlscene.exe>" -QmlFilePath "<absolute QML file path>"
# Direct qmlscene fallback
& "<qmlscene.exe>" "<absolute QML file path>" --maximizedCurrent Skill Context
The skill currently depends on:
<SKILL_DIR>\SKILL.md
<SKILL_DIR>\capture_qmlscene_to_clipboard.ps1The capture script currently supports:
- Required
-QmlScenePath - Required
-QmlFilePath - Optional
-StartupDelayMs - Optional
-WindowPollTimeoutMs - Optional
-WindowPollIntervalMs - Optional
-KeepOpen
Detailed References
capture_qmlscene_to_clipboard.ps1- default preview and clipboard capture entrypointqmlscene.exe- fallback runtime for direct QML preview
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

