$npx -y skills add TheQtCompanyRnD/agent-skills --skill qt-qml-reviewInvoke when the user asks to review, check, audit, or look over Qt6 QML code -- or suggest before committing. Runs deterministic linting (47+ rules) then six parallel deep- analysis agents covering bindings, layout, loaders, delegates, states, and performance. Optionally invokes
| 1 | # Qt QML Code Review |
| 2 | |
| 3 | A structured, read-only code review skill for Qt6 QML code that |
| 4 | combines deterministic linting with parallel agent-driven deep |
| 5 | analysis across six focused domains. |
| 6 | |
| 7 | ## When to use this skill |
| 8 | |
| 9 | - When the user mentions review-related tasks: "review", "check", |
| 10 | "audit", "look over", "code review", "sanity check" |
| 11 | - Suggest running this skill **before committing** QML code |
| 12 | - When the user asks to validate Qt6 QML code quality |
| 13 | |
| 14 | ## Scope detection |
| 15 | |
| 16 | Detect the user's intended scope from their language: |
| 17 | |
| 18 | ### Diff/commit scope (narrow) |
| 19 | Triggered by language like: "this commit", "these changes", |
| 20 | "the diff", "what I changed", "my changes", "staged changes", |
| 21 | "outstanding changes", "before I commit" |
| 22 | |
| 23 | **Action**: Run `git diff` (unstaged) and `git diff --cached` |
| 24 | (staged) to obtain the changeset. If the user says "this commit", |
| 25 | use `git diff HEAD~1..HEAD`. Review only the changed lines plus |
| 26 | sufficient surrounding context (±50 lines) for understanding. |
| 27 | Only report issues found in the changed lines -- do not report |
| 28 | issues in unchanged surrounding context. |
| 29 | |
| 30 | ### Codebase scope (wide) |
| 31 | Triggered by language like: "review the codebase", "audit the |
| 32 | project", "check the repository", "review src/", or when a specific |
| 33 | file/directory path is given without commit language. |
| 34 | |
| 35 | **Action**: Glob for `*.qml` files in the specified scope. Review |
| 36 | all matched files. |
| 37 | |
| 38 | ## Execution order |
| 39 | |
| 40 | The review proceeds in three phases. **Never skip a phase.** |
| 41 | |
| 42 | ### Phase 1: Deterministic linting (Python script) |
| 43 | |
| 44 | Run the unified Python linter against the target files. Requires |
| 45 | Python 3.6+ (no external dependencies). If Python is not available, |
| 46 | warn the user and skip to Phase 1b. |
| 47 | |
| 48 | ```bash |
| 49 | python3 references/lint-scripts/qt_qml_lint.py <files...> |
| 50 | # If python3 is not found, fall back to: |
| 51 | python references/lint-scripts/qt_qml_lint.py <files...> |
| 52 | ``` |
| 53 | |
| 54 | This single-pass scanner encodes all mechanically-checkable rules |
| 55 | from the QML review checklist. It reads each file once and evaluates |
| 56 | all rules per line, plus block-level structural checks. Output is |
| 57 | deterministic and repeatable. The linter is authoritative -- do not |
| 58 | second-guess its output. |
| 59 | |
| 60 | Collect all output before proceeding. |
| 61 | |
| 62 | **Rule categories** (47+ checks): |
| 63 | - **IMP** (Imports) -- ordering, versioning, redundancy, deprecation |
| 64 | - **ORD** (Ordering) -- QML attribute ordering convention |
| 65 | - **BND** (Bindings) -- property var, imperative =, Qt.binding style |
| 66 | - **LAY** (Layout) -- anchors/Layout mixing, sizing in layouts |
| 67 | - **LDR** (Loader) -- status guards, createComponent, createQmlObject |
| 68 | - **DEL** (Delegates) -- required properties, reuse safety, connect() |
| 69 | - **STA** (States) -- PropertyChanges syntax, transitions, StateGroup |
| 70 | - **IMG** (Images) -- sourceSize, asynchronous loading |
| 71 | - **PRF** (Performance) -- transparent rect, opacity, clip, layer |
| 72 | - **STY** (Style) -- id:root, camelCase, group notation |
| 73 | - **SIG** (Signals) -- Connections target, handler syntax |
| 74 | - **ERR** (Error/Security) -- hardcoded http://, non-portable paths |
| 75 | - **JS** (JavaScript) -- var/let/const, loose equality |
| 76 | |
| 77 | ### Phase 1b: System qmllint (optional) |
| 78 | |
| 79 | Attempt to run `qmllint` if available on the system. Detection |
| 80 | order: |
| 81 | |
| 82 | 1. `$QT_HOST_PATH/bin/qmllint` |
| 83 | 2. `which qmllint` / `where qmllint` |
| 84 | 3. Skip if not found (warn user) |
| 85 | |
| 86 | If found, run with JSON output: |
| 87 | |
| 88 | ```bash |
| 89 | qmllint --json - -I <import-paths> <files...> |
| 90 | ``` |
| 91 | |
| 92 | Parse the JSON output and merge with Python linter findings. |
| 93 | Deduplicate by file+line+issue. qmllint is authoritative for type- |
| 94 | level checks (unresolved types, incompatible assignments, alias |
| 95 | cycles). The Python linter is authoritative for style, ordering, |
| 96 | and performance patterns that qmllint does not cover. |
| 97 | |
| 98 | ### Phase 2: Agent-driven deep analysis (6 parallel agents) |
| 99 | |
| 100 | Launch six focused review agents in parallel. Name each agent |
| 101 | descriptively when launching (e.g. "Agent 1: Bindings & Properties") |
| 102 | to provide progress visibility. Each agent has a tight scope |
| 103 | and a specific checklist. Agents are READ-ONLY -- they must |
| 104 | never edit or write files. |
| 105 | |
| 106 | **Tool-agnostic agent contract**: Each agent described below is |
| 107 | a self-contained review mission. In Claude Code, launch them as |
| 108 | general-purpose subagents. In other tools, implement each as |
| 109 | whatever subprocess, prompt chain, or analysis pass the tool |
| 110 | supports. T |