| compatibility | Designed for Claude Code, GitHub Copilot, and similar agents. |
| description | 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. |
| disable-model-invocation | false |
| license | LicenseRef-Qt-Commercial OR BSD-3-Clause |
| metadata | {"author":"qt-ai-skills","category":"process","github-path":"skills/qt-qml-docs","github-ref":"refs/heads/main","github-repo":"https://github.com/TheQtCompanyRnD/agent-skills","github-tree-sha":"7be87cc84dfa1dad521cc9e5a0cbfa310e1a1a7a","qt-version":"6.x","version":"1.0"} |
| name | qt-qml-docs |
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 alias entries.