Generates structured Markdown reference documentation for QML components, modules, and Qt Quick applications from .qml source files, pasted code, or project folders.
npx claudepluginhub theqtcompanyrnd/agent-skills --plugin qt-development-skillsThis skill uses the workspace's default tool permissions.
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.
Generates standalone Markdown reference documentation for Qt/C++ source files including Qt classes, utilities, structs, free functions, headers, and main.cpp.
Generates READMEs, API references, inline comments, architecture docs with diagrams, changelogs, and developer guides for codebases, APIs, libraries, and projects.
Creates or updates Markdown docs for OO components from code or existing files using C4/Arc42 templates, code analysis, and mode-specific workflows.
Share bugs, ideas, or general feedback.
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.