Download for MacApple silicon, macOS 14+
Skill

sonar-duplication

@sonarsource Updated 2026-10-22

Find 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)

agentaisonarqube

Install

With your agent

Install OMGSkills skill "sonarsource/sonarqube-agent-plugins:skills/sonar-duplication" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), 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-duplication ~/.claude/skills/sonar-duplication

From README

SonarQube — Duplication List files that contain duplicated code in a SonarQube project, then drill into duplication blocks for a specific file when needed. Prerequisites This skill requires the SonarQube MCP Server to be configured and the tools mcpsonarqubesearchduplicatedfiles and mcpsonarqubegetduplications to be available in your session. Before proceeding, verify the tools are accessible. If they are not, try the sonar api CLI fallback in Step 3 before giving up — don't invent other CLI commands (e.g. sonar mcp call or sonar duplication do not exist). If the CLI fallback also fails (for example sonar not installed/authenticated, or no project key can be resolved), narrow down the cause — check whether the sonarqube MCP server is enabled in this agent's configuration. Not enabled / not registered → recommend running the sonar-integrate skill. Enabled but its tools are still unavailable → configuration is correct but the server failed to start.