sonar-fix-issue
Fix a specific SonarQube issue in code by rule key and location
Install
With your agent
Install OMGSkills skill "sonarsource/sonarqube-agent-plugins:skills/sonar-fix-issue" into this agent's normal skills directory: use the OMGSkills MCP get_skill tool, install only the pinned_install commit and path, verify SKILL.md against pinned_install.skill_md_sha, and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.
Manual command
git clone https://github.com/SonarSource/sonarqube-agent-plugins /tmp/sonarqube-agent-plugins && ln -s /tmp/sonarqube-agent-plugins/skills/sonar-fix-issue ~/.claude/skills/sonar-fix-issue
From README
SonarQube — Fix Issue Fix a code quality or security issue identified by SonarQube. Instructions Step 1: Identify the issue Parse the user-provided arguments for: A rule key (e.g. java:S1481, python:S2077) A file path and optional line number (e.g. src/auth/login.py:34) Or a plain-language description if no rule key is given If neither a rule key nor a file path can be determined, ask: "Which rule and file should I fix?" Step 2: Look up the rule (if a key was given) Call mcpsonarqubeshowrule 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= ". If sonar is also unavailable or unauthenticated, rely on built-in knowledge of SonarQube rules. Step 3: Read the file Read the full file content.
More from this repo
sonar-analyze
Used to analyze a file for quality and security issues using SonarQube
sonar-coverage
Used to find files with low test coverage and inspect uncovered lines in a SonarQube project (project key optional when...
sonar-dependency-risks
Used to search for software composition analysis (SCA) dependency risks in a SonarQube project (project key optional...
