sonarcloud-triage
Skill38 starsChanged 8 days agoApache-2.0View on GitHub
Triage SonarCloud issues and hotspots via the SonarCloud Web API — check gate status, list open BLOCKER/CRITICAL bugs + vulns, group hotspots by rule, bulk-mark hotspots Safe per rule, transition issues to False Positive, and change the New Code period. Use whenever the user mentions SonarCloud, Sonar, quality gate red/failing, code smells to triage, marking hotspots safe, marking issues as false positive, setting new code period, or asks "why is the Sonar gate red" — even if they only reference a specific rule like go:S2245 without naming SonarCloud.
In this repository85 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- agent-inboxSkill
- ailang-core-triageSkill
- ailang-packagesSkill
- benchmark-managerSkill
- benchmark-runnerSkill
- builtin-developerSkill
- cli-doc-maintainerSkill
- cloud-cascade-debugSkill
- cloud-setupSkill
- codebase-organizerSkill
- collaboration-hubSkill
- coordinator-helperSkill
- design-doc-creatorSkill
- design-spec-auditorSkill
- docs-syncSkill
- eval-analyzerSkill
- eval-gap-finderSkill
- gemini-cli-helperSkill
- github-issue-triageSkill
- headless-runnerSkill
- local-model-onboardingSkill
- local-ollama-evalSkill
- mission-briefSkill
- mission-controlSkill
- mission-loop-changeSkill
- model-managerSkill
- motoko-analyzerSkill
- parser-developerSkill
- post-releaseSkill
- pr-monitorSkill
- prompt-managerSkill
- release-managerSkill
- sprint-evaluatorSkill
- sprint-executorSkill
- sprint-plannerSkill
- test-coverage-guardianSkill
- trace-debuggerSkill
- use-ailangSkill
- wasm-debuggerSkill
- agent-inboxSkill
- ailang-core-triageSkill
- ailang-packagesSkill
- benchmark-managerSkill
- benchmark-runnerSkill
- builtin-developerSkill
- cli-doc-maintainerSkill
- cloud-cascade-debugSkill
- cloud-setupSkill
- codebase-organizerSkill
- collaboration-hubSkill
- coordinator-helperSkill
- design-doc-creatorSkill
- design-spec-auditorSkill
- docs-syncSkill
- eval-analyzerSkill
- eval-gap-finderSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Read resources/known_fp_rules.md before step 3 — each entry has the rule key, verdict, and the exact comment to paste.
- Very specific: line 41
All scripts live in scripts/ and source _lib.sh for shared config.
- Very specific: line 77
Always loaded: this SKILL.md
- Very specific: line 81
Run on demand: scripts in scripts/
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SonarCloud Triage
Repeatable triage of SonarCloud findings for sunholo-data_ailang via the Web API.
Everything the web UI does for triage is available through the API, and most of it
is faster from the shell.
Prerequisites
SONAR_PAT— personal admin token, exported in~/.zshenv. Get one at https://sonarcloud.io/account/security. Read-only scripts (gate_status,fetch_*) don't need it; mutating scripts (mark_*,set_new_code) do.- Optional overrides:
SONAR_PROJECT(defaultsunholo-data_ailang),SONAR_ORG(defaultsunholo-data),SONAR_HOST(defaulthttps://sonarcloud.io).
Standard triage workflow
1. scripts/gate_status.sh → see which conditions fail and on what metric
2. scripts/fetch_hotspots.sh → group TO_REVIEW hotspots by rule + directory
3. For each rule listed in resources/known_fp_rules.md:
scripts/mark_safe.sh RULE_KEY "<comment from known_fp_rules.md>"
4. scripts/fetch_issues.sh → list remaining BLOCKER/CRITICAL bugs + vulns
5. For each issue that matches a known-FP row:
scripts/mark_fp.sh ISSUE_KEY "<comment from known_fp_rules.md>"
6. scripts/set_new_code.sh 30 → rolling 30-day New Code window (if not already)
7. scripts/gate_status.sh → confirm conditions movedRead resources/known_fp_rules.md before step 3 —
each entry has the rule key, verdict, and the exact comment to paste.
resources/triage_playbook.md has the "when you
see X in Y, do Z" reference.
Scripts
All scripts live in scripts/ and source _lib.sh for shared config.
| Script | Auth | What it does |
gate_status.sh | none | Summarize assigned gate, new-code period, condition pass/fail, top-level counts |
fetch_issues.sh [SEVERITIES] | none | List open BUG + VULNERABILITY at given severities (default BLOCKER,CRITICAL) |
fetch_hotspots.sh [STATUS] | none | Group hotspots by category/rule/directory (default TO_REVIEW) |
mark_safe.sh RULE_KEY "comment" | $SONAR_PAT | Bulk mark all TO_REVIEW hotspots with that rule as REVIEWED+SAFE |
mark_fp.sh ISSUE_KEY "comment" | $SONAR_PAT | Transition one issue to False Positive with audit-trail comment |
set_new_code.sh VALUE | $SONAR_PAT | Set sonar.leak.period (number-of-days / date:YYYY-MM-DD / previous_version / version tag) |
When to use this skill
Invoke whenever the user:
- Asks about the SonarCloud quality gate status or why it's failing
- Wants to triage, clean up, or mark safe/false positive SonarCloud findings
- Mentions a specific rule key (e.g.
go:S2245,javascript:S5852) in context of Sonar - Wants to change the New Code period (rolling days, since-date, previous version)
- Asks for a summary of open bugs/vulns/hotspots without opening the web UI
- Says something like "our Sonar is noisy" or "make the gate useful"
Guardrails
- Do not bulk-mark a rule as Safe without consulting
known_fp_rules.mdfirst. That file is the source of truth for our standing decisions. If the rule isn't listed there, add it (with aReview requiredverdict) before acting. - SQL-injection hotspots (
go:S2077) require a spot check of 2–3 files before bulk-marking — we use dynamic table/column names with whitelisted values; we want to be sure format-string inputs never reach user content. mark_safe.shonly scans the first page (500 hotspots). If the rule has more, rerun until the count drops to zero.mark_fp.shis per-issue; for bulk issue triage use the SonarCloud UI or loop in bash:for k in K1 K2 K3; do mark_fp.sh $k "..."; done.
Progressive disclosure
- Always loaded: this SKILL.md
- Read on demand:
resources/known_fp_rules.md— standing per-rule decisions + exact triage commentsresources/triage_playbook.md— "when you see X in Y, do Z"
- Run on demand: scripts in
scripts/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

