Pull the open SonarCloud findings for a repo or PR via its API, print the count by rule and severity first, fix them in place without behavior change (complexity splits, nested ternaries, unused imports), run the repo's lint and type lane once, and report fixed N/N with false positives listed by rule id.
Install
npx skills add Sagargupta16/agent-brain --skill sonar-sweepnpx skills add Sagargupta16/agent-brain --skill sonar-sweep -a claude-code -gnpx skills add Sagargupta16/agent-brain --skill sonar-sweep -a codex -ggemini skills install https://github.com/Sagargupta16/agent-brain.git --path skills/sonar-sweepgh skill install Sagargupta16/agent-brain sonar-sweepgit clone --depth 1 https://github.com/Sagargupta16/agent-brain /tmp/Sagargupta16__agent-brain
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/Sagargupta16__agent-brain/skills/sonar-sweep ~/.claude/skills/sonar-sweep # Claude Code
cp -R /tmp/Sagargupta16__agent-brain/skills/sonar-sweep ~/.agents/skills/sonar-sweep # Codex, Cursor, Gemini CLI, Copilot, OpenCode