/sonarqube:fix [rule key | file paths...]from sonarqube
Use when the user asks to fix SonarQube or SonarLint issues, a specific Sonar rule key (like python:S5754 or githubactions:S8541), or "the Sonar findings" in some files, including issues SonarQube Server or Cloud reported. Gathers findings locally and from the server, explains each rule, and fixes the issues minimally.
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.
Arguments: $ARGUMENTS
sonarlint below means:
node "${CLAUDE_PLUGIN_ROOT}/cli/sonarlint.js" --data-dir "${CLAUDE_PLUGIN_DATA}"
sonarlint files <paths...> --format json --min-severity INFO.<repo>:S<number>): analyze the files the user means,
or the files changed in the working tree (git status --porcelain), and
keep only that rule.If the files sit under a .sonarlint/connectedMode.json binding, also
run sonarlint server <same paths> --format json --min-severity INFO.
The server can report rules the local engine doesn't have, such as
githubactions:* on workflow files. A rule key that local analysis never
reports is usually one of these, so look for it on the server before
saying there's nothing to fix. Merge the two lists as the analyze skill
describes. A server finding in a file changed since the server's analysis
(projects[].changedSinceAnalysis) may already be fixed or have moved
lines, so check the code first.
Exit 2 means that source couldn't be read. For files, show stderr and
follow the setup skill. For server, say the server wasn't checked
(see sonarqube-web-api for login). Don't guess at findings.
sonarlint rules --key <rule>
If the local engine doesn't know the rule (common for server-only
findings), read it from the server instead:
sonar api get "/api/rules/show?key=<rule>&organization=<org>" (see
sonarqube-web-api).
Read why the rule exists. The fix should remove the reason the rule fired, not just the pattern it matches.
// NOSONAR, # NOSONAR, or an exclusion unless the user
explicitly approves that specific suppression. If you believe a finding
is a false positive, say which one and why, and stop there.Re-run the same sonarlint files command. Stop after two
fix-and-recheck rounds; report anything still open, with its rule key and
the reason. The server shows a fix only after its next analysis, so for
server-only rules, say the fix can't be verified locally.
Per rule: what it meant, what you changed, and what is left and why.
What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/analyzeUse when the user asks to "run sonar", "run SonarQube", "run SonarLint", "scan for secrets", "check this for Sonar issues", or wants SonarQube analysis over code this session never touched. Runs SonarQube for IDE's engine locally, adds what SonarQube Server or Cloud recorded for the same files, and works through the findings./sonarlint-analysisUse after creating or editing source code (JS/TS, Python, Java, Go, PHP, HTML, CSS, XML, Terraform, Docker, Kubernetes, CloudFormation, or any file that could hold a credential) and before declaring a coding task done, or when asked to check code quality or security locally. Runs SonarQube for IDE's own analyzers on the working tree through the plugin's `sonarlint` CLI and explains how to read and act on the result./sonarqube-connected-modeUse when you need a SonarQube projectKey, are setting up or debugging .sonarlint/connectedMode.json, are calling `sonar api` against a bound project, need the Cloud organization, or are working out which project a file in a monorepo belongs to./sonarqube-issue-triageUse when acting on SonarQube findings — deciding what to fix first, whether something is a real defect or a false positive, how to handle a detected secret, what a quality gate failure means, or whether a NOSONAR suppression is ever justified./sonarqube-web-apiUse when you need data from a SonarQube Server or SonarQube Cloud instance — open issues or security hotspots on a project, a quality gate verdict, a rule's rationale, measures or coverage, branches and pull requests, duplications, or changing an issue's status. Covers calling the Web API through `sonar api`, and the Server vs Cloud differences.npx claudepluginhub leonardo-marziali/agentic-development-kit --plugin sonarqube