sonar-duplication

sonar-duplication is a skill for Claude Code, Codex from SonarSource/sonarqube-agent-plugins. It costs 39 tokens per session (2,286 once invoked), scanned A, original, no licence file.

A SonarQube duplication checker for finding repeated code. It can also show the exact repeated sections, called duplication blocks, in a file.

In plain words
What is it for?
Use it to find files with duplicated code and inspect the repeated sections in a SonarQube project.
Why use it?
Repeated code can make changes harder because the same fix may be needed in several places.

Skill for Claude CodeCodex

Part of the sonarqube plugin — 9 skills, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sonarsource/sonarqube-agent-plugins/sonar-duplication
Any agent
npx skills add SonarSource/sonarqube-agent-plugins --skill sonar-duplication
Clone the repo
git clone --depth 1 https://github.com/SonarSource/sonarqube-agent-plugins

Made for: Claude Code, Codex.

Or install sonarqube, the plugin that ships this one along with the rest of its 9 skills, 1 agent.

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 sonar-duplication

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonarsource/sonarqube-agent-plugins/sonar-duplication.svg)](https://agentmods.dev/skills/sonarsource/sonarqube-agent-plugins/sonar-duplication)
Your own site
<a href="https://agentmods.dev/skills/sonarsource/sonarqube-agent-plugins/sonar-duplication"><img src="https://agentmods.dev/badge/skills/sonarsource/sonarqube-agent-plugins/sonar-duplication.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,286 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00039 $0.02286
Opus 5 $0.00019 $0.01143
Sonnet 5 $0.00008 $0.00457
Haiku 4.5 $0.00004 $0.00229

Measured 4d ago against content hash a73546e05609, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sonar-duplication scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sonar-duplication/SKILL.md · 165 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. 4d ago First seen · 165 lines · 39 tokens per session scan A a73546e05609

Subscribe to this mod's changes

sonar-duplication is a skill published in the GitHub repository SonarSource/sonarqube-agent-plugins (102 stars, last pushed 21d ago), with no licence file. It adds 39 tokens to every session and 2,286 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

bootstrap

Generate a personalized SOUL.md through a warm, adaptive onboarding conversation. Trigger when the user wants to create, set up, or initialize their AI partner's identity — e.g., "create my SOUL.md", "bootstrap my agent", "set up my AI partner", "define who you are", "let's do onboarding", "personalize this AI", "make…

bytedance/deer-flow · 114 tokens

devloop

Goal-driven development loop — define objective, write rules with key-results, verify visually, sync to issue tracker.

x-cmd/x-cmd · 25 tokens

golang-structs-interfaces

Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or…

samber/cc-skills-golang · 116 tokens

golang-swagger

Golang OpenAPI/Swagger documentation with swaggo/swag — annotation comments (@Summary, @Param, @Success, @Router, @Security), swag init code generation, framework integrations (gin, echo, fiber, chi, net/http), security definitions (Bearer/JWT, OAuth2, API key), and struct tags (swaggertype, enums, example…

samber/cc-skills-golang · 146 tokens

skill0

Root index of x-cmd skill0 sub-skills. Defines the OKR-style agent workflow (goal → rule-verified results → execute), skill discovery, and agent tooling preferences. Style: principle-first, concise, delegate specifics to authoritative external sources.

x-cmd/x-cmd · 54 tokens

golang-gopls

Golang semantic code intelligence via gopls, the official Go language server — go-to-definition, find references, call/implementation hierarchy, workspace symbol search, package API discovery, diagnostics, safe rename, refactors (extract/inline/fill/rewrite code actions), formatting, and generated tests. Reaches an…

samber/cc-skills-golang · 221 tokens