بنقرة واحدة
technical-doc-review
// Review technical documentation against the HiveMQ writing guidelines, producing a structured quality report with actionable findings per file
// Review technical documentation against the HiveMQ writing guidelines, producing a structured quality report with actionable findings per file
Automated code review against established patterns before PR creation. Analyzes git diff for critical issues, pattern violations, test coverage, and generates a comprehensive report.
Use this skill when any artifact needs visual evidence of UI state. Invoke automatically when: creating a PR with UI changes (invoke before writing the PR body), updating docs/ with new screenshots, or preparing blog post visuals. Trigger phrases: "I need screenshots", "capture the UI", "show before/after", "add visuals to the PR".
Use this skill when writing user-facing documentation for a blog post, release notes, or feature announcement. Invoke automatically when: the user asks to "write a blog post", "write release notes", "document this feature for users", or "write a feature announcement". Produces structured ~500-word feature write-ups in plain language for non-technical readers (DevOps engineers, system administrators — not frontend developers).
Use this skill when creating or writing a pull request description. Invoke automatically when: the user says "create a PR", "open a pull request", "submit for review", "write the PR body", or "push this for review". If the PR includes UI changes, invoke the capture-screenshots skill before writing the description.
Use this skill when a Cypress test is failing and the cause is not immediately obvious. Invoke automatically when: a test throws "element not found", "expected to find element", "element is disabled", or any assertion failure. Also invoke before reaching for {force: true}, cy.wait(), or rewriting a test from scratch — investigate first.
Fetch and analyze SonarQube quality metrics for pull requests, reporting on code quality, bugs, vulnerabilities, coverage, and code smells
| name | technical-doc-review |
| description | Review technical documentation against the HiveMQ writing guidelines, producing a structured quality report with actionable findings per file |
| argument-hint | [path/to/file.md | path/to/directory] [--summary-only] |
| disable-model-invocation | false |
| user-invocable | true |
| allowed-tools | Glob, Grep, Read |
Reviews Markdown documentation against the HiveMQ Technical Documentation Writing Guidelines (v1.0). Produces a structured report of findings organized by severity and category.
Default target: docs/ — pass a specific file or directory to override.
The HiveMQ guidelines were written for user-facing product documentation. This project's docs/ directory contains internal developer documentation (architecture, guides, API patterns). Apply the rules at two tiers:
Tier 1 — Always apply (flag as issues):
should, could, would, may, might-ing verb forms as main sentence verb in prosehe/she, his/her, he , she )this/it/these as sentence-starting pronouns with unclear referente.g. — use "for example" insteadclick on or click at — use "click" only(s) forms: topic(s), adapter(s)a MQTT, an HiveMQ, a SQL)noun(s) style pluralsTier 2 — Advisory (flag but do not count as errors):
this/it in mid-paragraph referencesvs. vs. "versus" — use spelled-out form in prose, abbreviation only in short labelsOut of scope for internal developer docs:
docs/*.md files in the target pathFor each file, run in this order:
Check for:
--- YAML block? Does it include title, author, last_updated, purpose, audience, maintained_at? (INDEX.md files are exempt — they use --- as a horizontal rule by design)Run these grep patterns against the file. Exclude matches inside fenced code blocks — the patterns below target prose only. Since grep cannot exclude code blocks natively, note matches that appear to be inside code blocks and skip them in the report.
# Modal verbs (outside code)
\b(should|could|would|may|might)\b
# Future "will" in prose
\bwill\b
# Passive voice indicators (common constructions)
\b(is|are|was|were|be|been|being)\s+(done|used|managed|handled|created|defined|built|triggered|called|returned|passed|sent|stored|loaded|generated|provided|configured|driven|persisted)\b
# "please" in instructions
\bplease\b
# click on / click at
click (on|at)\b
# e.g.
\be\.g\b|\be\.g\.\b
# Gender pronouns
\b(he|she|his|her|him)\b
# Optional plurals
\w+\(s\)
# Noun clusters (4+ consecutive capitalized/title-case words - heuristic)
([A-Z][a-z]+\s){3,}[A-Z][a-z]+
# Non-descriptive link text
\[click here\]|\[here\]|\[this page\]|\[this\]|\[see here\]
# Incorrect article before MQTT, HTML, SQL, HTTP, API (a MQTT, a HTML, a SQL, a HTTP, a API)
\ba (MQTT|HTML|SQL|HTTP|API)\b
# Incorrect article before HiveMQ (an HiveMQ)
\ban HiveMQ\b
Grep for lines in prose sections (not code blocks, not table rows, not list items, not headings) that exceed 180 characters. These are candidates for sentences exceeding 25 words.
^.{181,}$
Flag potential bloat before reading the full file. Run these checks:
File size: Files over 800 lines almost always contain bloat. Flag for closer scrutiny.
Large code blocks: Count lines between each pair of fenced ``` delimiters. Any block with ≥ 20 lines is a candidate to replace with a source file link.
Code-to-prose ratio: Divide code lines (lines inside fenced blocks) by total lines. A ratio above 30% warrants scrutiny. Ratios above 50% are almost always bloated.
Threshold guide:
| Ratio | Verdict |
|---|---|
| < 20% | Normal |
| 20–30% | Watch — check block sizes |
| 30–50% | Elevated — review each block |
| > 50% | Bloated — cross-reference source files |
Exception: Reference documents intended as copy-paste sources (patterns catalogs, API references) legitimately have high code ratios. Evaluate intent before flagging.
Bloat remediation (apply before other fixes):
Scan the document for these known HiveMQ Edge terms and check for synonym drift:
| Canonical term | Watch for non-canonical variants |
|---|---|
protocol adapter | "adapter", "protocol plugin", "connector" |
MQTT broker | "broker" (acceptable), "message broker" (avoid) |
combiner | "data combiner", "combining node" |
northbound mapping | "northbound subscription", "tag mapping" |
topic filter | "topic selector", "topic matcher" |
behavior policy | "behaviour policy" (note British/American split) |
dry-run | "dry run", "dryrun" |
React Query | "react query", "TanStack Query" (use React Query in docs) |
Zustand | "zustand" (capitalize in prose) |
Output a structured Markdown report. Use this template:
# Documentation Review Report
**Target:** {path}
**Files reviewed:** {count}
**Date:** {date}
**Guidelines version:** HiveMQ Technical Documentation Writing Guidelines v1.0
---
## Summary
| Category | Critical | Advisory |
| ----------------------- | -------- | -------- |
| Passive voice | {n} | — |
| Modal verbs | {n} | — |
| Sentence length | — | {n} |
| Terminology | {n} | {n} |
| Structure / frontmatter | {n} | {n} |
| Bloat | {n} | {n} |
| Other style | {n} | {n} |
| **Total** | **{n}** | **{n}** |
### Top 3 Issues Across All Files
{List the three most common issues with example count}
---
## File-by-File Findings
### {filename}
**Structural:**
- {finding or "✅ Frontmatter complete"}
**Critical issues:**
- Line {n}: `{offending text}` — {rule violated, suggested fix}
**Advisory notes:**
- Line {n}: {observation}
---
--summary-only: Print only the Summary section, skip per-file details✅ {filename} — No issues foundOn passive voice: Developer documentation legitimately uses some passive constructions when the agent is unknown or unimportant ("the node is computed from upstream status"). Flag only cases where active voice would be clearly more readable.
On modal verbs: should and could in technical constraints ("queries should use the provided query key") are functionally advisory-but-required and are worth flagging. could in exploratory language is fine. Use judgment.
On sentence length: Long sentences in tables or list items are acceptable. Only flag prose paragraphs.
On frontmatter: INDEX.md files in each directory are structural navigation — they do not require YAML frontmatter. Do not flag them.
On terminology consistency: Flag when a document uses two different terms for the same concept within the same file. Do not flag when different documents use slightly different terms — cross-document consistency is a separate concern.
Derived from HiveMQ Technical Documentation Writing Guidelines v1.0.
| Rule | Requirement |
|---|---|
| Voice | Active voice. "The broker disconnects the client." not "The client is disconnected." |
| Tense | Simple present, imperative, infinitive. No future tense narration. |
| Modal verbs | Avoid: should, could, would, may, might, will |
-ing forms | Avoid as main verb. "To navigate" not "by navigating". |
| Sentence length | 25 words max for descriptions. 20 words for procedures. |
| Pronouns | No gender-specific. Minimize "this", "it", "these" as subject. |
| Articles | Based on pronunciation: "an MQTT", "a HiveMQ", "an SQL database". |
| Lists | Parallel construction. Capitalize first word. Period if full sentences. |
| Acronyms | Define on first use. MQTT is exempt. |
| Terminology | One term per concept. Consistent throughout. |
| Commas | Serial comma. Comma after introductory phrase. |
| Courtesy | No "please" in instructions. |
| Click | Transitive: "Click Save." Not "Click on Save." |
| Link text | Descriptive. Not "click here", "this page". |
| Noun clusters | Maximum 3 consecutive nouns. |
| Hyphens | Compound adjectives before noun: "drop-down list", "read-only memory". |