No slash command · from sonarqube
Use when you need a SonarQube projectKey, are setting up or debugging .sonarlint/connectedMode.json, are calling `sonar api` against a bound project, need the Cloud organization, or are working out which project a file in a monorepo belongs to.
Ships in sonarqube. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Connected mode binds a local repository to a project on a SonarQube Server or SonarQube Cloud instance. The binding lives in a committed file, which means the project key is usually already on disk — you rarely need to ask for it.
.sonarlint/connectedMode.json, relative to the repository (or
sub-project) root:
{
"sonarQubeUri": "https://sonarqube.example.com",
"projectKey": "my-org_my-project"
}
For SonarQube Cloud, the organization replaces the server URI:
{
"sonarCloudOrganization": "my-org",
"projectKey": "my-org_my-project"
}
| Field | Meaning |
|---|---|
projectKey | The project's key on the instance |
sonarQubeUri | Server flavour: the instance's base URL |
sonarCloudOrganization | Cloud flavour: the organization key |
It is meant to be committed. A repository that has it gives every contributor — and every tool — the same binding for free.
Walk up from the file's directory to the filesystem root and take the
first .sonarlint/connectedMode.json you find. The nearest one wins.
This matters in a monorepo, where several sub-projects each have their own binding:
repo/
.sonarlint/connectedMode.json -> projectKey: monorepo-root
packages/api/
.sonarlint/connectedMode.json -> projectKey: monorepo-api
src/handler.ts -> belongs to monorepo-api
packages/web/
src/page.tsx -> belongs to monorepo-root
packages/api/src/handler.ts binds to monorepo-api, not to the root.
The plugin's local analysis (SonarQube for IDE's engine, run offline)
doesn't need a binding: it uses the analyzers' default rules for every
file. Its hooks still read the nearest binding for each touched file and
label findings with that project, so in a monorepo the report says which
SonarQube project a finding belongs to. That project key is what to use
for a follow-up sonar api call.
Server-side quality profiles are not applied locally yet, so a rule your organization turned off can still be reported locally. See the README's known limitations.
sonar apiThe Web API needs the project key on almost every call, and SonarQube
Cloud also needs the organization — the CLI does not add either for you
(see sonarqube-web-api). Read both from connectedMode.json
(projectKey, sonarCloudOrganization) rather than guessing or
searching: the committed binding is the authoritative answer for that
repository.
A missing binding is not an error, and not something to fix uninvited:
sonar api needs a key. If a project search doesn't give an
unambiguous match, ask the user rather than picking one.| Symptom | Likely cause |
|---|---|
| Wrong project's issues | A parent binding shadowed a nearer one |
| Server rejects a valid key | Key belongs to a different instance/org |
| Nothing found walking up | No binding committed; run without it |
If connectedMode.json exists but is malformed, treat it as absent and
say so — analysing against a guessed key is worse than analysing without
one.
What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/analyzeUse when the user asks to "run sonar", "run SonarQube", "run SonarLint", "scan for secrets", "check this for Sonar issues", or wants SonarQube analysis over code this session never touched. Runs SonarQube for IDE's engine locally, adds what SonarQube Server or Cloud recorded for the same files, and works through the findings./fixUse when the user asks to fix SonarQube or SonarLint issues, a specific Sonar rule key (like python:S5754 or githubactions:S8541), or "the Sonar findings" in some files, including issues SonarQube Server or Cloud reported. Gathers findings locally and from the server, explains each rule, and fixes the issues minimally./sonarlint-analysisUse after creating or editing source code (JS/TS, Python, Java, Go, PHP, HTML, CSS, XML, Terraform, Docker, Kubernetes, CloudFormation, or any file that could hold a credential) and before declaring a coding task done, or when asked to check code quality or security locally. Runs SonarQube for IDE's own analyzers on the working tree through the plugin's `sonarlint` CLI and explains how to read and act on the result./sonarqube-issue-triageUse when acting on SonarQube findings — deciding what to fix first, whether something is a real defect or a false positive, how to handle a detected secret, what a quality gate failure means, or whether a NOSONAR suppression is ever justified./sonarqube-web-apiUse when you need data from a SonarQube Server or SonarQube Cloud instance — open issues or security hotspots on a project, a quality gate verdict, a rule's rationale, measures or coverage, branches and pull requests, duplications, or changing an issue's status. Covers calling the Web API through `sonar api`, and the Server vs Cloud differences.npx claudepluginhub leonardo-marziali/agentic-development-kit --plugin sonarqube