/sonarqube:sonar-fix-issue [rule-key] [file-path:line]from sonarqube
Fixes a specific SonarQube code quality or security issue by rule key and file location. Reads the rule description, applies minimal fix, and explains the change.
Ships in sonarqube. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Fix a code quality or security issue identified by SonarQube.
sonar-fix-issue java:S1481 src/main/java/MyClass.java:42
sonar-fix-issue python:S2077 src/auth/login.py
sonar-fix-issue Remove unused variable in MyClass.java
Parse the user-provided arguments for:
java:S1481, python:S2077)src/auth/login.py:34)If neither a rule key nor a file path can be determined, ask: "Which rule and file should I fix?"
Call mcp__sonarqube__show_rule with the rule key to retrieve the full rule description,
rationale, and remediation guidance before touching any code. Do not add extra parameters (such as projectKey) unless the tool schema requires them — after integration, rule lookup usually needs only the rule key.
If the MCP tool is unavailable, fall back to sonar api get "/api/rules/show?key=<rule-key>". If sonar is also unavailable or unauthenticated, rely on built-in knowledge of SonarQube rules.
Read the full file content. If a line number was given, focus analysis around that line but read the whole file to understand context.
After editing, briefly explain:
<file> to confirm no new issues were introduced."sonar.projectKey in sonar-project.properties) — the CLI always uses -p."What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sonarqube, code-quality, security, fix-issue, static-analysis
13 skills in this plugin
/sonar-analyzeAnalyze a file for quality and security issues using SonarQube/sonar-coverageFind files with low test coverage and inspect uncovered lines in a SonarQube project (project key optional when MCP integration already defines the default project)/sonar-dependency-risksSearch for software composition analysis (SCA) dependency risks in a SonarQube project (project key optional when MCP integration already defines the default project)/sonar-duplicationFind files with code duplications in a SonarQube project and inspect duplication blocks for a file (project key optional when MCP integration already defines the default project)/sonar-install-cliInstalls sonarqube-cli when it is missing, or updates it to the latest version through the route it was installed with (install script, Homebrew or mise). Use when the user asks to install or update the SonarQube CLI, when `sonar` is not found, when a `sonar` command is too old for what is needed, or when another skill needs the CLI./sonar-integrateSet up SonarQube for the current agent using CLI integration locally or hosted MCP in cloud environments. Use when the user wants to connect their agent to SonarQube or configure SonarQube integration.npx claudepluginhub sonarsource/sonarqube-agent-plugins --plugin sonarqubeOther plugins' skills for the same job