sonar-rule

Retrieve SonarQube rule explanations with compliant and noncompliant code examples.

3|1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/denniscalazans/denniscalazans-plugins --skill sonar-rule
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sonar-rule
Source: https://github.com/denniscalazans/denniscalazans-plugins/tree/main/plugins/code-quality/skills/sonar-rule
Command: npx skills add https://github.com/denniscalazans/denniscalazans-plugins --skill sonar-rule

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers understand why their code might be flagged by SonarQube, providing clear explanations and code examples for specific rules.

Core Features & Use Cases

  • Rule Explanation: Get detailed descriptions of SonarQube rules, including the rationale behind them.
  • Code Examples: View noncompliant and compliant code snippets to understand how to fix violations.
  • Use Case: A developer sees a SonarQube issue with the ID "S3358" in their TypeScript code. They use this Skill to get a clear explanation of what "S3358" means and how to refactor their code to comply.

Quick Start

Explain the SonarQube rule S3358 for TypeScript.

Frequently Asked Questions about sonar-rule

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

FAQPage Schema
What does a SonarQube rule ID like S3358 mean in my code quality report?

A SonarQube rule ID identifies a specific code quality violation, and this Skill retrieves detailed descriptions and rationales for those rules. It provides actionable insights into why your code was flagged and how to enforce coding standards.

How do I get code examples to fix SonarQube code quality violations?

To fix SonarQube code quality violations, this Skill provides side-by-side noncompliant and compliant code snippets. By querying a specific rule ID or description, you see exactly how to refactor your code to resolve the issue.

Can I use this to understand SonarQube rules for TypeScript debugging?

Yes, you can query SonarQube rules for TypeScript debugging by providing the specific rule ID. The Skill returns explanations and code examples that address developer needs for understanding violations in that language.

How do I find the rationale behind a specific SonarQube rule?

You find the rationale behind a SonarQube rule by querying its ID or description. The Skill retrieves the detailed description and reasoning for the rule, facilitating adherence to coding standards through actionable insights.

What is the best way to resolve SonarQube issues without reading full documentation?

The best way to resolve SonarQube issues efficiently is to query the rule ID directly. This Skill provides concise descriptions, rationales, and compliant code examples, bypassing the need to read full documentation.

Why does SonarQube flag my code and how do I explain the violation?

SonarQube flags code because it violates specific quality rules, and this Skill explains the violation by retrieving the rule's description and rationale. It offers code examples showing both noncompliant and compliant implementations.