sonar

sonar is a skill for Claude Code from ffroliva/gflow-cli. It costs 45 tokens per session (1,255 once invoked), scanned A, original, MIT.

A command that checks whether a pull request passes the SonarCloud quality gate, which is an automated code-quality check. It reports whether new issues or coverage problems remain and identifies the pull request’s required fixes.

In plain words
What is it for?
Use it for a pull request or current branch to verify SonarCloud status, inspect new issues or security hotspots, and find coverage gaps that must be addressed.
Why use it?
It removes guesswork about whether server-side quality checks have passed. It also separates the quality gate result from local checks and human code review.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it for a pull request or current branch to verify SonarCloud status, inspect new issues or security hotspots, and find coverage gaps that must be addressed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ffroliva/gflow-cli/sonar
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.

Any agent
npx skills add ffroliva/gflow-cli --skill sonar
Clone the repo
git clone --depth 1 https://github.com/ffroliva/gflow-cli

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ffroliva/gflow-cli/sonar/github.svg)](https://agentmods.dev/skills/ffroliva/gflow-cli/sonar)
Your own site
<a href="https://agentmods.dev/skills/ffroliva/gflow-cli/sonar"><img src="https://agentmods.dev/badge/skills/ffroliva/gflow-cli/sonar/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 sonar

Your own site · 80×15
<a href="https://agentmods.dev/skills/ffroliva/gflow-cli/sonar"><img src="https://agentmods.dev/badge/skills/ffroliva/gflow-cli/sonar.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,255 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original 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.00045 $0.01255
Opus 5.5 $0.00018 $0.00502
Sonnet 5.5 $0.00009 $0.00251
Haiku 4.5 $0.00005 $0.00126

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

Security

Grade A, and why

sonar scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`curl` may be blocked by the context-mode hook → use `ctx_execute` (javascript
skills/sonar/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/gflow:sonar [PR#] — SonarCloud quality gate

The reusable Sonar primitive. /gflow:check is local and cannot see Sonar (it is server-side, post-push); /gflow:pr-council-review is an LLM diff review, not the gate verdict. This command answers one question: is the SonarCloud gate green (zero new issues) for this PR, and if not, exactly what must be fixed?

$ARGUMENTS is the PR number. If empty, resolve it from the current branch (gh pr view --json number -q .number).

Project: key ffroliva_gflow-cli, org ffroliva-github (see sonar-project.properties). The CI scan sets sonar.qualitygate.wait=true, so a green SonarCloud analysis check means the gate genuinely passed — but the gate API is stale until that check finishes, so always check the GitHub check FIRST.

Steps

1. Check the GitHub check first (never trust the gate API while it's pending).

gh pr checks <N> --json name,state,bucket | \
  jq -r '.[] | select(.name=="SonarCloud analysis") | "\(.bucket) \(.state)"'
  • pass → gate is GREEN / zero new issues. Done. Report GREEN and stop.
  • pending → the SonarCloud job (~50s) runs after the ~3.5min test matrix; wait (gh pr checks <N> --watch) before reading the API, or the API returns the previous commit's verdict.
  • fail → continue to step 2 to enumerate the exact failing conditions.

2. Enumerate the failing conditions (PR-scoped — this is the #1 gotcha).

New-code issues live on the PR branch, NOT main. Scope every call with &pullRequest=<N> or the API reports 0 and you chase phantoms. Token is in .env.local as SONAR_TOKEN — read it inside a sandbox so it never lands in chat. curl may be blocked by the context-mode hook → use ctx_execute (javascript fetch with Authorization: Basic base64(token+":")).

# Which gate conditions are ERROR:
GET /api/qualitygates/project_status?projectKey=ffroliva_gflow-cli&pullRequest=<N>
# New issues (bugs/smells) with file:line + rule + creationDate:
GET /api/issues/search?componentKeys=ffroliva_gflow-cli&pullRequest=<N>&resolved=false
# Unreviewed security hotspots:
GET /api/hotspots/search?projectKey=ffroliva_gflow-cli&pullRequest=<N>&status=TO_REVIEW

Read the full file on GitHub · 92 lines

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. 1mo ago First seen · 92 lines · 45 tokens per session scan A 684c37a6da43

Subscribe to this mod's changes

sonar is a skill published in the GitHub repository ffroliva/gflow-cli (333 stars, last pushed yesterday), licensed MIT. It adds 45 tokens to every session and 1,255 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). 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

autofix-pr

Watch a pull request and fix it from a worktree of its own - CI failures, review feedback from trusted authors and merge conflicts are fixed, pushed to the PR branch and answered on the PR under the user's git and gh identity. Usage - /autofix-pr [ | ] [--once] [--every ] [--no-reply] [--yes] [instructions]…

QwenLM/qwen-code · 108 tokens

simplify

Review recent code changes for reuse, code quality, and efficiency, then directly apply straightforward cleanup improvements. Use when the user wants a post-implementation cleanup pass, pre-PR polish, or asks to simplify/refine recent changes. Invoke with /simplify or /simplify .

QwenLM/qwen-code · 63 tokens

triage

Gatekeep and review GitHub issues and pull requests for Qwen Code maintainers. Use for GitHub Action issue triage, PR admission checks, product-direction review, KISS-focused PR review, and staged bilingual GitHub comments.

QwenLM/qwen-code · 50 tokens

autofix

Review and repair current local changes until they converge, or run Qwen Code Autofix issue and review workflows from GitHub Actions.

QwenLM/qwen-code · 30 tokens

find-simplifications

Use for a periodic repo-wide sweep of qwen-code for accumulated excess surface — dead components and files, orphaned locale keys, exports nothing consumes, added-then-removed scaffolding — filing candidates on a tracking issue and landing only what a maintainer has said yes to. Repo-wide and evidence-first; every…

QwenLM/qwen-code · 103 tokens

code-clean

Cut dead code and over-long comments from termio's Swift, verifying every deletion against a build. Knows this repo's real failure mode (essay-length doc comments, not restated-code slop) and periphery's four known false-positive shapes. Invoke when the user says 'clean dead code', 'clean up the comments', 'the…

termio-sh/termio · 110 tokens