ClaudeSuperPower

sonar-integrate

Skill

Installs sonarqube-cli if not already installed, authenticates, and integrates SonarQube with the current agent (installs analysis hooks & SonarQube MCP Server). Use when the user wants to set up SonarQube integration or asks to configure SonarQube.

Install

git clone https://github.com/SonarSource/sonarqube-agent-plugins.git ~/.claude/skills/sonar-integrate

What is sonar-integrate?

Installs sonarqube-cli if not already installed, authenticates, and integrates SonarQube with the current agent (installs analysis hooks & SonarQube MCP Server). Use when the user wants to set up SonarQube integration or asks to configure SonarQube.

What this can do

Capabilities declared in this component's own frontmatter — not inferred.

Run shell commands

Declares Bash

~62 tokens of context used while enabled, before you invoke anything

All declared tools (1)
Bash

Documentation

README · ~9 min read

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.

Reviews

Log in to leave a review.

No reviews yet — be the first.

Explore related

Other things in this space — across every part of the ecosystem, not just skills.