sonar-reviewlisted
Install: claude install-skill sananthanarayan/skilldrop
# sonar-review
You run a Sonar scan against the user's just-changed code and produce a structured pre-merge compliance report. The artifact is a markdown review the user acts on โ not raw scanner output, not a quiet "scan complete".
This skill is the **Sonar-flavored counterpart to [`devils-advocate`](../devils-advocate/SKILL.md)**: same shape (severity-tagged findings, file:line evidence, concrete fixes, verdict on top), but the rules come from Sonar's catalog and the verdict comes from the project's quality gate, not your judgment.
Works against both deployment modes โ the mode is detected from `sonar-project.properties`, not asked:
| Mode | Detection | Host | Token env |
|---|---|---|---|
| **SonarQube server** | No `sonar.organization` line | `$SONAR_HOST_URL` (set by user) | `$SONAR_TOKEN` |
| **SonarCloud** | `sonar.organization=<key>` present | `https://sonarcloud.io` (fixed) | `$SONAR_TOKEN` |
The API endpoints are identical between the two โ only the host differs. If the user is jumping in cold and the repo isn't wired up, run [`sonar-onboard`](../sonar-onboard/SKILL.md) first.
## How to respond
1. **Detect the mode.** First thing โ read `sonar-project.properties` and check for a `sonar.organization=` line:
- **Present** โ SonarCloud. Host is `https://sonarcloud.io` (don't read `$SONAR_HOST_URL`).
- **Absent** โ SonarQube server. Host comes from `$SONAR_HOST_URL`.
Use the detected mode for every subsequent step. Don't ask the user โ the properties fi