sonarqube-mcp: Agent for Claude Code

.opencode/agents/refactor-agent.md

refactor-agent is an agent for Claude Code, OpenCode from metalralf/sonarqube-mcp. It costs 19 tokens per session (223 once invoked), scanned A, original, no licence file.

An agent for moving code from handlers.mjs into helpers.mjs. The goal is to reduce cognitive complexity, meaning how difficult code is to understand and follow.

In plain words
What is it for?
Use it to refactor handlers.mjs while preserving helper code in helpers.mjs and addressing high cognitive complexity.
Why use it?
It helps make a large or complicated handler file easier to read and maintain by extracting reusable code into a helper file.

Agent for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code subagent (agents/*.md).

This is metalralf/sonarqube-mcp's own configuration. It tells Claude Code and OpenCode how to work on sonarqube-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sonarqube-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to metalralf/sonarqube-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/metalralf/sonarqube-mcp/main/.opencode/agents/refactor-agent.md
Clone the repo
git clone --depth 1 https://github.com/metalralf/sonarqube-mcp

Made for: Claude Code, OpenCode.

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 refactor-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/metalralf/sonarqube-mcp/refactor-agent/github.svg)](https://agentmods.dev/agents/metalralf/sonarqube-mcp/refactor-agent)
Your own site
<a href="https://agentmods.dev/agents/metalralf/sonarqube-mcp/refactor-agent"><img src="https://agentmods.dev/badge/agents/metalralf/sonarqube-mcp/refactor-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for refactor-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/metalralf/sonarqube-mcp/refactor-agent"><img src="https://agentmods.dev/badge/agents/metalralf/sonarqube-mcp/refactor-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 223 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00019 $0.00223
Opus 5.5 $0.00008 $0.00089
Sonnet 5.5 $0.00004 $0.00045
Haiku 4.5 $0.00002 $0.00022

Measured 2mo ago against content hash 5ed679e19bde, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refactor-agent 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 2mo 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.

.opencode/agents/refactor-agent.md · 27 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. 2mo ago First seen · 27 lines · 19 tokens per session scan A 5ed679e19bde

Subscribe to this mod's changes

refactor-agent is an agent published in the GitHub repository metalralf/sonarqube-mcp (4 stars, last pushed 3mo ago), with no licence file. It adds 19 tokens to every session and 223 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

Other agents, from other repositories

agent-reviewer

Use this agent when reviewing agent code for quality and best practices. Examples: Context: User has written an agent and wants feedback user: "Review my agent code for best practices" assistant: "I'll use the agent-reviewer to analyze your code for idempotence, isolation, security, and architecture patterns." User…

comet-ml/opik-claude-code-plugin · 225 tokens

unused-code-reviewer

Reviews the whole repository for unused and dead artifacts: unreferenced code and exports, unreachable branches, orphaned files, dead tests and fixtures, unused CI jobs and workflow inputs, unreferenced infrastructure and container config, obsolete migrations, flags, dependencies, docs, and assets. Spawn when user…

RashadAnsari/myagents · 96 tokens

code-reviewer

Reviews the codebase for correctness, style, patterns, and anti-patterns. Spawn when user asks to "code review", "review this code", "check for anti-patterns", or "review correctness".

RashadAnsari/myagents · 46 tokens

database-reviewer

Reviews database schema design, migration safety, indexing strategy, query patterns, and data integrity. Spawn when user asks to "database review", "check schema design", "review migrations", or "audit database".

RashadAnsari/myagents · 45 tokens

commit-pusher

Commits and pushes changes. Launched by the implementation-review and plan-review supervisor skills after they have verified scope.

MarcusJellinghaus/mcp-tools-py · 27 tokens

satd-analyst

Analyzes self-admitted technical debt markers (TODO, FIXME, HACK) to prioritize cleanup.

panbanda/omen · 26 tokens