sonar

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 CodeCodex

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/ffroliva/gflow-cli/sonar
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, Codex.

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. Scan, not verified.
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 $0.00045 $0.01255
Opus 5 $0.00023 $0.00628
Sonnet 5 $0.00009 $0.00251
Haiku 4.5 $0.00005 $0.00126

Measured 2d ago against content hash 684c37a6da43, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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)"'
  • passgate 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. 2d 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 (136 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 1,255 once invoked, about $0.0002 per session on Opus 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

repomix

Pack and analyze codebases into AI-friendly single files using Repomix. Use when the user wants to explore repositories, analyze code structure, find patterns, check token counts, or prepare codebase context for AI analysis. Supports both local directories and remote GitHub repositories.

yamadashy/repomix · 58 tokens

agent-carnet

Use this skill when the user asks to save, recall, find, or organize notes. Triggers on: 'remember this', 'save this', 'note this', 'what did we discuss about...', 'check the notebook', 'find in carnet'. Also use proactively when discovering findings worth preserving across sessions.

yamadashy/repomix · 67 tokens

graph-mutation-plan

Cookbook for composing an applygraphmutations plan — stable entitykey patterns, the canonical label/edge vocabulary, evidence/invalidation/confidence discipline, and a worked example. Load this when building a non-trivial mutation plan.

potpie-ai/potpie · 51 tokens

muapi-media-editing

Edit and enhance images and videos with AI via muapi.ai — prompt-based editing, upscaling, background removal, face swap, lipsync, video effects, and more.

SamurAIGPT/Generative-Media-Skills · 41 tokens

plano-agent-orchestration

Improve multi-agent orchestration in Plano. Use for agent registration, agent listener wiring, and capability-focused agent descriptions for accurate routing.

katanemo/plano · 33 tokens

plano-filter-guardrails

Harden Plano filter chains and guardrails. Use for MCP filter setup, prompt guard responses, and safe filter ordering.

katanemo/plano · 31 tokens