/qt-development-skills:qt-qml-docsfrom qt-development-skills
Generates standalone Markdown reference documentation for QML components and applications from .qml source files, including API reference docs, property tables, and project context.
Ships in qt-development-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in Qt/QML who writes clear, accurate, developer-friendly reference documentation for QML components. Your task is to read QML source files — along with any related files (C++ backends, QML modules, resource files, CMakeLists.txt, qmldir, etc.) — and produce structured Markdown reference docs that give developers a complete picture of how components fit into the project.
For each QML component, generate a Markdown file named <ComponentName>.md with the following sections (omit any section that has no content):
Describe what the application or module does and where this component fits in the project architecture. Then explain what this specific component does — its visual or logical role, when a developer would reach for it, and what problem it solves. Keep this concise: a developer new to the codebase should understand the component's purpose at a glance.
Explain how the component relates to the project:
If the component inherits from or composes other elements, describe the hierarchy. Explain what the base type provides and what this component adds or overrides.
Use a Markdown table with these columns:
| Property | Type | Default | Required | Description |
|---|
property alias entries.required properties, mark the Required column as Yes.For each signal:
Format as a sub-section per signal: #### signalName(paramType paramName)
For each function:
Format as a sub-section per method: #### methodName(paramType paramName) : returnType
Describe how this component communicates with other parts of the application:
Include this section only when the component is reusable — i.e., it is designed to be instantiated by other QML files rather than serving as a standalone application entry point. A component is reusable when:
Window or ApplicationWindow (those are top-level application windows, not embeddable pieces).property entries (especially required property or property alias) that callers are expected to set.Write a short, self-contained snippet showing a developer the minimal correct way to instantiate the component, setting every required property and any commonly needed properties.
Before reading any source file, check whether documentation already exists for the files you are about to document. This saves time and lets the user decide whether they want a fresh pass or just an update.
Identify the expected output location. Documentation is written to a doc/ subdirectory next to the source files (e.g. if sources are in src/, docs go in src/doc/). For a single file Foo.h, the expected doc is src/doc/Foo.md; for main.cpp it is src/doc/main.md.
Check whether the doc/ directory and the relevant .md files already exist. Use the Glob tool or run a 'ls' shell command — do not read the source files yet.
Act on what you find:
No existing docs found — proceed normally with reading the source files and generating documentation.
Some or all docs already exist — do not read the source files yet. Instead, ask the user using AskUserQuestion with a multiple-choice reply:
"I found existing documentation for [list the files that already have docs]. What would you like me to do?"
Options:
- Update existing docs — re-read the source files and rewrite the affected
.mdfiles in place.- Skip files that already have docs — only generate docs for source files that are missing documentation.
- Generate fresh docs for everything — overwrite all existing docs unconditionally.
- Cancel — stop here; make no changes.
Wait for the user's choice before doing anything else.
Honour the user's choice:
.md files..md, and generate docs only for those.Single file or pasted code: Document just that component. Infer application context from imports, property names, and the component's structure.
Folder / project: Walk the directory tree, find all .qml files. Also read any CMakeLists.txt, qmldir, or C++ header files — they provide context about module structure and registered types. Generate one .md per component. If documenting more than one file, also create a doc/index.md that lists every component with a one-line description and links.
Read the source carefully:
property <type> <name>: <default> — custom property with optional default.property alias <name>: <target> — alias; document as type matching the target.required property — must be explicitly set by the user of this component.signal <name>(<params>) — custom signal.function <name>(<params>) { } — JS function.readonly property — cannot be set externally; document as read-only.component <Name> : BaseType { } — inline component definition; document as a separate component within the same file._ are usually private — skip them unless clearly intended as public API.string, int, real, color, bool, var, list<Type>, etc.doc/ subdirectory next to the source QML files.doc/index.md if documenting 2 or more components. For single-file documentation, just create the component .md file.Before saving, verify:
AI assistance has been used to create this output.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub theqtcompanyrnd/agent-skills --plugin qt-development-skills14 skills in this plugin
/qt-canvas2dApplies Qt Canvas2D (QtCanvas2D / Qt Canvas Painter, Qt 6.12+) best practices when producing or working with Canvas2D QML source code. Use whenever Canvas2D, Canvas2DContext, path2d, boxshadow2d, boxgradient2d, gridpattern2d, conicalgradient2d or transform2d is the subject: writing, reviewing, fixing, optimizing, or porting Qt Quick Canvas / HTML5 canvas drawing code to Canvas2D. Also use for GPU-accelerated imperative 2D drawing in QML — gauges, dials, charts, waveforms, oscilloscopes, clocks, freehand drawing — including choosing between Canvas2D and Shape/ShapePath when the renderer has not been decided yet. Do NOT trigger for plain Qt Quick Canvas work that must stay on the old CPU element, or for reviewing existing Shape/ShapePath code where the renderer is already settled./qt-cmake-projectUse to generate or update Qt 6 CMake projects or edit CMakeLists.txt, add sources/resources or define targets (executable, QML module, library)./qt-cpp-docsGenerates standalone Markdown reference documentation for any Qt/C++ source files — Qt Widgets classes, Qt Quick backends, Qt/C++ modules, plain C++ utilities, structs, free-function headers, and entry points like main.cpp. Use this skill to document any .h or .cpp file: Qt classes, plain C++ code, utility helpers, or application startup files. Triggers on: "document this class", "write docs for my C++", "document main.cpp", "C++ API docs", "document my Qt app", or whenever C++ or header files are provided and documentation is needed. Works with single files, pasted code, or entire project folders. DO NOT use if the user asks for QDoc format output.Other plugins' skills for the same job