sonar
Check the SonarCloud quality gate for a PR (or the current branch) and drive it to zero.
Skill by ffroliva
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ffroliva-sonar
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sonar
What's inside
- Skill name
sonar- Description
- Check the SonarCloud quality gate for a PR (or the current branch) and drive it to zero. Reports GREEN, or the exact PR-scoped new issues/hotspots/coverage gaps to fix.
- License
- MIT
- Instructions
- 86 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# `/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).** ```bash 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+":")`). ```bash # 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 ``` **3. Fix by condition — no gaming.** - **`new_coverage < 80%`** → add **real** unit tests for the uncovered new lines (usually a new orchestration/`_run_*`/helper). There is NO mark-safe shortcut and NEVER widen `sonar.coverage.exclusions` to dodge it. - **`new_code_smells` / `new_maintainability_rating` (e.g. S1192 duplicated literal, S3776 cognitive complexity)** → fix at source. For a duplicated literal your diff merely *touched*, collapse it to one module-scope alias so it falls under the threshold (pyright/tests prove it's safe). For S7497, re-raise swallowed `asyncio.CancelledError`. - **`new_security_hotspots_reviewed < 100%`** → only for a **genuine** false positive: `POST /api/hotspots/change_status` form body `hotspot=<key>&status=REVIEWED&resolution=SAFE&comment=<justification>` (204 = ok), then **re-run the SonarCloud job** so it reposts the GitHub status (`gh run rerun <run-id> --job <sonar-job-id>` — the coverage artifact is reused). Never mark a real hotspot SAFE. **4. Push fixes, then re-verify from step 1** (the check must read `pass`). ## Output - Verdict: **GREEN** (gate passed, zero new issues) or **RED** with the exact failing conditions and a fix list (`file:line · rule · what to do`). - After any fix: re-confirm via step 1 — green check = gate passed. ## Pipeline Continuation (Next Step Handoff) Upon completing SonarCloud Quality Gate: 1. **Gate 🟢 GREEN:** Proactively announce: **"SonarCloud quality gate passed (zero new issues). Next step: Phase 10 Release Pipeline (`/gflow:release`) or merge PR."** 2. **Gate 🔴 RED:** Fix identified code smells/coverage gaps, push, and re-run `/gflow:sonar <PR#>`. ## See also - `docs/GITHUB.md` § SonarCloud Quality Gate — full policy + coverage-exclusion rationale. - `/gflow:check` — the local pre-commit gates (coverage floor pre-empts `new_coverage`). - Memory: [[sonarcloud-pr-issues-scope-s7497]], [[sonarcloud-new-code-gotchas]], [[sonarcloud-hotspot-review-workflow]], [[sonarcloud-setup]].
From ffroliva/gflow-cli, MIT.
More from ffroliva/gflow-cli
- 0.799score
scenario
ffroliva
Pre-implementation edge-case and scenario explorer for gflow-cli.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
issue-assessment
ffroliva
Use when triaging a GitHub issue for gflow-cli — a reporter's bug claim, a freshly-filed issue, or deciding whether and how to act on one.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
llm-council
ffroliva
Use when a pr-council-review (PR or branch mode) result needs independent corroboration from a different model family before trusting a GREEN verdict —…
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
issue-resolve
ffroliva
Use when an assessed gflow-cli issue (verdict CONFIRMED-BUG or LIKELY-BUG) has localized, verifiable scope and should be driven to a fix.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
live-verify
ffroliva
Two-part gate for gflow-cli feature/fix work.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
plan
ffroliva
Creates a structured task-by-task implementation plan for a gflow-cli feature.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
predict
ffroliva
Pre-implementation multi-persona adversarial analysis for gflow-cli proposals.
SkillAFreshness: A★ 332Claude Code +9 - 0.792score
check
ffroliva
Auto-fix lint and formatting, then report types and tests.
SkillAFreshness: A★ 332Claude Code +9 - 0.791score
spike
ffroliva
Gather EVIDENCE from the live Flow surface — DOM, network, HAR — before claiming a feature is broken, missing, or impossible.
SkillAFreshness: A★ 332Claude Code +9 - 0.791score
status
ffroliva
Surfaces the current state of work in gflow-cli.
SkillAFreshness: A★ 332Claude Code +9 - 0.787score
release
ffroliva
Cut a new gflow-cli release — bump version, update CHANGELOG, tag, push, and back-merge.
SkillAFreshness: A★ 332Claude Code +9 - 0.786score
known-issues
ffroliva
Surface open known issues.
SkillAFreshness: A★ 332Claude Code +9
Signals
- Stars
- 332
- Forks
- 95
- Open issues
- 30
- Contributors
- 22
- Last commit (this folder)
- Aug 4, 2026 (2 months ago)
- Last release
- Oct 24, 2026 (4 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ffroliva/gflow-cli
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ffroliva
- 0.799score
plan
ffroliva
Creates a structured task-by-task implementation plan for a gflow-cli feature.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
live-verify
ffroliva
Two-part gate for gflow-cli feature/fix work.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
issue-assessment
ffroliva
Use when triaging a GitHub issue for gflow-cli — a reporter's bug claim, a freshly-filed issue, or deciding whether and how to act on one.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
issue-resolve
ffroliva
Use when an assessed gflow-cli issue (verdict CONFIRMED-BUG or LIKELY-BUG) has localized, verifiable scope and should be driven to a fix.
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
llm-council
ffroliva
Use when a pr-council-review (PR or branch mode) result needs independent corroboration from a different model family before trusting a GREEN verdict —…
SkillAFreshness: A★ 332Claude Code +9 - 0.799score
predict
ffroliva
Pre-implementation multi-persona adversarial analysis for gflow-cli proposals.
SkillAFreshness: A★ 332Claude Code +9
Cite this page
sonar skill. Agent Mart. https://agentmart.dev/skills/ffroliva-sonar (last updated 2026-10-24)