.codex/skills/sonarcloud/SKILL.md
Pull issues, metrics, quality gates, and analysis data from SonarCloud
npx skillsauth add harshanandak/forge .codex/skills/sonarcloudInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Pull code quality data from SonarCloud. Requires SONARCLOUD_TOKEN environment variable.
$ARGUMENTS - Query type and parameters| Query | Description | Example |
|-------|-------------|---------|
| issues <project> | Get open issues | /sonarcloud issues my-project |
| metrics <project> | Get code metrics | /sonarcloud metrics my-project |
| gate <project> | Quality gate status | /sonarcloud gate my-project |
| health <project> | Full health report | /sonarcloud health my-project |
| pr <project> <pr#> | PR analysis | /sonarcloud pr my-project 123 |
| hotspots <project> | Security hotspots | /sonarcloud hotspots my-project |
| history <project> | Analysis history | /sonarcloud history my-project |
| Filter | Description | Example |
|--------|-------------|---------|
| --branch <name> | Filter by branch | --branch develop |
| --severity <levels> | Filter severity | --severity BLOCKER,CRITICAL |
| --type <types> | Filter issue type | --type BUG,VULNERABILITY |
| --new-code | Only new code issues | --new-code |
$ARGUMENTS to determine:
SONARCLOUD_TOKEN environment variable. If not set, inform user.SONARCLOUD_ORG environment variable or ask user for organization key.next-app/src/lib/integrations/sonarcloud.ts📋 Open Issues for my-project (branch: main)
Total: 45 issues
By Severity:
🔴 BLOCKER: 2
🟠 CRITICAL: 5
🟡 MAJOR: 18
⚪ MINOR: 15
⚫ INFO: 5
By Type:
🐛 BUG: 8
🔓 VULNERABILITY: 3
💩 CODE_SMELL: 34
Top Issues:
1. [CRITICAL] src/auth/login.ts:42 - SQL injection vulnerability
2. [BLOCKER] src/api/users.ts:156 - Null pointer dereference
...
📊 Metrics for my-project
| Metric | Value |
|--------|-------|
| Lines of Code | 51,234 |
| Coverage | 78.5% |
| Duplications | 3.2% |
| Bugs | 8 |
| Vulnerabilities | 3 |
| Code Smells | 34 |
| Technical Debt | 4d 2h |
| Maintainability | A |
| Reliability | B |
| Security | A |
🚦 Quality Gate: ❌ FAILED
Failed Conditions:
| Metric | Threshold | Actual |
|--------|-----------|--------|
| Coverage on New Code | ≥ 80% | 65.3% |
| New Bugs | = 0 | 2 |
Passed Conditions:
| Metric | Threshold | Actual |
|--------|-----------|--------|
| New Vulnerabilities | = 0 | 0 |
| Duplicated Lines | ≤ 3% | 1.2% |
Base URL: https://sonarcloud.io/api
# Issues
curl -H "Authorization: Bearer $TOKEN" \
"https://sonarcloud.io/api/issues/search?organization=$ORG&componentKeys=$PROJECT&resolved=false"
# Metrics
curl -H "Authorization: Bearer $TOKEN" \
"https://sonarcloud.io/api/measures/component?component=$PROJECT&metricKeys=bugs,vulnerabilities,coverage"
# Quality Gate
curl -H "Authorization: Bearer $TOKEN" \
"https://sonarcloud.io/api/qualitygates/project_status?projectKey=$PROJECT"
# Hotspots
curl -H "Authorization: Bearer $TOKEN" \
"https://sonarcloud.io/api/hotspots/search?projectKey=$PROJECT&status=TO_REVIEW"
See skills/sonarcloud-analysis/SKILL.md for complete API documentation including:
development
Pull issues, metrics, quality gates, and analysis data from SonarCloud. ALWAYS use this skill when the user mentions SonarCloud, asks about code quality metrics, wants to check PR quality gates, or needs to review security vulnerabilities and technical debt from static analysis. Also trigger during /review workflow when SonarCloud issues need addressing. Trigger on phrases like "SonarCloud", "quality gate", "code quality metrics", "technical debt", "coverage report", "static analysis issues", "security vulnerabilities from scan".
tools
Produces comprehensive research reports that go far beyond what built-in web search can achieve. Sends research tasks to Parallel AI's pro/ultra processors which spend 3-25 minutes autonomously crawling, reading, and synthesizing dozens of sources — returning structured reports with citations. Built-in WebSearch can only run a few queries; this skill runs an entire research pipeline externally. No binary install — requires PARALLEL_API_KEY in .env.local. ALWAYS use this skill instead of doing multiple WebSearch calls when the user needs a comprehensive report, market analysis, competitive landscape, industry deep-dive, strategic recommendations, or multi-source synthesis. This is the RIGHT tool for any research task that would require more than 3-4 web searches to answer properly. Also trigger during /plan Phase 2 research and /research workflows.
testing
Test content
testing
Test content