Skip to content

Skills Β· dev-team

sonar-review

Run a Sonar scan against the just-changed code on the current branch and produce a structured compliance report β€” quality-gate verdict (PASS / FAIL), then severity-tagged findings (πŸŸ₯ blocker / 🟧 critical / 🟨 major / βšͺ minor / βšͺ info) scoped to changed files, each with file:line, the Sonar rule ID, the category (bug / vulnerability / security hotspot / code smell), why it matters, and a concrete fix. Works against both SonarQube server (self-hosted) and SonarCloud (SaaS) β€” mode is detected from sonar-project.properties. Sister skill to devils-advocate, but enforces Sonar's rule catalog and the project's quality gate rather than a hand-rolled lens sweep. Use after writing code, before pushing or opening a PR, when the user says "is this Sonar-compliant?", "run Sonar on this", "will the quality gate pass?", or any pre-merge compliance check.

Pack dev-teamTier standardJob Build and review softwarev0.1.0

npx skilldrop-cli install sonar-review
Other ways to install

With the sibling skills it hands off to:

npx skilldrop-cli install sonar-review --with-related

The whole pack it belongs to:

npx skilldrop-cli install --pack dev-team

By hand, from a clone of the repo:

cp -R packs/dev-team/skills/sonar-review ~/.claude/skills/

In Claude Code, with the dev-team plugin installed, invoke it as:

/dev-team:sonar-review

Try it

A realistic prompt from the skill's acceptance evals:

Run a Sonar review on my current branch before I open the PR.

What a good result looks like

How it's checked

Measured against plain Claude Code (2026-10-23): it met 52% of its checks, against 52% without it, and a blind judge preferred it. How skills are checked

18 assertions across 3 acceptance evals, and 8 trigger queries. Every skill's checks

What the output must do
  • The verdict is taken from the quality gate itself, not from the reviewer's own judgment β€” PASS is reported as PASS even if other issues are visible
  • Findings are scoped to files changed on the branch; pre-existing repo debt is not dumped into the report
  • Findings are severity-tagged and each carries file:line, the Sonar rule ID, why it matters, and a concrete fix
  • Findings are grouped into the lenses (bugs, vulnerabilities, security hotspots, code smells, coverage/duplication)
  • Server vs cloud is auto-detected from sonar-project.properties rather than assumed
  • Reports that the gate fails, taking the verdict from the status in quality-gate.json, and names at least the new-code coverage condition (61.3% against 80%) and the unreviewed security hotspot condition
  • Explains that the local 85% figure does not change the result: the gate measured 61.3% coverage on new code
  • Keeps the findings to the changed files: the blocker SQL-injection issue in legacy/ledger_import.py and the issue in intake/weighbridge.py are not presented as findings for this branch (they may be noted separately as pre-existing)
  • Does not list the issue resolved as a false positive (python:S1192 in intake/payments.py) as an open finding
  • Notes that the scan analysed revision 7f3c2e1 while the branch head is 9a41d07, whose commit message suggests the float-comparison bug was fixed after the scan, so the results may be out of date
  • Does not invent issues, rule IDs, line numbers or metric values that are not in the supplied files, and does not claim to have run a new scan
  • Stays under 300 words
  • Gives a clear recommendation for Friday: this change should not go out until the gate passes, unless someone decides on purpose to accept the risk
  • Explains in plain words that the failures are about too little testing of the new code and too much copied code, and that no new bugs or security problems were reported
  • Does not describe the result as a security or data-loss problem
  • Does not invent files, rule IDs, specific issues or figures beyond the text on the screen, and does not claim to have run a scan
  • Uses at most three sentences
  • Answers without first asking for access, a token or more information
When it should and shouldn't activate

Should activate:

  • Run a Sonar review on this branch
  • What does the quality gate say about my changes?
  • Give me the Sonar findings for the files I changed
  • Check Sonar compliance before I open the PR

Should leave to another skill:

  • Set up Sonar in this repository
  • Review this code adversarially for edge cases the first pass missed
  • Run the full pre-merge gate and reviewer panel
  • Write the postmortem for last night's incident

Related skills

devils-advocate, sonar-onboard

Source

SKILL.md Β· the whole folder on GitHub.