sonar-coverage
Skill by SonarSource
Finds files with low test coverage in a SonarQube project and lists the uncovered lines in each file. Useful for developers deciding where to write tests.
Install sonar-coverage
Built from the published package, never by AI.
git clone --depth 1 https://github.com/SonarSource/sonarqube-agent-plugins /tmp/sonarqube-agent-plugins && mkdir -p ~/.claude/skills && cp -r /tmp/sonarqube-agent-plugins/skills/sonar-coverage ~/.claude/skills/sonar-coverageRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/SonarSource/sonarqube-agent-plugins /tmp/sonarqube-agent-plugins && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sonarqube-agent-plugins/skills/sonar-coverage ~/.gemini/antigravity-cli/skills/sonar-coverageAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The sonar-coverage skill finds files with insufficient test coverage in a SonarQube project and pinpoints the exact lines that need tests. By default it lists the worst-covered files, sorted from lowest coverage upward. Optional flags limit results to files at or below a coverage percentage, analyse a pull request instead of the main branch, or show line-by-line detail for one file.
The skill uses the SonarQube MCP Server tools when they are available and falls back to the sonar api CLI when they are not. The project key is optional when the MCP integration already defines a default project. Line detail shows uncovered lines and partially covered branches. It is aimed at developers who want to find under-tested code before writing new tests.
Written from the project's SKILL.md and checked against it.
What it can do
- mcp__sonarqube__search_files_by_coverageLists files in a SonarQube project with their coverage, sorted worst first.
- mcp__sonarqube__get_file_coverage_detailsShows uncovered lines and partially covered branches for one file.
- --max flagReturns only files with coverage at or below a chosen percentage.
- --pr flagAnalyses a pull request instead of the main branch.
- --file flagSkips the file list and shows line-by-line detail for one file.
- sonar api fallbackRetrieves coverage data through the sonar CLI when the MCP tools are unavailable.
What you need
- SonarQube MCP Server configured for the agent
- Container runtime (Docker, Podman, or Nerdctl) running
- sonar CLI installed and authenticated for the fallback path
Try asking
- Show the worst-covered files in my SonarQube project
- List files with coverage at or below 50 percent
- Show uncovered lines in src/auth/login.py
Good to know
- Requires the SonarQube MCP Server or the sonar CLI fallback.
- The CLI fallback needs an explicit project key.
- The MCP server runs inside a container, so the runtime must be running.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/sonar-coverage/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadGrepBash(docker ps:*)Bash(podman ps:*)Bash(nerdctl ps:*)Bash(sonar:*)
Alternatives to sonar-coverage
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
sonar-coverage: common questions
Does sonar-coverage need a project key?
No, not when the MCP integration already defines a default project. Otherwise pass a key or set sonar.projectKey in sonar-project.properties.
What happens if the MCP tools are unavailable?
The skill falls back to the sonar api CLI. If that also fails, it points to the sonar-integrate skill and a running container runtime.
Can it check coverage on a pull request?
Yes. The --pr flag analyses a pull request instead of the main branch.
How do I install sonar-coverage?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sonar-coverage free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is sonar-coverage safe to use?
It scores 65 of 100. Grades: maintenance A, licence F, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sonar-coverage?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
