hivemq/hivemq-edge/sonarqube
Claude Code and agent skill by hivemq/hivemq-edge
- community
Checking that the SKILL.md file is still in the repository.
Fetch and analyze SonarQube quality metrics for pull requests, reporting on code quality, bugs, vulnerabilities, coverage, and code smells
Install
npx vskill@latest install hivemq/hivemq-edge/sonarqubeSKILL.md
SonarQube Analysis Skill
Automatically fetches and analyzes SonarQube quality metrics for pull requests, providing insights on code quality, test coverage, bugs, vulnerabilities, and technical debt.
Prerequisites & Hooks
This skill requires several conditions to be met before execution:
Hook 1: PR Existence Check
Objective: Verify a pull request exists for the current branch
Commands:
Failure handling:
- If no PR exists: Provide instructions to create one first
- If PR is closed: Report status and ask if analysis is still needed
- If no gh CLI: Fallback to manual PR number input
Example output:
Hook 2: GitHub Actions Status Check
Objective: Ensure SonarQube analysis GitHub Action has completed
Commands:
Expected workflow names:
- "SonarQube Analysis"
- "SonarCloud Scan"
- "Code Quality"
- (configurable in config.yaml)
Statuses:
- ✅
conclusion: "success"→ Proceed to Hook 3 - ⏳
status: "in_progress"→ Wait or report estimated time - ❌
conclusion: "failure"→ Report failure, show logs URL, ask if should continue anyway - 🔴
conclusion: "cancelled"→ Report cancellation, suggest re-run
Failure handling:
- If action not found: Check config for workflow name
- If action failed: Show details URL, ask user if should continue with stale data
- If action in progress: Report estimated completion time, offer to wait
Example output:
Hook 3: SonarQube PR Data Availability
Objective: Verify SonarQube has analysis data for this PR
API Endpoint:
Fallback if PR data not found:
- Check branch analysis instead
- Report that PR-specific analysis is pending
- Suggest re-running GH workflow
Configuration (from config.yaml):
Failure handling:
- If 404: SonarQube hasn't analyzed this PR yet
- If 401: Authentication issue (report, continue with public data)
- If 500: SonarQube service issue (report, suggest retry)
Example output:
Usage
Basic Usage
Advanced Options
Arguments
[PR number]: PR number (e.g.,1386) - auto-detected if omitted[branch]: Branch name (e.g.,feature/new-feature) - auto-detected if omitted--detailed: Include file-level hotspots, detailed metrics--quality-gate-only: Show only pass/fail status--force: Skip Hook 1 and Hook 2 (go directly to Hook 3)
Skill Workflow
Phase 1: Prerequisites Check (Hooks)
Execute Hook 1, Hook 2, Hook 3 in sequence. If any fail:
- Report clear error message
- Provide actionable fix instructions
- Ask user if should continue anyway (with
--force)
Skip with:
Phase 2: Fetch SonarQube Metrics
2.1 Quality Gate Status
API Call:
Extract:
- Overall status:
PASSED/FAILED/ERROR - Conditions: Each metric and its status
- Failing conditions: Which metrics failed the gate
Parse JSON:
2.2 Core Metrics
API Call:
Metrics to fetch:
Quality Gate:
alert_status- Overall gate status
Bugs:
bugs- Total bugs (overall code)new_bugs- Bugs in new code (PR changes)
Vulnerabilities:
vulnerabilities- Total vulnerabilitiesnew_vulnerabilities- Vulnerabilities in new code
Code Smells:
code_smells- Total code smellsnew_code_smells- Code smells in new code
Coverage:
coverage- Overall test coverage %new_coverage- Test coverage % for new code
Duplications:
duplicated_lines_density- % of duplicated lines (overall)new_duplicated_lines_density- % duplications in new code
Security Hotspots:
security_hotspots- Total security hotspotsnew_security_hotspots- Security hotspots in new code
Ratings (A-E scale):
sqale_rating/new_maintainability_rating- Maintainabilityreliability_rating/new_reliability_rating- Reliabilitysecurity_rating/new_security_rating- Security
Lines of Code:
ncloc- Total lines of codenew_lines- New lines added in PR
2.3 Issues Breakdown (if --detailed)
API Call:
Group by:
- Severity:
BLOCKER,CRITICAL,MAJOR,MINOR,INFO - Type:
BUG,VULNERABILITY,CODE_SMELL,SECURITY_HOTSPOT - File: Group issues by file path
Phase 3: Generate Report
Generate a formatted markdown report with the following structure:
Configuration
Configuration is stored in .claude/skills/sonarqube/config.yaml:
Error Handling
Error 1: No PR Found (Hook 1 Failure)
Message:
Error 2: GH Action Not Completed (Hook 2 Failure)
Message:
This is the start of the file. Read the full SKILL.md on GitHub.
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 repositoryCheckinghivemq-edge-frontend/.claude/skills/sonarqube/SKILL.md
Popularity
- Repository stars
- 164
- Repository forks
- 44
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- 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/hivemq/hivemq-edge/sonarqube)