custom-sonarcloud-context-fetching

Fetches SonarCloud issues, quality gates, hotspots, and rule details via the sonar CLI.

1|Updated Apr 3, 2021
One-click install
npx skills add https://github.com/NaoyaMiyagawa/dotfiles --skill custom-sonarcloud-context-fetching-naoyamiyagawa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-sonarcloud-context-fetching
Source: https://github.com/NaoyaMiyagawa/dotfiles/tree/main/.ai/skills/custom-sonarcloud-context-fetching
Command: npx skills add https://github.com/NaoyaMiyagawa/dotfiles --skill custom-sonarcloud-context-fetching-naoyamiyagawa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a user shares a sonarcloud.io URL or asks about code quality findings, the AI needs live project context without a dedicated MCP server. This Skill turns SonarCloud links and keys into concrete CLI commands that retrieve issues, quality-gate status, security hotspots, measures, and rule explanations on demand. ## Core Features & Use Cases - URL Parsing: Maps sonarcloud.io pages (project overview, issues, hotspots, rules) to the correct projectKey, issueKey, hotspotKey, or ruleKey, including branch and pull-request parameters. - Read-Only Fetching: Runs sonar list issues and sonar api get calls against endpoints like /api/issues/search, /api/qualitygates/project_status, /api/hotspots/show, and /api/rules/show. - Use Case: A user pastes a link to a CRITICAL issue on a pull request. The Skill extracts the issue key, fetches the issue details and the violated rule's explanation, and summarizes severity, location, and how to fix it. ## Quick Start Fetch the details and rule explanation for the SonarCloud issue at this URL and summarize its severity, location, and suggested fix.

Frequently Asked Questions about custom-sonarcloud-context-fetching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch SonarCloud issue details from a URL?

Parse the sonarcloud.io URL to extract the project key from the id parameter and the issue key from the open or issues parameter. Then run sonar api get with /api/issues/search?issues=<key>&componentKeys=<projectKey> to retrieve the issue details.

How do I check a SonarCloud quality gate status from the CLI?

Run sonar api get with /api/qualitygates/project_status?projectKey=<projectKey> to retrieve the quality gate result. Add &branch= or &pullRequest= to scope the check to a specific branch or pull request.

Can this Skill run SonarCloud analysis or modify issues?

No, the Skill is strictly read-only and only runs sonar list and sonar api get commands. It does not run sonar analyze, sonar remediate, or any API post, put, patch, or delete calls unless the user explicitly requests them.

What happens if the sonar CLI is not authenticated?

The Skill first runs sonar auth status to verify the connection shows the server and organization. If the CLI is not connected, it stops and asks the user to run sonar auth login rather than guessing credentials.

How do I get a SonarCloud rule explanation for a flagged issue?

Fetch the rule details with sonar api get using /api/rules/show?key=<ruleKey>&organization=<org>. The organization comes from the URL path, the project key prefix, or the Org line in sonar auth status output.