# sonar-quality-gate

> Claude/Codex skill by [@sonarsource](https://omgskills.com/library/sonarsource/index.md) · 113 stars · Updated 2026-10-22

Show SonarQube quality gate status for a project — pass/fail and each condition (metric key, threshold, actual value), plus worst-offender breakdowns. Project key optional — resolved from \`sonar-project.properties\` or the MCP integration default.

Tags: agent, ai, sonarqube

## Install

```sh
git clone https://github.com/SonarSource/sonarqube-agent-plugins /tmp/sonarqube-agent-plugins && ln -s /tmp/sonarqube-agent-plugins/skills/sonar-quality-gate ~/.claude/skills/sonar-quality-gate
```

## From README

SonarQube — Quality gate Report only the quality gate evaluation for a SonarQube project: overall status, every condition returned by the API, and worst-offender breakdowns for failing conditions. Do not pull a broad measures dashboard here — for numeric metrics beyond the gate (coverage %, issue counts, ratings as measures, and so on), use mcpsonarqubegetcomponentmeasures afterward with the metricKeys you care about. Prerequisites This skill uses the sonarqube-cli command sonar quality-gate status (alias sonar qg status) as the primary path — don't invent other ones (e.g. sonar mcp call does not exist). Prefer it over the MCP tool: the CLI returns worst-offender breakdowns per failing condition in the same call — see Step 5 — while the MCP tool needs separate follow-up calls (measures, issues) for that detail. Before proceeding, verify sonar is available on your PATH and authenticated.

## Links

- HTML page: https://omgskills.com/library/sonarsource/sonarqube-agent-plugins/skills/sonar-quality-gate/
- GitHub: https://github.com/SonarSource/sonarqube-agent-plugins
- Author: [@sonarsource](https://omgskills.com/library/sonarsource/index.md)

## More from this repo

- [sonar-analyze](https://omgskills.com/library/sonarsource/sonarqube-agent-plugins/skills/sonar-analyze/index.md) — Used to analyze a file for quality and security issues using SonarQube
   - [@sonarsource](https://omgskills.com/library/sonarsource/index.md) · 113 stars
- [sonar-coverage](https://omgskills.com/library/sonarsource/sonarqube-agent-plugins/skills/sonar-coverage/index.md) — Used to find files with low test coverage and inspect uncovered lines in a SonarQube project (project key optional when...
   - [@sonarsource](https://omgskills.com/library/sonarsource/index.md) · 113 stars
- [sonar-dependency-risks](https://omgskills.com/library/sonarsource/sonarqube-agent-plugins/skills/sonar-dependency-risks/index.md) — Used to search for software composition analysis (SCA) dependency risks in a SonarQube project (project key optional...
   - [@sonarsource](https://omgskills.com/library/sonarsource/index.md) · 113 stars
