sonarqube

sonarqube is a skill for Claude Code from FlorianBruniaux/claude-code-plugins. It costs 14 tokens per session (2,544 once invoked), scanned A, original, MIT.

A report generator for SonarCloud, a service that checks code for quality and maintainability problems, on a specific pull request.

In plain words
What is it for?
It groups SonarCloud issues by severity, type, file, and rule, then produces a report with an action plan.
Why use it?
It collects the pull request's reported issues in one place without changing the code, making review and follow-up easier.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node /tmp/sonar_analyze.js $PR_NUMBER > /tmp/sonar_analysis_$PR_NUMBER.json.

Part of the code-quality plugin — 14 skills, 6 agents shipped together

Good fit It groups SonarCloud issues by severity, type, file, and rule, then produces a report with an action plan.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-plugins
agentmods
npx agentmods add skills/florianbruniaux/claude-code-plugins/sonarqube

Made for: Claude Code.

Or install code-quality, the plugin that ships this one along with the rest of its 14 skills, 6 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sonarqube

README.md
[![agentmods](https://agentmods.dev/badge/skills/florianbruniaux/claude-code-plugins/sonarqube/github.svg)](https://agentmods.dev/skills/florianbruniaux/claude-code-plugins/sonarqube)
Your own site
<a href="https://agentmods.dev/skills/florianbruniaux/claude-code-plugins/sonarqube"><img src="https://agentmods.dev/badge/skills/florianbruniaux/claude-code-plugins/sonarqube/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sonarqube

Your own site · 80×15
<a href="https://agentmods.dev/skills/florianbruniaux/claude-code-plugins/sonarqube"><img src="https://agentmods.dev/badge/skills/florianbruniaux/claude-code-plugins/sonarqube.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,544 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.02544
Opus 5.5 $0.00006 $0.01018
Sonnet 5.5 $0.00003 $0.00509
Haiku 4.5 $0.00001 $0.00254

Measured 8d ago against content hash 5d4e444166f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sonarqube scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**Important:** Direct curl with `-u "$SONARQUBE_TOKEN:"` fails in zsh due to authentication parsing. Use bash script wrapper:
plugins/code-quality/skills/sonarqube/SKILL.md · 377 lines

How it starts

The opening of the file, as written. The whole thing — 377 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SonarQube analysis

Analyze SonarCloud quality issues for a specific PR. Generates comprehensive report with metrics, top violators, and action plan.

Core principle: Analysis-only = no code changes, pure insight.

Process

  1. Verify Token: Check $SONARQUBE_TOKEN environment variable
  2. Fetch Issues: Call SonarCloud API for PR issues
  3. Parse Data: Group by severity, type, file, rule
  4. Generate Report: Structured output with action plan
  5. Cleanup: Remove temporary files

Prerequisites

Environment variable

# Set SonarQube token (add to ~/.bashrc or ~/.zshrc)
export SONARQUBE_TOKEN="your_token_here"

# Verify token is set
echo $SONARQUBE_TOKEN

To get token:

  1. Go to SonarCloud → My Account → Security
  2. Generate new token
  3. Copy and export as environment variable

Project configuration

Configure your SonarCloud project details:

# Add to project's CLAUDE.md or as environment variables
SONAR_ORGANIZATION="your-org-name"
SONAR_PROJECT_KEY="your-org_your-project"
SONAR_BASE_URL="https://sonarcloud.io/api"

If not set: Ask user to provide organization and project key.

Fetch issues

Important: Direct curl with -u "$SONARQUBE_TOKEN:" fails in zsh due to authentication parsing. Use bash script wrapper:

# Create temporary bash script to handle authentication
cat > /tmp/fetch_sonar.sh << 'SCRIPT'
#!/bin/bash
curl -s -u "${SONARQUBE_TOKEN}:" \
  "https://sonarcloud.io/api/issues/search?componentKeys=${SONAR_PROJECT_KEY}&pullRequest=$1&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true&ps=500"
SCRIPT

chmod +x /tmp/fetch_sonar.sh
/tmp/fetch_sonar.sh $PR_NUMBER > /tmp/sonar_pr_$PR_NUMBER.json

API Parameters:

  • componentKeys: Your project key
  • pullRequest: PR number
  • issueStatuses: OPEN,CONFIRMED (exclude resolved)
  • sinceLeakPeriod: Only new issues in this PR
  • ps: Page size (max 500)

Analysis script

Create Node.js analysis script at /tmp/sonar_analyze.js:

Read the full file on GitHub · 377 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 377 lines · 14 tokens per session scan A 5d4e444166f8

Subscribe to this mod's changes

sonarqube is a skill published in the GitHub repository FlorianBruniaux/claude-code-plugins (44 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 2,544 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-29.

Related

sonarqube compared with skills from other repositories

sonarqube next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sonarqubeFlorianBruniaux/claude-code-pluginsSkill44yesterdayMITA14Claude Code
pr-triageaeonfun/aeonSkill788yesterdayMITA26Claude Code, Codex
feedback-builderaeonfun/aeonSkill788yesterdayMITA45Claude Code, Codex
[REPLACE: SKILL_NAME]aeonfun/aeonSkill788yesterdayMITA0Claude Code, Codex
review-loopsangrokjung/claude-forgeSkill8732mo agoMITA100Claude Code
generic-code-reviewertravisjneuman/.claudeSkill107yesterdayMITA70Claude Code, Codex
go-observability-reviewjohnqtcg/awesome-skillsSkill3028d agoMITA80Claude Code