Synthèse automatique
Guide l'utilisateur à travers l'installation de la CLI SonarQube, l'authentification et l'intégration de SonarQube avec l'agent d'IA en cours.
Points forts
- Automatise l'installation et la mise à jour de la CLI
- Gère l'authentification pour les instances cloud et auto-hébergées
- Intègre SonarQube directement dans l'environnement de l'agent
- Fournit des instructions claires avec confirmation utilisateur
Limites
- Nécessite que SonarQube (serveur ou cloud) soit déjà configuré
- Intègre uniquement avec l'agent, pas avec les pipelines CI/CD
- L'installation peut échouer en raison de restrictions réseau
Utilisez-le pour configurer SonarQube dans un assistant de codage IA afin d'analyser la qualité du code.
Ne l'utilisez pas si SonarQube n'est pas déjà prêt ou si vous avez besoin d'une intégration CI/CD.
Analyse de sécurité
PrudenceThe skill installs a legitimate third-party CLI from a trusted vendor, but the installation pattern (curl piping to bash, irm piping to iex) is inherently risky if the user does not verify the script. User confirmation is required, but the risk remains. The allowed-tools are broad, increasing potential impact if the skill is altered. Overall, the skill is useful and the risk is mitigated by requiring consent, but caution is warranted.
- •Uses curl|bash and irm|iex installation commands which pipe downloaded scripts into a shell; this is a common attack vector if the source is compromised. The skill requires explicit user confirmation before execution, partially mitigating risk.
- •Allowed-tools include powerful network utilities (curl, irm, iex) that could be exploited if the skill were modified maliciously.
Exemples
I want to integrate SonarQube into my workspace.Install and configure SonarQube CLI for code analysis.Log into my SonarQube account from the terminal.name: sonar-integrate description: "Installs sonarqube-cli if not already installed, authenticates, and integrates SonarQube with the current agent (installs analysis hooks & SonarQube MCP Server). Use when the user wants to set up SonarQube integration or asks to configure SonarQube." allowed-tools: Bash(which:), Bash(Get-Command:), Bash(sonar:), Bash(curl:), Bash(irm:), Bash(iex:)
Integrate SonarQube
Guide the user through installing sonarqube-cli (if needed), updating it to the latest version when already installed, authenticating, and completing agent-specific integration. Assume SonarQube itself is already set up; this skill only wires the assistant.
Instructions
Interaction rule: for every finite decision, always present predefined selector options (single-choice or multi-choice as appropriate) instead of asking for free-form text. If the user gives an invalid answer, re-show the same selector.
Step 1 — Check for sonarqube-cli and update it
Check if sonar is available on the PATH by running which sonar (macOS/Linux) or Get-Command sonar (Windows) yourself.
If found:
- Run
sonar self-updateyourself and wait for it to finish.- If it succeeds: briefly tell the user the CLI is up to date (or was upgraded), then go to Step 2.
- If it fails: show the relevant output, suggest they run
sonar self-updatemanually (e.g. offline or network issues), then still continue to Step 2 ifsonarremains usable — do not block the rest of the flow unless the binary is missing or broken.
If not found: pick the platform-appropriate install command from the table below, show it to the user, and ask for explicit confirmation before running it. Do not execute the command until the user confirms.
| Platform | Install command |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| macOS / Linux | curl -o- https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.sh \| bash |
| Windows (PS) | irm https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.ps1 \| iex |
If the user confirms: run the command yourself using a shell command. After it finishes, re-run the PATH check (which sonar or Get-Command sonar) yourself to verify before continuing.
If the user declines: stop the skill and ask the user to install sonarqube-cli manually and then re-invoke the sonar-integrate skill.
Step 2 — Check authentication status
Run sonar auth status yourself using a shell command.
If already authenticated: note the connected server and organisation from the output, then skip directly to Step 4.
If not authenticated: proceed to Step 3.
Step 3 — Authenticate (sonar auth login)
This step requires user interaction — do not run it yourself.
First determine the connection type using a single-choice selector with these options:
- SonarQube Cloud - EU (default)
- SonarQube Cloud - US
- Self-hosted SonarQube Server
Do not ask an open-ended text question for this decision.
Collect:
| Scenario | Information needed |
| ------------------------------ | ------------------------------------------------------------- |
| SonarQube Cloud — EU (default) | organization key (e.g. my-org) |
| SonarQube Cloud — US | organization key + confirm US region (https://sonarqube.us) |
| SonarQube Server | server URL (e.g. https://sonarqube.yourcompany.com) |
Build the login command and show it to the user:
| Scenario | Command |
| -------------------- | ------------------------------------------------------- |
| SonarQube Cloud — EU | sonar auth login -o <org-key> |
| SonarQube Cloud — US | sonar auth login -o <org-key> -s https://sonarqube.us |
| SonarQube Server | sonar auth login -s <server-url> |
Tell the user:
"Run the command below — it will open your browser to log in. The token is stored securely in your system keychain and never appears in this chat."
Wait for the user to confirm they logged in, then run sonar auth status yourself to
verify before continuing.
Step 4 — Agent-specific integration
Pick exactly one branch below based on which agent you are. Do not run the other branches.
- Claude Code -> 4.a
- Copilot CLI -> 4.b
- Cursor, Gemini CLI, or Codex -> 4.c
4.a — Claude Code (sonar integrate claude)
Run sonar integrate claude, which configures the SonarQube MCP Server, secrets-scanning hooks, and any other supported integration the CLI applies.
It wires MCP (for skills like sonar-quality-gate, sonar-analyze, sonar-coverage, sonar-duplication, sonar-dependency-risks) and secrets-scanning hooks into the user’s Claude Code config. When available, SonarQube Agentic Analysis hooks are also installed.
Ask the user using a single-choice selector with these options:
- Current project only (default)
- Global (all projects)
Do not ask an open-ended text question for this decision.
Then run the appropriate command yourself using a shell command, and adding --non-interactive:
| Scenario | Command |
| ------------ | --------------------------------------------------- |
| Project-only | sonar integrate claude --non-interactive |
| Global | sonar integrate claude --global --non-interactive |
4.b — Copilot CLI (sonar integrate copilot)
Run sonar integrate copilot, which configures the SonarQube MCP Server, secrets-scanning hooks, and any other supported integration the CLI applies.
It wires MCP (for skills like sonar-quality-gate, sonar-analyze, sonar-coverage, sonar-duplication, sonar-dependency-risks) and secrets-scanning hooks into the user’s Copilot CLI config.
Ask the user using a single-choice selector with these options:
- Current project only (default)
- Global (all projects)
Do not ask an open-ended text question for this decision.
Then run the appropriate command yourself using a shell command, and adding --non-interactive:
| Scenario | Command |
| ------------ | --------------------------------------------------- |
| Project-only | sonar integrate copilot --non-interactive |
| Global | sonar integrate copilot --global --non-interactive |
4.c — Cursor, Gemini CLI, and Codex
These agents start the SonarQube MCP Server via sonar run mcp, which handles container runtime detection (Docker, Podman, Nerdctl) and authentication automatically. Authentication was handled in Steps 2–3.
Confirm that integration is ready — the MCP server will start automatically when the agent reads its config (mcp.json for Cursor, and Codex; gemini-extension.json for Gemini CLI).
Summary message
After all steps complete, print a summary:
✅ SonarQube integration is ready.
sonarqube-cli: updated via sonar self-update
Authentication: token stored in system keychain
MCP Server: configured (restart the agent session if tools do not appear)
You can verify at any time with: sonar auth status
To refresh CLI + wiring later: invoke the sonar-integrate skill again
If path 4.a (Claude Code) was taken, add this line to the summary:
Secrets scanning: hooks registered via sonar integrate claude
If path 4.b (Copilot CLI) was taken, add this line to the summary:
Secrets scanning: hooks registered via sonar integrate copilot
If sonarqube-cli was freshly installed in Step 1, replace the sonarqube-cli summary line with sonarqube-cli: installed.
If sonar self-update failed in Step 1, adjust the summary: omit the sonarqube-cli line or state that the CLI was not updated and suggest sonar self-update in a terminal.
If any other step failed, note it clearly and suggest the corrective action.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/sonarqube-integration-mryiqhsm/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/sonarqube-integration-mryiqhsm' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/sonarqube-integration-mryiqhsm/download' --output '.skill-downloads/sonarqube-integration-mryiqhsm/SKILL.md.part' && mv '.skill-downloads/sonarqube-integration-mryiqhsm/SKILL.md.part' '.skill-downloads/sonarqube-integration-mryiqhsm/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash(which:*), Bash(Get-Command:*), Bash(sonar:*), Bash(curl:*), Bash(irm:*), Bash(iex:*)
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/sonarqube-integration-mryiqhsm/SKILL.md' && test -s '.skill-downloads/sonarqube-integration-mryiqhsm/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/sonar-integrate' && cp -R '.skill-downloads/sonarqube-integration-mryiqhsm' '.claude/skills/sonar-integrate'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/sonarqube-integration-mryiqhsm'openskills read 'sonarqube-integration-mryiqhsm'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/sonarqube-integration-mryiqhsm/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.