Fix sonar

From Llloooggg/LetsFLUTssh · View interactive version

Fix sonar is an AI agent skill from the GitHub repository Llloooggg/LetsFLUTssh. Fetch SonarCloud issues and fix them. Use when user wants to fix code smells, bugs, or vulnerabilities reported by SonarCloud.

How to use this skill

Skill file

Fix SonarCloud issues

Step 1: Fetch issues from SonarCloud API

Get open issues sorted by severity:

curl -s "https://sonarcloud.io/api/issues/search?componentKeys=Llloooggg_LetsFLUTssh&statuses=OPEN,CONFIRMED,REOPENED&ps=100&s=SEVERITY&asc=false" | python3 -c "
import json, sys
d = json.load(sys.stdin)
for i in d.get('issues', []):
    comp = i.get('component','').replace('Llloooggg_LetsFLUTssh:','')
    print(f\"{i['severity']:12} {i['type']:15} {comp}:{i.get('line','')} — {i['message']}\")
print(f\"\\nTotal: {d.get('total',0)} issues\")
"

If $ARGUMENTS contains a severity (BLOCKER, CRITICAL, MAJOR, MINOR, INFO), filter by it:

curl -s "https://sonarcloud.io/api/issues/search?componentKeys=Llloooggg_LetsFLUTssh&statuses=OPEN,CONFIRMED,REOPENED&severities=$ARGUMENTS&ps=100"

If $ARGUMENTS contains a file path, filter by component:

curl -s "https://sonarcloud.io/api/issues/search?componentKeys=Llloooggg_LetsFLUTssh&statuses=OPEN,CONFIRMED,REOPENED&components=Llloooggg_LetsFLUTssh:$ARGUMENTS&ps=100"

Step 2: Analyze and group issues

Group by file. For each file, read the relevant code sections to understand context.

Step 3: Fix issues

For each issue:

  1. Read the file and understand the problem. Run /find-impact <file> when the flagged code is shared — refactors must not break call sites
  2. Fix the root cause — NEVER use // ignore:, // NOSONAR, or any suppression
  3. Follow AGENTS.md "Code Quality — SonarCloud" — the S3776/S3358/S1854/S1192 patterns and shaping rules live there. Don't paraphrase them here
  4. If a fix changes public API or data flow, update docs (ARCHITECTURE.md)

Step 4: Verify

Run make lint to confirm no new issues were introduced.

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.