sonar-integrate

Installation
SKILL.md

Integrate SonarQube

Guide the user through installing sonarqube-cli (if needed), updating it to the latest version when already installed, authenticating, and completing agent-specific integration. Assume SonarQube itself is already set up; this skill only wires the assistant.

Instructions

Interaction rule: for every finite decision, always present predefined selector options (single-choice or multi-choice as appropriate) instead of asking for free-form text. If the user gives an invalid answer, re-show the same selector.

Step 1 — Check for sonarqube-cli and update it

Check if sonar is available on the PATH by running which sonar (macOS/Linux) or Get-Command sonar (Windows) yourself.

If found: first determine how it was installed, because the upgrade path differs:

  • Managed by a package or version manager (e.g. installed via Homebrew or mise — the binary lives under the manager's prefix rather than ~/.local/share/sonarqube-cli/bin): do not run sonar self-update, as it conflicts with the manager. Run the manager's upgrade command yourself instead (Homebrew: brew upgrade --cask sonarqube-cli; mise: mise upgrade aqua:SonarSource/sonarqube-cli), then go to Step 2. If the upgrade fails, show the output but still continue to Step 2 as long as sonar remains usable.
  • Installed via the shell/PowerShell script, or unsure: run sonar self-update yourself and wait for it to finish.
    • If it succeeds: briefly tell the user the CLI is up to date (or was upgraded), then go to Step 2.
    • If it fails: show the relevant output, suggest they run sonar self-update manually (e.g. offline or network issues), then still continue to Step 2 if sonar remains usable — do not block the rest of the flow unless the binary is missing or broken.
Installs
21
GitHub Stars
102
First Seen
Apr 26, 2026
sonar-integrate — sonarsource/sonarqube-agent-plugins