
qt-qml-docs
Generates standalone Markdown reference documentation for QML components and applications. Use this skill whenever you want to document QML files, create API reference docs for a QML component or module, document a Qt Quick application, or produce developer-facing documentation from .qml source code. Triggers on: "document this QML", "write docs for my QML", "create reference docs", "document QML component", "QML API docs", "document my Qt Quick component", "document my Qt app", or any time one or more .qml 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.
- Installs
- 721
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/theqtcompanyrnd/agent-skills --skill qt-qml-docs- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads qt-qml-docs automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
QML Documentation Skill
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.
Core requirements
- No code snippets (except Usage Example). Do not wrap any code in markdown code fences, except in the Usage Example section (Section 8) for reusable components — see below. Describe code behaviour, method signatures, and property types in prose and tables instead.
- Context-aware. Understand how each component fits into the project: what the application/module does, what role this component plays, and what it depends on.
- Tables for properties. Always use Markdown tables (not bullet lists) to document properties.
- Follow project conventions. Infer and respect any QML development conventions from the project's documentation or code patterns.
Document structure
For each QML component, generate a Markdown file named <ComponentName>.md with the following sections (omit any section that has no content):
1. Component Overview
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.
2. Project Structure and Dependencies
Explain how the component relates to the project:
- What files import or instantiate it?
- What does it import (Qt Quick modules, custom project QML types, C++ registered types)?
- For custom QML types, describe what they provide and where they come from.
- Relevant build or module requirements (e.g. CMake targets, qmldir, qmltypes).
3. Component Hierarchy and Role
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.
4. Properties
Use a Markdown table with these columns:
| Property | Type | Default | Required | Description |
|---|
- List every declared property, including
property aliasentries. - For
requiredproperties, mark the Required column as Yes. - Describe each property in terms of what it controls or enables.
- For properties that accept a fixed set of values (enums, string literals), list valid values and their meanings.
5. Signals
For each signal:
- State its name and parameter list (type and name for each argument).
- Explain what condition triggers the signal.
- Describe what a connected handler is expected to do in response.
Format as a sub-section per signal: #### signalName(paramType paramName)
6. Methods
For each function:
- State its name, parameter names and types, and return type (if any).
- Explain what it does and when to call it.
- Note any side effects (e.g. emits a signal, modifies state, restarts a timer).
Format as a sub-section per method: #### methodName(paramType paramName) : returnType
7. Inter-Component Interactions
Describe how this component communicates with other parts of the application:
- Which properties are driven by external bindings?
- Which signals are consumed by parent or sibling components?
- Which functions are called from outside this file?
- Shared state, models, or singletons it reads from or writes to.
8. Usage Example (reusable components only)
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:
- Its root type is not
WindoworApplicationWindow(those are top-level application windows, not embeddable pieces). - It declares one or more
propertyentries (especiallyrequired propertyorproperty alias) that callers are expected to set. - Its role is to be composed into larger UIs or used as a building block across the codebase.
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.
Pre-flight: check for existing documentation
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.
How to check
-
Identify the expected output location. Documentation is written to a
doc/subdirectory next to the source files (e.g. if sources are insrc/, docs go insrc/doc/). For a single fileFoo.h, the expected doc issrc/doc/Foo.md; formain.cppit issrc/doc/main.md. -
Check whether the
doc/directory and the relevant.mdfiles already exist. Use theGlobtool 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
AskUserQuestionwith 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.
- Update existing docs — re-read the source files and rewrite the affected
Wait for the user's choice before doing anything else.
-
-
Honour the user's choice:
- Update or Generate fresh → read all relevant source files and proceed normally, overwriting the existing
.mdfiles. - Skip → read only the source files that are missing a corresponding
.md, and generate docs only for those. - Cancel → stop and confirm to the user that nothing was changed.
- Update or Generate fresh → read all relevant source files and proceed normally, overwriting the existing
Input handling
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.
Parsing QML accurately
Read the source carefully:
- The root element is the base type; note what it inherits.
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.- Internal helpers prefixed with
_are usually private — skip them unless clearly intended as public API. - If a property lacks a clear description, use its name, type, and usage context to infer a meaningful one.
Tone and style
- Write for a developer who knows QML but has not seen this component before.
- Be precise about types:
string,int,real,color,bool,var,list<Type>, etc. - Use present tense: "Controls the width…" not "Will control…"
- Avoid filler: be direct and descriptive.
- Describe behaviour, not implementation: explain what happens.
- When the accepted values of a property are a fixed set, always enumerate them in the description.
Output location
- Generate docs in a
doc/subdirectory next to the source QML files. - Only create a
doc/index.mdif documenting 2 or more components. For single-file documentation, just create the component.mdfile.
Quality check
Before saving, verify:
- Every property, signal, and function is documented — nothing is silently skipped.
- Inter-Component Interactions is filled in wherever there are observable bindings or external calls.
- Documentation is project-agnostic and does not assume details not evident in the code or provided context.
AI assistance has been used to create this output.
FAQ
What does the qt-qml-docs skill do?
Generates standalone Markdown reference documentation for QML components and applications. Use this skill whenever you want to document QML files, create API reference docs for a QML component or module, document a Qt Quick application, or produce developer-facing documentation from .qml source code. Triggers on: "document this QML", "write docs for my QML", "create reference docs", "document QML component", "QML API docs", "document my Qt Quick component", "document my Qt app", or any time one or more .qml 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.
How do I install qt-qml-docs?
Run npx skills add https://github.com/theqtcompanyrnd/agent-skills --skill qt-qml-docs in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/qt-qml-docs/ (personal) or .claude/skills/qt-qml-docs/ (project).
Which AI agents can use qt-qml-docs?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is qt-qml-docs safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains qt-qml-docs?
It is published by theqtcompanyrnd in theqtcompanyrnd/agent-skills. It has 721 recorded installs.
More from theqtcompanyrnd/agent-skills
qt-qml
theqtcompanyrnd/agent-skills
Applies QML best practices when producing or working with QML source code. Use whenever QML code is the primary subject: writing, reviewing, fixing, refactoring, optimizing, or debugging QML files, components, or bindings. Do NOT trigger for purely conversational QML questions where no code is produced or examined (e.g. "explain how anchors work").
qt-ui-design
theqtcompanyrnd/agent-skills
Design or audit UI for Qt/QML, Qt projects, web, or embedded MPU or MCU targets. Use when creating screens, layouts, navigation, or auditing UX.
qt-cpp-review
theqtcompanyrnd/agent-skills
Invoke when the user asks to review, check, audit, or look over Qt6 C++ code — or suggest before committing. Runs deterministic linting (60+ rules) then deep-analysis agents (scaled to the size of the change) covering model contracts, ownership, threading, API correctness, error handling, and performance. Reports only high-confidence issues (80/100) with structured mitigations. Read-only — never modifies code.
qt-qml-review
theqtcompanyrnd/agent-skills
Invoke when the user asks to review, check, audit, or look over Qt6 QML code -- or suggest before committing. Runs deterministic linting (48+ rules) then deep-analysis agents (scaled to the size of the change) covering bindings, layout, loaders, delegates, states, and performance. Optionally invokes system qmllint for type-level checks. Reports only high-confidence issues (80/100) with structured mitigations. Read-only -- never modifies code.
qt-cpp-docs
theqtcompanyrnd/agent-skills
Generates 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.
qt-qml-profiler
theqtcompanyrnd/agent-skills
Use when the user is investigating QML / Qt Quick performance — both vague complaints ("the UI feels laggy", "this is slow", "frames are dropping", "the app stutters") and explicit asks to profile, find hotspots, or optimize bindings, signals, or rendering. Runs qmlprofiler on a 2D QML application, parses the .qtd trace, and analyzes hotspots against the source with frame-time, memory, and pixmap-cache summaries. Does NOT cover Qt Quick 3D.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.