plugins/lisa/skills/lisa-sonarcloud-access/SKILL.md
Vendor-neutral access layer for SonarQube Cloud/Server. Sonar triage skills MUST delegate through this skill rather than calling the SonarQube MCP tools directly. Single substrate: the official SonarQube MCP server (mcp__sonarqube__*), authenticated headlessly from SONARQUBE_CLI_TOKEN (+ SONARQUBE_CLI_ORG for Cloud, SONARQUBE_CLI_SERVER for Server).
npx skillsauth add codyswanngt/lisa lisa-sonarcloud-accessInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Single chokepoint for Sonar quality and security data. Caller skills MUST NOT
invoke mcp__sonarqube__* tools directly; they ask for data by operation name and
this skill owns the tool selection.
There is exactly one substrate: the official SonarQube MCP server, provided by
the sonarqube plugin and launched by the sonar CLI (sonar run mcp). It
authenticates headlessly from environment variables — no browser, no OS keychain —
so it is the same substrate on a developer machine and in a headless cloud routine:
SONARQUBE_CLI_TOKEN — required (Sonar user/analysis token).SONARQUBE_CLI_ORG — required for SonarQube Cloud.SONARQUBE_CLI_SERVER — required for a self-hosted SonarQube Server.These are the SonarQube CLI variable names (SONARQUBE_CLI_*), which the
sonar run mcp wrapper forwards into the MCP container — verified against a live
SonarQube Cloud org. Do not substitute the raw MCP-image names
(SONARQUBE_TOKEN/SONARQUBE_ORG/SONARQUBE_URL): those are read only when
running the Docker image directly, and the sonar CLI ignores them (auth exits
non-zero). The CI scan gate's SONAR_TOKEN is a third, separate name.
Wiring is performed once by /lisa:setup:sonar (which drives sonar integrate <agent>); this access layer assumes the MCP is already wired. This is distinct
from the CI SONAR_TOKEN secret that authenticates the SonarCloud scan job in
quality.yml — that gate is separate and unchanged.
Prove access with a cheap read-only MCP call before relying on it — the sonar CLI
being on PATH is not access. Probe by searching projects (the projects toolset is
always enabled):
mcp__sonarqube__* project-search tool returns, access is proven.mcp__sonarqube__* tool is present, or the call fails authentication, fail
loudly and do not improvise a substitute:Error: no SonarQube access. Run /lisa:setup:sonar (or `sonar integrate <agent>`), and set SONARQUBE_CLI_TOKEN (+ SONARQUBE_CLI_ORG for Cloud / SONARQUBE_CLI_SERVER for Server).
There is no hand-rolled REST fallback: the official MCP is headless-capable via the token env vars, so it is the only sanctioned substrate. A missing MCP is a tool-access-gate failure to surface, not a reason to curl the Web API.
Consumers pass a coarse, vendor-native operation; resolve it with the matching
mcp__sonarqube__* tool from the named toolset and return parsed JSON in a
<result> block.
| Operation | SonarQube MCP toolset |
|---|---|
| gate-status | quality-gates |
| issues | issues |
| hotspots | security-hotspots |
| rule-detail | rules |
| source-snippet | cag (context augmentation) / component source |
| coverage | coverage |
| duplication | duplications |
| dependency-risks | dependency-risks |
| projects | projects |
Pass the project key through the tool's projectKey argument (or rely on a
server-configured SONARQUBE_PROJECT_KEY); pass branch / pullRequest where the
tool accepts them.
SONARQUBE_CLI_TOKEN [+ SONARQUBE_CLI_ORG | SONARQUBE_CLI_SERVER]);
never the interactive sonar auth login keychain flow inside a factory.sonarcloud.io, sonarqube.us, or the
Server URL) in any custom remote-network allowlist.tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.
tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.
tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.
tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.