sonar-list-issues
Search and filter SonarQube issues for a project, branch, or pull request via sonarqube-cli (`-p` is always required on the CLI; resolve the key from user arguments or sonar-project.properties)
What this skill does
# SonarQube — List Issues Search for issues in a SonarQube project using the `sonarqube-cli`. Unlike SonarQube MCP tools (which may use a default project from integration), **`sonar list issues` always requires `-p <project-key>`**. Resolve the key from the user-provided arguments or `sonar-project.properties` before running the CLI. ## Usage ``` sonar-list-issues # issues in the current project sonar-list-issues my-project # issues in a specific project key sonar-list-issues my-project --severity CRITICAL # filter by severity sonar-list-issues my-project --types BUG,VULNERABILITY # filter by type sonar-list-issues my-project --statuses OPEN,CONFIRMED # filter by status sonar-list-issues my-project --rules python:S2077 # filter by rule key sonar-list-issues my-project --tags security # filter by tag sonar-list-issues my-project --component src/auth/login.py # issues in a specific file sonar-list-issues my-project --resolved # only resolved issues sonar-list-issues my-project --branch main # on a specific branch sonar-list-issues my-project --pr 42 # on a pull request ``` ## Prerequisites This skill uses the `sonarqube-cli` command. The CLI must be installed and authenticated before proceeding. **Before proceeding**, verify that `sonar` is available on your PATH and authenticated. If it is not, do not attempt to call any alternative commands or invent alternatives, and show the user: > Unable to list issues. > > **Possible causes:** > - `sonarqube-cli` not installed or not authenticated — invoke the sonar-integrate skill > - Project key is wrong or missing — `-p` is mandatory for `sonar list issues`; invoke the sonar-list-projects skill or set `sonar.projectKey` in `sonar-project.properties` Then ask the user (yes/no) whether to run the sonar-integrate skill now. If they confirm, invoke the sonar-integrate skill yourself and follow it end-to-end in this session, then re-check and continue; if they decline, stop. ## Instructions ### Step 1: Resolve the project key This flow uses **`sonar list issues`** (CLI), not MCP. The CLI **always** needs **`-p <project-key>`** — do not invoke it without a resolved key. - If the user provided a project key, use it. - Otherwise look for `sonar.projectKey` in `sonar-project.properties` at the repo root. - If still not found, **do not run** `sonar list issues`. Tell the user: *"Invoke the sonar-list-projects skill to find your project key, then re-run with that key,"* or add `sonar.projectKey` to `sonar-project.properties`. (MCP integration defaults do **not** apply to this CLI command.) ### Step 2: Parse optional flags from the user-provided arguments | Flag | Maps to CLI option | | --------------------- | ------------------------------------------------------------ | | `--severity <value>` | `--severity` | | `--types <values>` | `--types` | | `--statuses <values>` | `--statuses` | | `--rules <values>` | `--rules` | | `--tags <values>` | `--tags` | | `--component <path>` | `--component-keys` (file key format: `project-key:src/path`) | | `--resolved` | `--resolved` | | `--branch <name>` | `--branch` | | `--pr <id>` | `--pull-request` | When `--component` is given as a plain path, prepend the resolved project key to form the component key (e.g. `my-project:src/auth/login.py`). ### Step 3: Validate arguments Before building the command, validate each user-supplied value against the following rules. If any value fails validation, stop and tell the user what was rejected and why — do not run the command. Validate the resolved project key (from args or `sonar-project.properties`) against the project-key pattern before running the CLI. | Argument | Allowed pattern | | ------------- | -------------------------------------------------------------------------------------------------------------- | | project key | `^[a-zA-Z0-9_\-\.:]+$` | | `--severity` | one of: `BLOCKER`, `CRITICAL`, `MAJOR`, `MINOR`, `INFO`, `HIGH`, `MEDIUM`, `LOW` | | `--types` | comma-separated subset of: `BUG`, `VULNERABILITY`, `CODE_SMELL`, `SECURITY_HOTSPOT` | | `--statuses` | comma-separated subset of: `OPEN`, `CONFIRMED`, `REOPENED`, `RESOLVED`, `CLOSED`, `ACCEPTED`, `FALSE_POSITIVE` | | `--rules` | comma-separated values matching `^[a-zA-Z0-9_\-:]+$` | | `--tags` | comma-separated values matching `^[a-zA-Z0-9_\-]+$` | | `--component` | file path matching `^[a-zA-Z0-9_\-\./:,]+$` | | `--branch` | `^[a-zA-Z0-9_\-\./]+$` | | `--pr` | digits only | ### Step 4: Run `sonar list issues` Build and run the command using a shell command. **Always** pass **`-p`** with the key resolved in Step 1. ```bash sonar list issues -p <project-key> --format toon [--severity <value>] [--types <values>] [--statuses <values>] [--rules <values>] [--tags <values>] [--component-keys <key>] [--resolved] [--branch <name>] [--pull-request <id>] ``` Only include optional flags that were provided. ### Step 5: Format the results **If issues are found**, present a summary line then a table sorted by severity then line number: ```markdown ## SonarQube Issues — `my-project` (branch: `main`) Found **12 issue(s)**: | File | Line | Severity | Rule | Message | | -------------------- | ---- | --------- | ------------ | ----------------------------- | | src/auth/login.py | 12 | 🔴 Blocker | python:S2077 | SQL injection risk | | src/utils/helpers.py | 34 | 🟠 High | python:S2259 | Null dereference | | src/api/routes.py | 67 | 🟡 Medium | python:S3776 | Cognitive complexity too high | ``` Severity icons (the label depends on the server version): - 🔴 Blocker - 🟠 Critical / High - 🟡 Major / Medium - 🔵 Minor / Low - ⚪ Info **If no issues are found**: ```markdown ## SonarQube Issues — `my-project` ✅ No issues found. ``` ### Step 6: Next steps - To fix a specific issue: *"Ask me to fix `<rule>` at `<file>:<line>`."* - To check the quality gate: *"Invoke the sonar-quality-gate skill."*
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.