qt-cpp-review
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 six parallel deep- analysis agents 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.
What this skill does
# Qt Code Review A structured, read-only code review skill for Qt6 C++ code that combines deterministic linting with parallel agent-driven deep analysis across six focused domains. ## When to use this skill - When the user mentions review-related tasks: "review", "check", "audit", "look over", "code review", "sanity check" - Suggest running this skill **before committing** code - When the user asks to validate Qt6 C++ code quality ## Arguments - `/qt-cpp-review` — review using universal Qt6 C++ rules only - `/qt-cpp-review framework` — also apply Qt framework/module development rules (BC, exports, d-pointers, qdoc, QML versioning) ## Framework mode detection If `$ARGUMENTS` contains "framework", enable framework mode. If the argument is not passed, auto-detect by scanning the first few files in scope for framework signals. If **two or more** of the following are found, suggest to the user: "This looks like Qt framework/module code. Run `/qt-cpp-review framework` to also apply framework-specific rules (BC, exports, qdoc, QML versioning)?" **Framework signals** (any two = likely framework code): - `QT_BEGIN_NAMESPACE` / `QT_END_NAMESPACE` - `Q_CORE_EXPORT`, `Q_GUI_EXPORT`, `Q_WIDGETS_EXPORT`, or any `Q_*_EXPORT` macro - `#include <QtModule/private/*_p.h>` (private headers) - `Q_DECLARE_PRIVATE`, `Q_D()`, `Q_Q()` - `qt_internal_add_module` or `qt_add_module` in CMakeLists.txt - `sync.profile` or `.qmake.conf` in the repository root Do **not** auto-enable framework mode — only suggest it. Let the user confirm. When framework mode is enabled: 1. Pass `--framework` to the linter (if supported) 2. Load `references/qt-framework-checklist.md` alongside the universal checklist 3. Include framework rules in each agent's mission context ## Scope detection Detect the user's intended scope from their language: ### Diff/commit scope (narrow) Triggered by language like: "this commit", "these changes", "the diff", "what I changed", "my changes", "staged changes", "outstanding changes", "before I commit" **Action**: Run `git diff` (unstaged) and `git diff --cached` (staged) to obtain the changeset. If the user says "this commit", use `git diff HEAD~1..HEAD`. Review only the changed lines plus sufficient surrounding context (±50 lines) for understanding. Only report issues found in the changed lines — do not report issues in unchanged surrounding context. ### Codebase scope (wide) Triggered by language like: "review the codebase", "audit the project", "check the repository", "review src/", or when a specific file/directory path is given without commit language. **Action**: Glob for `*.cpp`, `*.h`, `*.hpp` files in the specified scope. Review all matched files. ## Execution order The review proceeds in three phases. **Never skip a phase.** ### Phase 1: Deterministic linting (scripts) Run the unified Python linter against the target files. Requires Python 3.6+ (no external dependencies). If Python is not available, warn the user and skip to Phase 2. ```bash python3 references/lint-scripts/qt_review_lint.py <files...> # If python3 is not found, fall back to: python references/lint-scripts/qt_review_lint.py <files...> ``` This single-pass scanner encodes all mechanically-checkable rules from the Qt review guidelines. It reads each file once and evaluates all rules per line. Output is deterministic and repeatable. The linter is authoritative — do not second-guess its output. Collect all output before proceeding to Phase 2. **Rule categories** (60+ checks): - **INC** (Includes) — ordering, qglobal.h, qNN duplication - **DEP** (Deprecated) — obsolete Qt/std class usage - **PAT** (Patterns) — anti-patterns (min/max, std::optional, NRVO, COW detach, etc.) - **MDL** (Model) — QAbstractItemModel contract (begin/end balance, dataChanged roles, flags, default: in data()) - **ERR** (Error Handling) — QFile::open, QJsonDocument::isNull, QNetworkReply::error, SSL, timeouts, arg() mismatch - **LCY** (Lifecycle) — deleteLater, Q_ASSERT side effects, null guards, unbounded containers, qDeleteAll depth - **API** (Naming) — get-prefix, enum hygiene, QList<QString> - **HDR/TMO/CND/VAL/TRN** — headers, timeouts, conditionals, value classes, ternary operator ### Phase 2: Agent-driven deep analysis (6 parallel agents) Launch six focused review agents in parallel. Name each agent descriptively when launching (e.g. "Agent 1: Model Contracts") to provide progress visibility. Each agent has a tight scope and a specific checklist. Agents are READ-ONLY — they must never edit or write files. **Tool-agnostic agent contract**: Each agent described below is a self-contained review mission. In Claude Code, launch them as general-purpose subagents. In other tools, implement each as whatever subprocess, prompt chain, or analysis pass the tool supports. The key requirement is that each agent: - Has read access to all source files in scope - Can search/grep the codebase to trace symbols - Reports findings in the structured format below - Applies confidence thresholds: >80 = confirmed finding, 60–79 = investigation target (max 10 total across all agents), <60 = suppress - Does NOT duplicate findings from Phase 1 lint output (pass lint output as context to each agent) See **Agent missions** below for the six agents. ### Phase 3: Consolidation and reporting Merge lint script output and all agent findings. Deduplicate (same file+line+issue = one finding). Apply confidence scoring. Format the final report using the output format below. ## Agent missions Launch all six agents in parallel. Pass each agent: 1. The list of files in scope 2. The Phase 1 lint output (so they skip already-flagged issues) 3. Their specific mission below Each agent should read all files in scope, then focus on its assigned categories. --- ### Agent 1: Model Contracts **Scope**: QAbstractItemModel signal protocol, role system, index validity, proxy model correctness. **Check for**: - `beginInsertRows`/`endInsertRows` balance — every structural model change (add/remove/move) must use the correct begin/end pairs. `layoutChanged` is NOT a substitute for insert/remove. - `roleNames()` returning roles that `data()` does not handle (missing switch cases, fall-through to default) - `dataChanged` emitted with empty roles vector (forces full refresh instead of targeted update) - `beginRemoveRows` called with `first > last` (edge case when container is empty — QAIM contract violation) - `flags()` returning inappropriate flags (e.g. `ItemIsEditable` for non-editable items) - `setData()` returning true without emitting `dataChanged` - Proxy models accessing source model internals instead of going through `data()`/`index()` API - Filter/proxy models using source-model indices to index into filtered containers (wrong index space) **References**: `references/qt-review-checklist.md` § Model Contracts --- ### Agent 2: Ownership & Lifecycle **Scope**: Memory ownership, parent-child, resource cleanup, Rule of Five, RAII correctness. **Check for**: - Structs/classes with raw pointers where `new` is visible and no corresponding `delete`/`deleteLater`/smart-pointer wrapping exists (Rule of Five violation) - Missing `deleteLater()` on QNetworkReply in finished handlers - `Q_ASSERT` wrapping side-effectful expressions (compiled out in release builds — the side effect disappears) - `Q_ASSERT` as the sole null guard (crashes in release) - Polymorphic QObject subclasses missing `Q_DISABLE_COPY_MOVE` - Polymorphic classes missing virtual destructor - QTimer/QObject created with `new` but no parent and no other lifecycle management (scope, smart pointer, explicit delete) - `QObject::connect()` called with potentially null sender/receiver outside a null guard (runtime warning) - `m_recentlyAccessed`-style tracking lists that maintain pointers to objects that may be deleted elsewhere (dangling) - Unbounded container growth (append without cap or trim) - Destructor not cl
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.