g1joshi/agent-skills/sonarqube
Claude Code and agent skill by g1joshi/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Expert SonarQube code quality and security scanning covering Quality Gates, static analysis (SAST), and test coverage tracking. Use when configuring SonarQube/SonarCloud, measuring code debt, or enforcing quality gates.
Install
npx vskill@latest install g1joshi/agent-skills/sonarqubeSKILL.md
The same SKILL.md was published earlier as g1joshi/agent-skills/sonarqube.
SonarQube
SonarQube is the leading tool for continuous inspection of code quality. It detects bugs, vulnerabilities (SAST), and code smells in over 30 programming languages.
When to Use
- Continuous Code Quality & Clean Code Auditing: Analyzing codebases for bugs, vulnerabilities, security hotspots, and code smells.
- Quality Gates in Pull Requests: Enforcing that new code meets strict quality standards (test coverage, zero new bugs) before merging.
- Technical Debt & Maintainability Tracking: Measuring duplication percentage, complexity scores, and estimated remediation time.
- Enterprise Security Compliance: Ensuring codebases comply with security standards (OWASP Top 10, CWE, SANS Top 25).
Quick Start
Core Concepts
The "Clean as You Code" Methodology
Focuses quality gate enforcement on "New Code" (modified in the PR) rather than legacy debt:
sonar-project.properties Configuration
Defines source paths, exclusions, test execution reports, and lcov coverage targets:
SonarScanner CLI Execution
Runs static analysis and uploads results to SonarQube Server or SonarCloud:
Common Patterns
Maven / Gradle Sonar Scanner Pipeline
Problem: Code smells and security hotspots merge to main branch unnoticed.
Solution: Run Sonar analysis during standard build jobs:
Best Practices
Do:
- Enforce the Quality Gate on Pull Requests: Block merges if code coverage on new code is under 80% or if new security vulnerabilities are found.
- Upload Real Code Coverage Reports: Ensure unit test runs output valid LCOV or JaCoCo XML reports consumed by SonarQube.
- Review Security Hotspots Interactively: Investigate flagged security hotspots to confirm safe usage of cryptography and deserialization.
- Use SonarLint in IDEs: Run instant local analysis in VS Code/JetBrains to fix code smells before committing.
Don't:
- Attempt to fix all legacy technical debt at once: Adopt the Clean as You Code strategy; fix debt incrementally as files are modified.
- Disable rules to bypass failing Quality Gates: Address underlying architectural smells rather than weakening inspection rules.
- Run SonarScanner on untested code: Run tests and generate coverage reports before executing the Sonar scanner step.
Troubleshooting
| Error | Cause | Solution | |
|---|---|---|---|
Quality Gate failed: Coverage is below threshold | New code lacks adequate unit tests or report file missing. | Ensure coverage reports (lcov, jacoco) are generated and path specified in config. | |
You are not authorized to run the analysis | Invalid or expired SONAR_TOKEN. | Regenerate user/project token in SonarQube user security settings. | |
Task failed: SonarQube server unreachable | Network firewall or proxy blocking connection to internal Sonar server. | Verify server status and ensure runner has network egress to host URL. |
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/security/sonarqube/SKILL.md
Popularity
- Repository stars
- 15
- Repository forks
- 2
- 7-day trend score
- 13
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Aug 2026, 3 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/g1joshi/agent-skills/sonarqube)