plugins/lisa-agy/skills/sonarcloud-access/SKILL.md
Vendor-neutral access layer for SonarCloud/SonarQube Cloud. Sonar triage skills MUST delegate through this skill rather than calling Sonar MCP tools or REST directly. Resolves Sonar MCP first when available, then falls back to SONAR_TOKEN + SonarCloud Web API.
npx skillsauth add codyswanngt/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 SonarCloud operations. Caller skills MUST NOT call
mcp__sonarqube__* tools directly or curl https://sonarcloud.io/api/
themselves.
operation: gate-status project_key:<KEY> [branch:<BRANCH>] [pull_request:<N>]
operation: issues project_key:<KEY> [branch:<BRANCH>] [pull_request:<N>] [types:<csv>] [severities:<csv>]
operation: hotspots project_key:<KEY> [branch:<BRANCH>] [pull_request:<N>]
operation: rule-detail key:<RULE_KEY>
operation: source-snippet component:<COMPONENT_KEY> from:<N> to:<N>
Return parsed JSON in a <result> block.
Probe in order:
SONAR_TOKEN against the SonarCloud Web API.SonarCloud documents bearer-token authentication for the Web API. Use:
sonar_api() {
local path="$1"
[ -n "$SONAR_TOKEN" ] || {
echo "Error: SONAR_TOKEN is not set." >&2
return 1
}
curl -sS "https://sonarcloud.io/api${path}" \
-H "Authorization: Bearer $SONAR_TOKEN"
}
If a host still requires the legacy token-as-basic-auth form, make that an explicit adapter branch in this skill; consumers do not choose auth style.
If neither tier works, fail with:
Error: no SonarCloud access substrate available. Authenticate the Sonar MCP or set SONAR_TOKEN.
| Operation | REST path |
|---|---|
| gate-status | /qualitygates/project_status?projectKey=<KEY>[&branch=<BRANCH>][&pullRequest=<N>] |
| issues | /issues/search?componentKeys=<KEY>[&branch=<BRANCH>][&pullRequest=<N>]... |
| hotspots | /hotspots/search?projectKey=<KEY>[&branch=<BRANCH>][&pullRequest=<N>] |
| rule-detail | /rules/show?key=<RULE_KEY> |
| source-snippet | /sources/lines?key=<COMPONENT_KEY>&from=<N>&to=<N> |
SONAR_TOKEN.sonarcloud.io 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.