theqtcompanyrnd/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. 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.
npx skills add https://github.com/TheQtCompanyRnD/agent-skills --skill qt-qml-docs
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.
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.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.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 .md files 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.
.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.
Take theqtcompanyrnd/qt-qml-docs from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.